Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
spat::Matrix< Valtype, nCols, nRows > Class Template Reference

Matrix template for arbitrary dimensions and value type. More...

#include <C:/Trend/Development/Trax3/Code/spat/Matrix.h>

Inheritance diagram for spat::Matrix< Valtype, nCols, nRows >:

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
Parameters
matrixCreate from matrix
elementsCreate from initializer list
 Matrix (const Matrix &matrix)
 Matrix (Matrix &&matrix) noexcept
 Matrix (const std::initializer_list< Valtype > &elements)
Assignment
Parameters
matrixAssign from matrix
elementsAssign from initializer list
Matrix & operator= (const Matrix &matrix) noexcept
Matrix & operator= (Matrix &&matrix) noexcept
Matrix & operator= (const std::initializer_list< Valtype > &elements) noexcept
Subscripting.
Returns
Reference to value.
const Valtype & operator() (unsigned short col, unsigned short row) const noexcept
Valtype & operator() (unsigned short col, unsigned short row) noexcept

Detailed Description

template<typename Valtype, const unsigned short nCols, const unsigned short nRows>
class spat::Matrix< Valtype, nCols, nRows >

Matrix template for arbitrary dimensions and value type.

For special matrix types like square matrices, special derived matrix types are provided.


The documentation for this class was generated from the following files:
  • C:/Trend/Development/Trax3/Code/spat/Frame.h
  • C:/Trend/Development/Trax3/Code/spat/Matrix.h