|
primatologist-gpl 6.0.4
|
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. | |
| template<typename U> | |
| MatrixBase (const carto::VolumeRef< U > &volume) | |
| Copy constructor. | |
| template<typename U> | |
| MatrixBase (const std::vector< U > &vector) | |
| Copy constructor. | |
| ~MatrixBase () | |
| Destructor. | |
| template<typename U> | |
| MatrixBase< T > & | operator= (const carto::VolumeRef< U > &matrix) |
Assignment operator The content from other is entirely copied. | |
| template<typename U> | |
| MatrixBase< T > & | operator= (const std::vector< U > &vector) |
| Assignment operator. | |
| template<typename U> | |
| operator MatrixBase< U > () const | |
| Convertion towards a BaseMatrix of different data type. | |
| template<typename U> | |
| MatrixBase< T > & | operator*= (const MatrixBase< U > &) |
| Matrix product. | |
| MatrixBase< T > & | transpose () |
| Matrix transposition. | |
| MatrixBase< T > & | invert () |
| Matrix inversion. | |
| double | trace () const |
| Returns the trace of the matrix, i.e. | |
| int | nrow () const |
| Number of rows. | |
| int | ncol () const |
| Number of columns. | |
| int | size () const |
| Number of elements. | |
Friends | |
| MatrixBase< T > | asMatrix (carto::VolumeRef< T > &volume) |
| Interprets the volume as a matrix. | |
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.
References ncol(), and nrow().
Referenced by asMatrix, invert(), operator MatrixBase< U >(), operator*=(), operator=(), operator=(), and transpose().
| 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(), and MatrixBase().
| int aims::math::MatrixBase< T >::ncol | ( | ) | const |
Number of columns.
Definition at line 311 of file matrix_d.h.
Referenced by MatrixBase(), 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 MatrixBase(), 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.
References MatrixBase().
| MatrixBase< T > & aims::math::MatrixBase< T >::operator*= | ( | const MatrixBase< U > & | m | ) |
Matrix product.
Definition at line 129 of file matrix_d.h.
References MatrixBase().
| 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.
References aims::math::internal::CompareVolumeRefAdress< T, U >::equal(), and MatrixBase().
| MatrixBase< T > & aims::math::MatrixBase< T >::operator= | ( | const std::vector< U > & | vector | ) |
| int aims::math::MatrixBase< T >::size | ( | ) | const |
| 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 MatrixBase(), and aims::math::transpose().
|
friend |
Interprets the volume as a matrix.
Definition at line 341 of file matrix_d.h.
References MatrixBase().