|
primatologist-gpl
5.0.5
|
Matrix class implementing matrix operations. More...
#include <primatologist/math/matrix.h>


Public Member Functions | |
| MatrixBase (int nrow=1, int ncol=1) | |
| Standard constructor Allocate a matrix of size nrow x ncol. More... | |
| template<typename U > | |
| MatrixBase (const carto::VolumeRef< U > &volume) | |
| Copy constructor. More... | |
| template<typename U > | |
| MatrixBase (const std::vector< U > &vector) | |
| Copy constructor. More... | |
| ~MatrixBase () | |
| Destructor. More... | |
| template<typename U > | |
| MatrixBase< T > & | operator= (const carto::VolumeRef< U > &matrix) |
Assignment operator The content from other is entirely copied. More... | |
| template<typename U > | |
| MatrixBase< T > & | operator= (const std::vector< U > &vector) |
| Assignment operator. More... | |
| template<typename U > | |
| operator MatrixBase< U > () const | |
| Convertion towards a BaseMatrix of different data type. More... | |
| template<typename U > | |
| MatrixBase< T > & | operator*= (const MatrixBase< U > &) |
| Matrix product. More... | |
| MatrixBase< T > & | transpose () |
| Matrix transposition. More... | |
| MatrixBase< T > & | invert () |
| Matrix inversion. More... | |
| double | trace () const |
| Returns the trace of the matrix, i.e. More... | |
| int | nrow () const |
| Number of rows. More... | |
| int | ncol () const |
| Number of columns. More... | |
| int | size () const |
| Number of elements. More... | |
Friends | |
| MatrixBase< T > | asMatrix (carto::VolumeRef< T > &) |
| Interprets the volume as a matrix. More... | |
Matrix class implementing matrix operations.
| aims::math::MatrixBase< T >::MatrixBase | ( | int | nrow = 1, |
| int | ncol = 1 |
||
| ) |
Standard constructor Allocate a matrix of size nrow x ncol.
Definition at line 30 of file matrix_d.h.
Referenced by aims::math::MatrixBase< T >::operator=().
| aims::math::MatrixBase< T >::MatrixBase | ( | const carto::VolumeRef< U > & | volume | ) |
Copy constructor.
The other volume X direction allows to access rows and its Y direction accesses columns. The other volume is entirely copied: no data is shared. In order to interpret a volume as a matrix with data sharing, use the asMatrix() utility function.
Definition at line 38 of file matrix_d.h.
| aims::math::MatrixBase< T >::MatrixBase | ( | const std::vector< U > & | vector | ) |
| aims::math::MatrixBase< T >::~MatrixBase | ( | ) |
Destructor.
Definition at line 53 of file matrix_d.h.
| MatrixBase< T > & aims::math::MatrixBase< T >::invert | ( | ) |
Matrix inversion.
Definition at line 175 of file matrix_d.h.
References aims::math::invert().
| int aims::math::MatrixBase< T >::ncol | ( | ) | const |
Number of columns.
Definition at line 311 of file matrix_d.h.
Referenced by aims::math::operator*(), aims::math::operator==(), and aims::math::transpose().
| int aims::math::MatrixBase< T >::nrow | ( | ) | const |
Number of rows.
Definition at line 305 of file matrix_d.h.
Referenced by aims::math::operator*(), aims::math::operator==(), and aims::math::transpose().
| aims::math::MatrixBase< T >::operator MatrixBase< U > | ( | ) | const |
Convertion towards a BaseMatrix of different data type.
Definition at line 118 of file matrix_d.h.
| MatrixBase< T > & aims::math::MatrixBase< T >::operator*= | ( | const MatrixBase< U > & | m | ) |
Matrix product.
Definition at line 129 of file matrix_d.h.
| MatrixBase< T > & aims::math::MatrixBase< T >::operator= | ( | const carto::VolumeRef< U > & | matrix | ) |
Assignment operator The content from other is entirely copied.
No data is shared.
Definition at line 84 of file matrix_d.h.
| MatrixBase< T > & aims::math::MatrixBase< T >::operator= | ( | const std::vector< U > & | vector | ) |
Assignment operator.
Definition at line 95 of file matrix_d.h.
References at(), and aims::math::MatrixBase< T >::MatrixBase().
| int aims::math::MatrixBase< T >::size | ( | void | ) | const |
Number of elements.
Definition at line 317 of file matrix_d.h.
| double aims::math::MatrixBase< T >::trace | ( | ) | const |
Returns the trace of the matrix, i.e.
the sum of its diagonal elements.
| MatrixBase< T > & aims::math::MatrixBase< T >::transpose | ( | ) |
Matrix transposition.
Definition at line 158 of file matrix_d.h.
References aims::math::transpose().
|
friend |
Interprets the volume as a matrix.
Definition at line 341 of file matrix_d.h.
Referenced by aims::math::invert(), aims::math::operator*(), aims::math::operator+(), aims::math::operator-(), and aims::math::operator/().