JUK1
Matrix< T > Struct Template Reference

A matrix class with support for LU-decomposition, and left division. More...

#include <DynamicMatrix.hpp>

Inheritance diagram for Matrix< T >:

Public Member Functions

 Matrix (size_t M, size_t N)
 
 Matrix (size_t M, size_t N, T initialValue)
 
T & operator() (size_t m, size_t n)
 
const T & operator() (size_t m, size_t n) const
 
void fill (T fillVal)
 
void rowAddition (size_t destinationRow, size_t sourceRow, T scalingFactor)
 
void swapRows (size_t row1, size_t row2)
 
Matrix< T > transpose ()
 
Matrix< T > multiply (const Matrix< T > &rhs) const
 
void multiply (const Matrix< T > &rhs, Matrix< T > &dest) const
 
Matrix< T > add (const Matrix< T > &rhs) const
 
void add (const Matrix< T > &rhs, Matrix< T > &dest) const
 
Matrix< T > subtract (const Matrix< T > &rhs) const
 
void subtract (const Matrix< T > &rhs, Matrix< T > &dest) const
 
std::string toString () const
 
LUPair< T > luPair () const
 
void luPair (LUPair< T > &dest) const
 
Matrix< T > leftDivide (const Matrix< T > &rhs) const
 
void leftDivide (const Matrix< T > &rhs, const LUPair< T > &lu, Matrix< T > &scratchSpace, Matrix< T > &dest) const
 
template<typename Iterator >
void leftDivide (const Matrix< T > &rhs, const LUPair< T > &lu, Matrix< T > &scratchSpace, Iterator destBegin, Iterator destEnd) const
 

Public Attributes

std::vector< T > data
 
size_t M
 
size_t N
 

Detailed Description

template<typename T>
struct Matrix< T >

A matrix class with support for LU-decomposition, and left division.

Template Parameters
T

Definition at line 55 of file DynamicMatrix.hpp.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

template<typename T >
Matrix< T >::Matrix ( size_t  M,
size_t  N 
)
inline

Definition at line 60 of file DynamicMatrix.hpp.

◆ Matrix() [2/2]

template<typename T >
Matrix< T >::Matrix ( size_t  M,
size_t  N,
initialValue 
)
inline

Definition at line 64 of file DynamicMatrix.hpp.

Member Function Documentation

◆ add() [1/2]

template<typename T >
Matrix<T> Matrix< T >::add ( const Matrix< T > &  rhs) const
inline

Definition at line 133 of file DynamicMatrix.hpp.

Here is the caller graph for this function:

◆ add() [2/2]

template<typename T >
void Matrix< T >::add ( const Matrix< T > &  rhs,
Matrix< T > &  dest 
) const
inline

Definition at line 140 of file DynamicMatrix.hpp.

◆ fill()

template<typename T >
void Matrix< T >::fill ( fillVal)
inline

Definition at line 76 of file DynamicMatrix.hpp.

◆ leftDivide() [1/3]

template<typename T >
Matrix<T> Matrix< T >::leftDivide ( const Matrix< T > &  rhs) const
inline

Definition at line 225 of file DynamicMatrix.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ leftDivide() [2/3]

template<typename T >
template<typename Iterator >
void Matrix< T >::leftDivide ( const Matrix< T > &  rhs,
const LUPair< T > &  lu,
Matrix< T > &  scratchSpace,
Iterator  destBegin,
Iterator  destEnd 
) const
inline

Definition at line 240 of file DynamicMatrix.hpp.

◆ leftDivide() [3/3]

template<typename T >
void Matrix< T >::leftDivide ( const Matrix< T > &  rhs,
const LUPair< T > &  lu,
Matrix< T > &  scratchSpace,
Matrix< T > &  dest 
) const
inline

Definition at line 233 of file DynamicMatrix.hpp.

Here is the call graph for this function:

◆ luPair() [1/2]

template<typename T >
LUPair<T> Matrix< T >::luPair ( ) const
inline

Definition at line 177 of file DynamicMatrix.hpp.

Here is the caller graph for this function:

◆ luPair() [2/2]

template<typename T >
void Matrix< T >::luPair ( LUPair< T > &  dest) const
inline

Definition at line 185 of file DynamicMatrix.hpp.

Here is the call graph for this function:

◆ multiply() [1/2]

template<typename T >
Matrix<T> Matrix< T >::multiply ( const Matrix< T > &  rhs) const
inline

Definition at line 105 of file DynamicMatrix.hpp.

◆ multiply() [2/2]

template<typename T >
void Matrix< T >::multiply ( const Matrix< T > &  rhs,
Matrix< T > &  dest 
) const
inline

Definition at line 112 of file DynamicMatrix.hpp.

◆ operator()() [1/2]

template<typename T >
T& Matrix< T >::operator() ( size_t  m,
size_t  n 
)
inline

Definition at line 68 of file DynamicMatrix.hpp.

◆ operator()() [2/2]

template<typename T >
const T& Matrix< T >::operator() ( size_t  m,
size_t  n 
) const
inline

Definition at line 72 of file DynamicMatrix.hpp.

◆ rowAddition()

template<typename T >
void Matrix< T >::rowAddition ( size_t  destinationRow,
size_t  sourceRow,
scalingFactor 
)
inline

Definition at line 82 of file DynamicMatrix.hpp.

◆ subtract() [1/2]

template<typename T >
Matrix<T> Matrix< T >::subtract ( const Matrix< T > &  rhs) const
inline

Definition at line 148 of file DynamicMatrix.hpp.

Here is the call graph for this function:

◆ subtract() [2/2]

template<typename T >
void Matrix< T >::subtract ( const Matrix< T > &  rhs,
Matrix< T > &  dest 
) const
inline

Definition at line 155 of file DynamicMatrix.hpp.

◆ swapRows()

template<typename T >
void Matrix< T >::swapRows ( size_t  row1,
size_t  row2 
)
inline

Definition at line 90 of file DynamicMatrix.hpp.

◆ toString()

template<typename T >
std::string Matrix< T >::toString ( ) const
inline

Definition at line 163 of file DynamicMatrix.hpp.

Here is the caller graph for this function:

◆ transpose()

template<typename T >
Matrix<T> Matrix< T >::transpose ( )
inline

Definition at line 95 of file DynamicMatrix.hpp.

Member Data Documentation

◆ data

template<typename T >
std::vector<T> Matrix< T >::data

Definition at line 56 of file DynamicMatrix.hpp.

◆ M

template<typename T >
size_t Matrix< T >::M

Definition at line 57 of file DynamicMatrix.hpp.

◆ N

template<typename T >
size_t Matrix< T >::N

Definition at line 58 of file DynamicMatrix.hpp.


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