A template-based symmetric matrix class, size fixed at compile time. This primitive template-based matrix class should be used where the matrix size is fixed at compile time.
More...
|
| SymMatrix () |
| Default constructor, does nothing and no initialization.
|
|
| SymMatrix (const T &t) |
| Explicit constructor, initializes all elements to value t.
|
|
| SymMatrix (const SymMatrix< T, SX > &m) |
| Copy constructor.
|
|
const SymMatrix< T, SX > & | operator= (const SymMatrix< T, SX > &m) |
| Equality operator.
|
|
const T & | get (unsigned x, unsigned y) const |
| Retrieve value at row x column y. Bounds checking is done in a debug compile.
|
|
T & | get (unsigned x, unsigned y) |
| Retrieve value at row x column y. Bounds checking is done in a debug compile.
|
|
const Column | operator[] (unsigned y) const |
| Array access operator returns a Column helper class, which has it's own [] operator to access a column of the row.
|
|
Column | operator[] (unsigned y) |
| Array access operator returns a Column helper class, which has it's own [] operator to access a column of the row.
|
|
const T & | operator() (unsigned x, unsigned y) const |
| () operator access to get(x,y)
|
|
T & | operator() (unsigned x, unsigned y) |
| () operator access to get(x,y)
|
|
constexpr UVect2 | size () const |
|
const SymMatrix< T, SX > & | operator+= (const SymMatrix< T, SX > &m) |
| In-place matrix addition.
|
|
const SymMatrix< T, SX > & | operator-= (const SymMatrix< T, SX > &m) |
| In-place matrix subtraction.
|
|
const SymMatrix< T, SX > & | operator*= (const T &t) |
| In-place multiplication by a scalar.
|
|
const SymMatrix< T, SX > & | operator/= (const T &t) |
| In-place division by a scalar.
|
|
SymMatrix< T, SX > | operator+ (const SymMatrix< T, SX > &m) const |
| Binary addition operator for a symetric matris.
|
|
Matrix< T, SX, SX > | operator+ (const Matrix< T, SX, SX > &m) const |
| Binary addition operator.
|
|
SymMatrix< T, SX > | operator- (const SymMatrix< T, SX > &m) const |
| Binary subtraction operator for a symetric matrix.
|
|
Matrix< T, SX, SX > | operator- (const Matrix< T, SX, SX > &m) const |
| Binary subtraction operator.
|
|
SymMatrix< T, SX > | operator* (const T &t) const |
| Binary scalar multiplication operator for a symetric matrix.
|
|
SymMatrix< T, SX > | operator/ (const T &t) const |
| Binary scalar division operator for a symetric matrix.
|
|
Matrix< T, SX, SX > | operator* (const SymMatrix< T, SX > &m) const |
| Binary matrix multiplication operator – simplest naive approach.
|
|
template<unsigned SZ> |
Matrix< T, SX, SZ > | operator* (const Matrix< T, SX, SZ > &m) const |
| Binary matrix multiplication operator – simplest naive approach.
|
|
template<unsigned BX, unsigned BY, unsigned SX2, unsigned SY2> |
void | addBlock (const Matrix< T, SX2, SY2 > &m, unsigned iSrc, unsigned jSrc, unsigned iDst, unsigned jDst) |
| Adds a block to this matrix from matrix m using the block size (BX,BY), from block indices (iSrc,jSrc) to block indices (iDst,jDst)
|
|
template<unsigned BX, unsigned BY, unsigned SX2> |
void | addBlock (const SymMatrix< T, SX2 > &m, unsigned iSrc, unsigned jSrc, unsigned iDst, unsigned jDst) |
| Adds a block to this matrix from matrix m using the block size (BX,BY), from block indices (iSrc,jSrc) to block indices (iDst,jDst)
|
|
template<unsigned BX, unsigned BY, unsigned SX2, unsigned SY2> |
void | addGenBlock (const Matrix< T, SX2, SY2 > &m, unsigned iSrc, unsigned jSrc, unsigned iDst, unsigned jDst) |
| Adds a block to this matrix from matrix m using the block size (BX,BY), from normal not block indices (iSrc,jSrc) to (iDst,jDst)
|
|
template<unsigned BX, unsigned BY, unsigned SX2> |
void | addGenBlock (const SymMatrix< T, SX2 > &m, unsigned iSrc, unsigned jSrc, unsigned iDst, unsigned jDst) |
| Adds a block to this matrix from matrix m using the block size (BX,BY), from normal not block indices (iSrc,jSrc) to (iDst,jDst)
|
|
T | maxNorm () const |
| Returns the infinity norm of the matrix, or the maximum absolute magnitude of any element.
|
|
SymMatrix< T, SX > | transpose () const |
| Return the transpose of the matrix.
|
|
T | trace () const |
| Return the trace of the matrix or the sum of the diagonal components. Works also if the matrix is not square.
|
|
void | set (const T &t=T()) |
| Sets all matrix elements to t.
|
|
constexpr T | minEntry () const |
|
constexpr T | maxEntry () const |
|
Matrix< T, SX, SX > | toMatrix () const |
| Returns its copy.
|
|
template<class T, unsigned SX>
class SymMatrix< T, SX >
A template-based symmetric matrix class, size fixed at compile time. This primitive template-based matrix class should be used where the matrix size is fixed at compile time.