JUK1
StaticMatrix< T, M, N, ST > Struct Template Reference

A compile-time sized matrix. More...

#include <StaticMatrix.hpp>

Inheritance diagram for StaticMatrix< T, M, N, ST >:

Public Member Functions

 StaticMatrix ()
 
 StaticMatrix (T initialValue)
 
void fill (T fillVal)
 
StaticRow< T, N > & operator[] (size_t index)
 
StaticRow< T, N > operator[] (size_t index) const
 
void rowAddition (size_t destinationRow, size_t sourceRow, T scalingFactor)
 
void swapRows (size_t row1, size_t row2)
 
StaticMatrix< T, N, M > transpose ()
 
template<size_t N2>
StaticMatrix< T, M, N2 > multiply (const StaticMatrix< T, N, N2 > &rhs) const
 
template<size_t N2>
void multiply (const StaticMatrix< T, N, N2 > &rhs, StaticMatrix< T, M, N2 > &dest) const
 
StaticMatrix< T, M, N > add (const StaticMatrix< T, M, N > &rhs) const
 
void add (const StaticMatrix< T, M, N > &rhs, StaticMatrix< T, M, N > &dest) const
 
StaticMatrix< T, M, N > subtract (const StaticMatrix< T, N, N > &rhs) const
 
void subtract (const StaticMatrix< T, N, N > &rhs, StaticMatrix< T, M, N > &dest) const
 
std::string toString () const
 
StaticLUPair< T, M > luPair () const
 
void luPair (StaticLUPair< T, M > &dest) const
 
StaticMatrix< T, M, 1 > leftDivide (const StaticMatrix< T, M, 1 > &rhs) const
 
void leftDivide (const StaticMatrix< T, M, 1 > &rhs, const StaticLUPair< T, M > &lu, StaticMatrix< T, M, 1 > &scratchSpace, StaticMatrix< T, M, 1 > &dest) const
 

Public Attributes

ST rows
 

Static Public Attributes

static constexpr size_t sizeM = M
 
static constexpr size_t sizeN = N
 

Detailed Description

template<typename T, size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
struct StaticMatrix< T, M, N, ST >

A compile-time sized matrix.

Template Parameters
TThe value type
MThe matrix column length
NThe row length
STthe type of storage used (vector vs array)

Definition at line 108 of file StaticMatrix.hpp.

Constructor & Destructor Documentation

◆ StaticMatrix() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticMatrix< T, M, N, ST >::StaticMatrix ( )
inline

Definition at line 111 of file StaticMatrix.hpp.

◆ StaticMatrix() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticMatrix< T, M, N, ST >::StaticMatrix ( initialValue)
inline

Definition at line 117 of file StaticMatrix.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticMatrix<T, M, N> StaticMatrix< T, M, N, ST >::add ( const StaticMatrix< T, M, N > &  rhs) const
inline

Definition at line 210 of file StaticMatrix.hpp.

Here is the caller graph for this function:

◆ add() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::add ( const StaticMatrix< T, M, N > &  rhs,
StaticMatrix< T, M, N > &  dest 
) const
inline

Definition at line 216 of file StaticMatrix.hpp.

◆ fill()

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::fill ( fillVal)
inline

Definition at line 145 of file StaticMatrix.hpp.

Here is the caller graph for this function:

◆ leftDivide() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticMatrix<T, M, 1> StaticMatrix< T, M, N, ST >::leftDivide ( const StaticMatrix< T, M, 1 > &  rhs) const
inline

Definition at line 302 of file StaticMatrix.hpp.

Here is the call graph for this function:

◆ leftDivide() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::leftDivide ( const StaticMatrix< T, M, 1 > &  rhs,
const StaticLUPair< T, M > &  lu,
StaticMatrix< T, M, 1 > &  scratchSpace,
StaticMatrix< T, M, 1 > &  dest 
) const
inline

Definition at line 310 of file StaticMatrix.hpp.

◆ luPair() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticLUPair<T, M> StaticMatrix< T, M, N, ST >::luPair ( ) const
inline

Definition at line 252 of file StaticMatrix.hpp.

Here is the caller graph for this function:

◆ luPair() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::luPair ( StaticLUPair< T, M > &  dest) const
inline

Definition at line 260 of file StaticMatrix.hpp.

Here is the call graph for this function:

◆ multiply() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
template<size_t N2>
StaticMatrix<T, M, N2> StaticMatrix< T, M, N, ST >::multiply ( const StaticMatrix< T, N, N2 > &  rhs) const
inline

Definition at line 182 of file StaticMatrix.hpp.

◆ multiply() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
template<size_t N2>
void StaticMatrix< T, M, N, ST >::multiply ( const StaticMatrix< T, N, N2 > &  rhs,
StaticMatrix< T, M, N2 > &  dest 
) const
inline

Definition at line 189 of file StaticMatrix.hpp.

◆ operator[]() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticRow<T, N>& StaticMatrix< T, M, N, ST >::operator[] ( size_t  index)
inline

Definition at line 151 of file StaticMatrix.hpp.

◆ operator[]() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticRow<T, N> StaticMatrix< T, M, N, ST >::operator[] ( size_t  index) const
inline

Definition at line 155 of file StaticMatrix.hpp.

◆ rowAddition()

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::rowAddition ( size_t  destinationRow,
size_t  sourceRow,
scalingFactor 
)
inline

Definition at line 159 of file StaticMatrix.hpp.

Here is the caller graph for this function:

◆ subtract() [1/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticMatrix<T, M, N> StaticMatrix< T, M, N, ST >::subtract ( const StaticMatrix< T, N, N > &  rhs) const
inline

Definition at line 224 of file StaticMatrix.hpp.

Here is the call graph for this function:

◆ subtract() [2/2]

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::subtract ( const StaticMatrix< T, N, N > &  rhs,
StaticMatrix< T, M, N > &  dest 
) const
inline

Definition at line 231 of file StaticMatrix.hpp.

◆ swapRows()

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
void StaticMatrix< T, M, N, ST >::swapRows ( size_t  row1,
size_t  row2 
)
inline

Definition at line 167 of file StaticMatrix.hpp.

Here is the caller graph for this function:

◆ toString()

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
std::string StaticMatrix< T, M, N, ST >::toString ( ) const
inline

Definition at line 239 of file StaticMatrix.hpp.

Here is the caller graph for this function:

◆ transpose()

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
StaticMatrix<T, N, M> StaticMatrix< T, M, N, ST >::transpose ( )
inline

Definition at line 171 of file StaticMatrix.hpp.

Member Data Documentation

◆ rows

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
ST StaticMatrix< T, M, N, ST >::rows

Definition at line 109 of file StaticMatrix.hpp.

◆ sizeM

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
constexpr size_t StaticMatrix< T, M, N, ST >::sizeM = M
staticconstexpr

Definition at line 142 of file StaticMatrix.hpp.

◆ sizeN

template<typename T , size_t M, size_t N = M, typename ST = storageType<StaticRow<T, N>, M>>
constexpr size_t StaticMatrix< T, M, N, ST >::sizeN = N
staticconstexpr

Definition at line 143 of file StaticMatrix.hpp.


The documentation for this struct was generated from the following file: