#include <matrix_n.h>
Public Types | |
typedef Base | BaseType |
typedef Base | BaseType |
Public Member Functions | |
_Matrix (int r=Rows, int c=Cols) | |
_Matrix (int r=Rows, int c=Cols) | |
_Matrix< Rows, Rows, Base > | cholesky () const |
_Matrix< Rows, Rows, Base > | cholesky () const |
int | cols () const |
int | cols () const |
Base | det () const |
Base | det () const |
void | fill (Base scalar) |
void | fill (Base scalar) |
_Matrix< Rows, Rows, Base > | inverse () const |
_Matrix< Rows, Rows, Base > | inverse () const |
void | multRow (int dest, Base destFactor) |
void | multRow (int dest, Base destFactor) |
int | nullSpace (_Matrix< Rows, Cols, Base > &nullS, Base epsilon=std::numeric_limits< Base >::epsilon()) const |
int | nullSpace (_Matrix< Rows, Cols, Base > &nullS, Base epsilon=std::numeric_limits< Base >::epsilon()) const |
_Matrix< Rows, Cols, Base > | operator* (Base c) const |
_Matrix< Rows, Cols, Base > | operator* (Base c) const |
template<int Rows1, int Cols1> | |
_Matrix< Rows, Cols1, Base > | operator* (const _Matrix< Rows1, Cols1, Base > &m) const |
template<int Rows1, int Cols1> | |
_Matrix< Rows, Cols1, Base > | operator* (const _Matrix< Rows1, Cols1, Base > &m) const |
_Vector< Rows, Base > | operator* (const _Vector< Cols, Base > &v) const |
_Vector< Rows, Base > | operator* (const _Vector< Cols, Base > &v) const |
_Matrix< Rows, Cols, Base > & | operator*= (const _Matrix< Rows, Cols, Base > &m) |
_Matrix< Rows, Cols, Base > & | operator*= (const _Matrix< Rows, Cols, Base > &m) |
_Matrix< Rows, Cols, Base > & | operator*= (Base c) |
_Matrix< Rows, Cols, Base > & | operator*= (Base c) |
_Matrix< Rows, Cols, Base > | operator+ (const _Matrix< Rows, Cols, Base > &v) const |
_Matrix< Rows, Cols, Base > | operator+ (const _Matrix< Rows, Cols, Base > &v) const |
_Matrix< Rows, Cols, Base > & | operator+= (const _Matrix< Rows, Cols, Base > &v) |
_Matrix< Rows, Cols, Base > & | operator+= (const _Matrix< Rows, Cols, Base > &v) |
_Matrix< Rows, Cols, Base > | operator- (const _Matrix< Rows, Cols, Base > &v) const |
_Matrix< Rows, Cols, Base > | operator- (const _Matrix< Rows, Cols, Base > &v) const |
_Matrix< Rows, Cols, Base > & | operator-= (const _Matrix< Rows, Cols, Base > &v) |
_Matrix< Rows, Cols, Base > & | operator-= (const _Matrix< Rows, Cols, Base > &v) |
const Base * | operator[] (int row) const |
const Base * | operator[] (int row) const |
Base * | operator[] (int row) |
Base * | operator[] (int row) |
int | rows () const |
int | rows () const |
void | sumRow (int dest, Base destFactor, int src, Base srcFactor) |
void | sumRow (int dest, Base destFactor, int src, Base srcFactor) |
void | swapRows (int r1, int r2) |
void | swapRows (int r1, int r2) |
_Matrix< Cols, Rows, Base > | transpose () const |
_Matrix< Cols, Rows, Base > | transpose () const |
_Matrix< Cols, Rows, Base > & | transposeInPlace () |
_Matrix< Cols, Rows, Base > & | transposeInPlace () |
Static Public Member Functions | |
static _Matrix< Rows, Rows, Base > | diag (const _Vector< Rows, Base > &v) |
static _Matrix< Rows, Rows, Base > | diag (const _Vector< Rows, Base > &v) |
static _Matrix< Rows, Rows, Base > | eye (Base factor, int dim=Rows) |
static _Matrix< Rows, Rows, Base > | eye (Base factor, int dim=Rows) |
static _Matrix< Rows, Rows, Base > | outerProduct (const _Vector< Rows, Base > &v1, const _Vector< Rows, Base > &v2) |
static _Matrix< Rows, Rows, Base > | outerProduct (const _Vector< Rows, Base > &v1, const _Vector< Rows, Base > &v2) |
static _Matrix< Rows, Rows, Base > | permutation (const _Vector< Rows, int > &p) |
static _Matrix< Rows, Rows, Base > | permutation (const _Vector< Rows, int > &p) |
Public Attributes | |
_Array2DAllocator< Rows, Cols, Base > | _allocator |
This class implements a matrix. The meory model can be either static or dynamic. Here the same considerations as for the vector class hold.
You can access the elemets of a matrix with A[i][j] in avery nice way. Multiply, sum and do anything with matrices pretty much as when you write atrix expressions. All functions are more or less as one expects them in a regular matrix algebra.
Once again it is recommended to use the fixed size matrices whenever the size is known.
Definition at line 39 of file include/hogman_minimal/math/matrix_n.h.
typedef Base _Matrix< Rows, Cols, Base >::BaseType |
Definition at line 40 of file include/hogman_minimal/math/matrix_n.h.
typedef Base _Matrix< Rows, Cols, Base >::BaseType |
Definition at line 40 of file src/math/matrix_n.h.
_Matrix< Rows, Cols, Base >::_Matrix | ( | int | r = Rows , |
int | c = Cols |
||
) | [inline] |
Definition at line 42 of file include/hogman_minimal/math/matrix_n.h.
_Matrix< Rows, Cols, Base >::_Matrix | ( | int | r = Rows , |
int | c = Cols |
||
) | [inline] |
Definition at line 42 of file src/math/matrix_n.h.
_Matrix< Rows, Rows, Base > _Matrix< Rows, Cols, Base >::cholesky | ( | ) | const |
Definition at line 249 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Rows, Rows, Base> _Matrix< Rows, Cols, Base >::cholesky | ( | ) | const |
int _Matrix< Rows, Cols, Base >::cols | ( | ) | const [inline] |
Definition at line 45 of file include/hogman_minimal/math/matrix_n.h.
int _Matrix< Rows, Cols, Base >::cols | ( | ) | const [inline] |
Definition at line 45 of file src/math/matrix_n.h.
Definition at line 273 of file include/hogman_minimal/math/matrix_n.hpp.
Base _Matrix< Rows, Cols, Base >::det | ( | ) | const |
_Matrix< Rows, Rows, Base > _Matrix< Rows, Cols, Base >::diag | ( | const _Vector< Rows, Base > & | v | ) | [static] |
Definition at line 104 of file include/hogman_minimal/math/matrix_n.hpp.
static _Matrix<Rows, Rows, Base> _Matrix< Rows, Cols, Base >::diag | ( | const _Vector< Rows, Base > & | v | ) | [static] |
_Matrix< Rows, Rows, Base > _Matrix< Rows, Cols, Base >::eye | ( | Base | factor, |
int | dim = Rows |
||
) | [static] |
Definition at line 92 of file include/hogman_minimal/math/matrix_n.hpp.
static _Matrix<Rows, Rows, Base> _Matrix< Rows, Cols, Base >::eye | ( | Base | factor, |
int | dim = Rows |
||
) | [static] |
void _Matrix< Rows, Cols, Base >::fill | ( | Base | scalar | ) |
Definition at line 408 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix< Rows, Rows, Base > _Matrix< Rows, Cols, Base >::inverse | ( | ) | const |
Reimplemented in _RotationMatrix< N, Base >, _RotationMatrix< N, Base >, _RotationMatrix< 3, Base >, _RotationMatrix< 3, Base >, _RotationMatrix< 2, Base >, and _RotationMatrix< 2, Base >.
Definition at line 189 of file include/hogman_minimal/math/matrix_n.hpp.
void _Matrix< Rows, Cols, Base >::multRow | ( | int | dest, |
Base | destFactor | ||
) |
Definition at line 181 of file include/hogman_minimal/math/matrix_n.hpp.
void _Matrix< Rows, Cols, Base >::multRow | ( | int | dest, |
Base | destFactor | ||
) |
int _Matrix< Rows, Cols, Base >::nullSpace | ( | _Matrix< Rows, Cols, Base > & | nullS, |
Base | epsilon = std::numeric_limits<Base>::epsilon() |
||
) | const |
Definition at line 313 of file include/hogman_minimal/math/matrix_n.hpp.
int _Matrix< Rows, Cols, Base >::nullSpace | ( | _Matrix< Rows, Cols, Base > & | nullS, |
Base | epsilon = std::numeric_limits< Base >::epsilon() |
||
) | const |
_Matrix<Rows, Cols, Base> _Matrix< Rows, Cols, Base >::operator* | ( | Base | c | ) | const |
_Matrix< Rows, Cols, Base > _Matrix< Rows, Cols, Base >::operator* | ( | Base | c | ) | const |
Definition at line 57 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Rows, Cols1, Base> _Matrix< Rows, Cols, Base >::operator* | ( | const _Matrix< Rows1, Cols1, Base > & | m | ) | const |
_Matrix< Rows, Cols1, Base > _Matrix< Rows, Cols, Base >::operator* | ( | const _Matrix< Rows1, Cols1, Base > & | m | ) | const |
Definition at line 141 of file include/hogman_minimal/math/matrix_n.hpp.
_Vector<Rows, Base> _Matrix< Rows, Cols, Base >::operator* | ( | const _Vector< Cols, Base > & | v | ) | const |
_Vector< Rows, Base > _Matrix< Rows, Cols, Base >::operator* | ( | const _Vector< Cols, Base > & | v | ) | const |
Definition at line 388 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix< Rows, Cols, Base > & _Matrix< Rows, Cols, Base >::operator*= | ( | const _Matrix< Rows, Cols, Base > & | m | ) |
Definition at line 156 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Rows, Cols, Base>& _Matrix< Rows, Cols, Base >::operator*= | ( | const _Matrix< Rows, Cols, Base > & | m | ) |
_Matrix<Rows, Cols, Base>& _Matrix< Rows, Cols, Base >::operator*= | ( | Base | c | ) |
_Matrix< Rows, Cols, Base > & _Matrix< Rows, Cols, Base >::operator*= | ( | Base | c | ) |
Definition at line 49 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Rows, Cols, Base> _Matrix< Rows, Cols, Base >::operator+ | ( | const _Matrix< Rows, Cols, Base > & | v | ) | const |
_Matrix< Rows, Cols, Base > _Matrix< Rows, Cols, Base >::operator+ | ( | const _Matrix< Rows, Cols, Base > & | v | ) | const |
Definition at line 42 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Rows, Cols, Base>& _Matrix< Rows, Cols, Base >::operator+= | ( | const _Matrix< Rows, Cols, Base > & | v | ) |
_Matrix< Rows, Cols, Base > & _Matrix< Rows, Cols, Base >::operator+= | ( | const _Matrix< Rows, Cols, Base > & | v | ) |
Definition at line 19 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix< Rows, Cols, Base > _Matrix< Rows, Cols, Base >::operator- | ( | const _Matrix< Rows, Cols, Base > & | v | ) | const |
Definition at line 35 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Rows, Cols, Base> _Matrix< Rows, Cols, Base >::operator- | ( | const _Matrix< Rows, Cols, Base > & | v | ) | const |
_Matrix<Rows, Cols, Base>& _Matrix< Rows, Cols, Base >::operator-= | ( | const _Matrix< Rows, Cols, Base > & | v | ) |
_Matrix< Rows, Cols, Base > & _Matrix< Rows, Cols, Base >::operator-= | ( | const _Matrix< Rows, Cols, Base > & | v | ) |
Definition at line 27 of file include/hogman_minimal/math/matrix_n.hpp.
const Base* _Matrix< Rows, Cols, Base >::operator[] | ( | int | row | ) | const [inline] |
Definition at line 43 of file src/math/matrix_n.h.
const Base* _Matrix< Rows, Cols, Base >::operator[] | ( | int | row | ) | const [inline] |
Definition at line 43 of file include/hogman_minimal/math/matrix_n.h.
Base* _Matrix< Rows, Cols, Base >::operator[] | ( | int | row | ) | [inline] |
Definition at line 44 of file src/math/matrix_n.h.
Base* _Matrix< Rows, Cols, Base >::operator[] | ( | int | row | ) | [inline] |
Definition at line 44 of file include/hogman_minimal/math/matrix_n.h.
_Matrix< Rows, Rows, Base > _Matrix< Rows, Cols, Base >::outerProduct | ( | const _Vector< Rows, Base > & | v1, |
const _Vector< Rows, Base > & | v2 | ||
) | [static] |
Definition at line 128 of file include/hogman_minimal/math/matrix_n.hpp.
static _Matrix<Rows, Rows, Base> _Matrix< Rows, Cols, Base >::outerProduct | ( | const _Vector< Rows, Base > & | v1, |
const _Vector< Rows, Base > & | v2 | ||
) | [static] |
static _Matrix<Rows, Rows, Base> _Matrix< Rows, Cols, Base >::permutation | ( | const _Vector< Rows, int > & | p | ) | [static] |
_Matrix< Rows, Rows, Base > _Matrix< Rows, Cols, Base >::permutation | ( | const _Vector< Rows, int > & | p | ) | [static] |
Definition at line 116 of file include/hogman_minimal/math/matrix_n.hpp.
int _Matrix< Rows, Cols, Base >::rows | ( | ) | const [inline] |
Definition at line 46 of file src/math/matrix_n.h.
int _Matrix< Rows, Cols, Base >::rows | ( | ) | const [inline] |
Definition at line 46 of file include/hogman_minimal/math/matrix_n.h.
void _Matrix< Rows, Cols, Base >::sumRow | ( | int | dest, |
Base | destFactor, | ||
int | src, | ||
Base | srcFactor | ||
) |
Definition at line 174 of file include/hogman_minimal/math/matrix_n.hpp.
void _Matrix< Rows, Cols, Base >::sumRow | ( | int | dest, |
Base | destFactor, | ||
int | src, | ||
Base | srcFactor | ||
) |
void _Matrix< Rows, Cols, Base >::swapRows | ( | int | r1, |
int | r2 | ||
) |
void _Matrix< Rows, Cols, Base >::swapRows | ( | int | r1, |
int | r2 | ||
) |
Definition at line 165 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Cols, Rows, Base> _Matrix< Rows, Cols, Base >::transpose | ( | ) | const |
_Matrix< Cols, Rows, Base > _Matrix< Rows, Cols, Base >::transpose | ( | ) | const |
Definition at line 65 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix< Cols, Rows, Base > & _Matrix< Rows, Cols, Base >::transposeInPlace | ( | ) |
Definition at line 74 of file include/hogman_minimal/math/matrix_n.hpp.
_Matrix<Cols, Rows, Base>& _Matrix< Rows, Cols, Base >::transposeInPlace | ( | ) |
_Array2DAllocator< Rows, Cols, Base > _Matrix< Rows, Cols, Base >::_allocator |
Definition at line 75 of file include/hogman_minimal/math/matrix_n.h.