
Public Member Functions | |
| Matrix () | |
| Matrix (const Matrix &Matrix) | |
| Matrix (unsigned long ColsNbr, unsigned long RowsNbr) | |
| Matrix (unsigned long ColsNbr, unsigned long RowsNbr, T InitValue) | |
| virtual | ~Matrix () |
| unsigned long | getColsNbr () const |
| unsigned long | getRowsNbr () const |
| unsigned long | getSize () const |
| unsigned long | size () const |
| T * | getData () const |
| void | setData (T *Data) |
| T | getElement (unsigned long ColIndex, unsigned long RowIndex) const |
| T | at (unsigned long ColIndex, unsigned long RowIndex) const |
| T | get (unsigned long ColIndex, unsigned long RowIndex) const |
| void | setElement (unsigned long ColIndex, unsigned long RowIndex, T Element) |
| void | set (unsigned long ColIndex, unsigned long RowIndex, T Element) |
| Matrix< T > & | operator= (const Matrix &A) |
| void | fill (const T &Val) |
| void | clear () |
Protected Attributes | |
| boost::multi_array< T, 2 > | m_Data |
| unsigned long | m_ColsNbr |
| unsigned long | m_RowsNbr |
Template class for matrix data
| openfluid::core::Matrix< T >::Matrix | ( | ) |
Default constructor, creates an empty Matrix
| openfluid::core::Matrix< T >::Matrix | ( | const Matrix< T > & | Matrix | ) |
Copy constructor
| openfluid::core::Matrix< T >::Matrix | ( | unsigned long | ColsNbr, |
| unsigned long | RowsNbr | ||
| ) |
Constructor, creates a Matrix containing Size elements
| openfluid::core::Matrix< T >::Matrix | ( | unsigned long | ColsNbr, |
| unsigned long | RowsNbr, | ||
| T | InitValue | ||
| ) |
Constructor, creates a Matrix containing Size elements, initialized with value InitValue
| virtual openfluid::core::Matrix< T >::~Matrix | ( | ) | [inline, virtual] |
Destructor
| T openfluid::core::Matrix< T >::at | ( | unsigned long | ColIndex, |
| unsigned long | RowIndex | ||
| ) | const [inline] |
Returns the element of the Matrix for index Index
| void openfluid::core::Matrix< T >::clear | ( | ) |
Clears the Matrix (empty and size is 0)
| void openfluid::core::Matrix< T >::fill | ( | const T & | Val | ) |
Fills the Matrix with given value
| T openfluid::core::Matrix< T >::get | ( | unsigned long | ColIndex, |
| unsigned long | RowIndex | ||
| ) | const [inline] |
Returns the element of the Matrix for index Index
| unsigned long openfluid::core::Matrix< T >::getColsNbr | ( | ) | const [inline] |
Returns the number of columns of the Matrix
| T* openfluid::core::Matrix< T >::getData | ( | ) | const [inline] |
Returns a pointer to the content of the Matrix (like C arrays)
| T openfluid::core::Matrix< T >::getElement | ( | unsigned long | ColIndex, |
| unsigned long | RowIndex | ||
| ) | const |
Returns the element of the Matrix for index Index
| unsigned long openfluid::core::Matrix< T >::getRowsNbr | ( | ) | const [inline] |
Returns the number of rows of the Matrix
| unsigned long openfluid::core::Matrix< T >::getSize | ( | ) | const [inline] |
| Matrix< T > & openfluid::core::Matrix< T >::operator= | ( | const Matrix< T > & | A | ) |
Allocation operator
| void openfluid::core::Matrix< T >::set | ( | unsigned long | ColIndex, |
| unsigned long | RowIndex, | ||
| T | Element | ||
| ) | [inline] |
Sets a new value for element at the given index
| void openfluid::core::Matrix< T >::setData | ( | T * | Data | ) |
Sets data from a pointer to a content (like C arrays)
| void openfluid::core::Matrix< T >::setElement | ( | unsigned long | ColIndex, |
| unsigned long | RowIndex, | ||
| T | Element | ||
| ) |
Sets a new value for element at the given index
| unsigned long openfluid::core::Matrix< T >::size | ( | ) | const [inline] |
Returns the full size of the Matrix
unsigned long openfluid::core::Matrix< T >::m_ColsNbr [protected] |
boost::multi_array<T, 2> openfluid::core::Matrix< T >::m_Data [protected] |
unsigned long openfluid::core::Matrix< T >::m_RowsNbr [protected] |
Creative Commons By-NC-ND license