![]() |
Trax3 3.1.0
trax track library
|
Matrix template for arbitrary dimensions and value type. More...
#include <C:/Trend/Development/Trax3/Code/spat/Matrix.h>

Public Types | |
| typedef Valtype | value_type |
Public Member Functions | |||||
| void | SetNull () noexcept | ||||
| Sets all elements to 0. | |||||
| constexpr unsigned short | Cols () const noexcept | ||||
| Number of columns. | |||||
| constexpr unsigned short | Rows () const noexcept | ||||
| Number of rows. | |||||
| bool | IsEqual (const Matrix &matrix, Valtype delta=0) const noexcept | ||||
| Test elements for equality up to delta distance. | |||||
| bool | operator== (const Matrix &matrix) const noexcept | ||||
| Comparison for equality. | |||||
| bool | operator!= (const Matrix &matrix) const noexcept | ||||
| Comparison for inequality. | |||||
| void | operator*= (Valtype skalar) noexcept | ||||
| Matrix * Skalar multiplication. | |||||
| void | operator*= (const Matrix< Valtype, nCols, nCols > &matrix) | ||||
| Matrix multiplication. | |||||
| void | operator/= (Valtype skalar) noexcept | ||||
| Matrix / Skalar division. | |||||
| void | operator+= (const Matrix &matrix) noexcept | ||||
| Matrix addition. | |||||
| void | operator-= (const Matrix &matrix) noexcept | ||||
| Matrix subtraction. | |||||
| const Valtype * | ptr () const noexcept | ||||
| Pointer accessor for direct copying. The memory layout is column-major order. | |||||
| Matrix< Valtype, nCols-1, nRows-1 > | SubMatrix (unsigned short c, unsigned short r) const | ||||
| Extracts the submatrix of mat wich results from omitting the row r and collumn c. | |||||
Construction | |||||
| |||||
| Matrix (const Matrix &matrix) | |||||
| Matrix (Matrix &&matrix) noexcept | |||||
| Matrix (const std::initializer_list< Valtype > &elements) | |||||
Assignment | |||||
| |||||
| Matrix & | operator= (const Matrix &matrix) noexcept | ||||
| Matrix & | operator= (Matrix &&matrix) noexcept | ||||
| Matrix & | operator= (const std::initializer_list< Valtype > &elements) noexcept | ||||
Subscripting. | |||||
| |||||
| const Valtype & | operator() (unsigned short col, unsigned short row) const noexcept | ||||
| Valtype & | operator() (unsigned short col, unsigned short row) noexcept | ||||
Matrix template for arbitrary dimensions and value type.
For special matrix types like square matrices, special derived matrix types are provided.