AlgoPlus v0.1.0
Loading...
Searching...
No Matches
Mat1d< T, SIZE > Class Template Reference

Class for 1-dimensional Matrix. More...

#include <mat_1d.h>

Public Types

typedef T * iterator
 Iterator begin for Mat1d class.
 

Public Member Functions

 Mat1d (std::vector< T > v={})
 constructor for Mat1d class
 
 Mat1d (std::initializer_list< T > il)
 constructor for Mat1d class with initializer list
 
 Mat1d (const T val) noexcept
 constructor for Mat1d class with input value
 
 Mat1d (Mat1d &mat)
 copy constructor for Mat1d class
 
Mat1doperator= (Mat1d &mat)
 copy constructor for Mat1d class
 
 ~Mat1d ()
 destructor of Mat1d class
 
size_t size () const
 size function
 
T * begin ()
 
T * end ()
 Iterator end for Mat1d class.
 
T & operator[] (const size_t index)
 operator[] for Mat1d class
 
bool operator== (const Mat1d< T, SIZE > &mat) const
 operator == for Mat1d class
 
bool operator!= (const Mat1d< T, SIZE > &mat) const
 operator != for Mat1d class
 

Friends

std::ostream & operator<< (std::ostream &out, const Mat1d &mat)
 operator << for Mat1d class
 

Detailed Description

template<typename T, size_t SIZE>
class Mat1d< T, SIZE >

Class for 1-dimensional Matrix.

Constructor & Destructor Documentation

◆ Mat1d() [1/3]

template<typename T, size_t SIZE>
Mat1d< T, SIZE >::Mat1d ( std::initializer_list< T > il)
inlineexplicit

constructor for Mat1d class with initializer list

Parameters
ilthe initializer list that we want to use to initialize the array

◆ Mat1d() [2/3]

template<typename T, size_t SIZE>
Mat1d< T, SIZE >::Mat1d ( const T val)
inlineexplicitnoexcept

constructor for Mat1d class with input value

Parameters
valthe value that we want all the elements of the array to have

◆ Mat1d() [3/3]

template<typename T, size_t SIZE>
Mat1d< T, SIZE >::Mat1d ( Mat1d< T, SIZE > & mat)
inlineexplicit

copy constructor for Mat1d class

Parameters
matthe matrix we want to copy
Returns
Mat1d

Member Function Documentation

◆ operator!=()

template<typename T, size_t SIZE>
bool Mat1d< T, SIZE >::operator!= ( const Mat1d< T, SIZE > & mat) const
inline

operator != for Mat1d class

Parameters
matthe matrix to compare
Returns
true if &this is not equal to mat
false otherwise

◆ operator=()

template<typename T, size_t SIZE>
Mat1d & Mat1d< T, SIZE >::operator= ( Mat1d< T, SIZE > & mat)
inline

copy constructor for Mat1d class

Parameters
matthe matrix we want to copy
Returns
Mat1d&

◆ operator==()

template<typename T, size_t SIZE>
bool Mat1d< T, SIZE >::operator== ( const Mat1d< T, SIZE > & mat) const
inline

operator == for Mat1d class

Parameters
matthe matrix to compare
Returns
true if &this is equal to mat
false otherwise

◆ operator[]()

template<typename T, size_t SIZE>
T & Mat1d< T, SIZE >::operator[] ( const size_t index)
inline

operator[] for Mat1d class

Returns
T the value of the array to that index

◆ size()

template<typename T, size_t SIZE>
size_t Mat1d< T, SIZE >::size ( ) const
inline

size function

Returns
size_t the size of the array

Friends And Related Symbol Documentation

◆ operator<<

template<typename T, size_t SIZE>
std::ostream & operator<< ( std::ostream & out,
const Mat1d< T, SIZE > & mat )
friend

operator << for Mat1d class

Parameters
matthe matrix

The documentation for this class was generated from the following file: