|
|
void | SetIdentity () noexcept |
| | Sets the matrix to the identity matrix (i.e. all 1 in diagonal, 0 for everything else).
|
| bool | IsIdentity (Valtype epsilon=0) const noexcept |
| bool | IsDiagonal () const noexcept |
| bool | IsSymmetric (Valtype epsilon=0) const noexcept |
|
SquareMatrix & | Transpose () noexcept |
| | Change colums and rows.
|
|
SquareMatrix & | Invert () |
| | Invert matrix so that M*I == Identity.
|
| Valtype | Trace () const noexcept |
| | Trace of the matrix, wich is the sum of all element with same indices.
|
|
const Valtype & | operator() (unsigned short col, unsigned short row) const noexcept |
|
Valtype & | operator() (unsigned short col, unsigned short row) noexcept |
- Parameters
-
| matrix | Construct from matrix |
| elements | Create from initializer list |
|
|
| SquareMatrix (const SquareMatrix &)=default |
|
| SquareMatrix (const Basetype &matrix) |
|
| SquareMatrix (Basetype &&matrix) noexcept |
|
| SquareMatrix (const std::initializer_list< Valtype > &elements) |
|
|
Matrix & | operator= (const Matrix &matrix) noexcept |
|
Matrix & | operator= (Matrix &&matrix) noexcept |
|
Matrix & | operator= (const std::initializer_list< Valtype > &elements) noexcept |
|
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.
|
|
| Matrix (const Matrix &matrix) |
|
| Matrix (Matrix &&matrix) noexcept |
|
| Matrix (const std::initializer_list< Valtype > &elements) |
|
Matrix & | operator= (const Matrix &matrix) noexcept |
|
Matrix & | operator= (Matrix &&matrix) noexcept |
|
Matrix & | operator= (const std::initializer_list< Valtype > &elements) noexcept |
|
const Valtype & | operator() (unsigned short col, unsigned short row) const noexcept |
|
Valtype & | operator() (unsigned short col, unsigned short row) noexcept |
template<typename Valtype, const unsigned short nColsAndRows>
class spat::SquareMatrix< Valtype, nColsAndRows >
Square matrix with nColumns == nRows.
Some special operations like determinant calculation are provided.