TexGen
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TexGen::CMatrix Class Reference

Class to represent a matrix and perform various operations on it. More...

#include <Matrix.h>

Inheritance diagram for TexGen::CMatrix:
Inheritance graph
[legend]

Public Member Functions

 CMatrix ()
 
 CMatrix (int iHeight, int iWidth)
 
 CMatrix (const CMatrix &CopyMe)
 
 ~CMatrix (void)
 
void Initialise (int iHeight, int iWidth)
 
void InitialiseIdentity (int iSize)
 
CMatrix GetTranspose ()
 
CMatrixGetSubMatrix (CMatrix &SubMatrix, int iRow, int iColumn) const
 
void SetSubMatrix (CMatrix &SubMatrix, int iRow, int iColumn)
 
void ZeroMatrix ()
 
double & operator() (int i, int j)
 
const double & operator() (int i, int j) const
 
const double GetValue (int i, int j) const
 
void SetValue (int i, int j, double dVal)
 
CMatrix operator* (const CMatrix &RightMatrix) const
 
CMatrix operator* (double dRight) const
 
CMatrix operator+ (const CMatrix &RightMatrix) const
 
CMatrix operator- (const CMatrix &RightMatrix) const
 
CMatrixoperator*= (double dRight)
 
CMatrixoperator/= (double dRight)
 
CMatrixoperator+= (const CMatrix &RightMatrix)
 
CMatrixoperator-= (const CMatrix &RightMatrix)
 
CMatrixoperator= (const CMatrix &RightMatrix)
 
double GetDeterminant () const
 
double GetInverse (CMatrix &Inverse) const
 
void GetSquareRoot (CMatrix &Root) const
 
void GetEigen (CMatrix &EigenVectors, CMatrix &EigenValues) const
 
void GetPolarDecomposition (CMatrix &U, CMatrix &P) const
 
bool Empty () const
 
int GetHeight () const
 
int GetWidth () const
 
void SwapRows (int iRow1, int iRow2)
 
void SwapColumns (int iColumn1, int iColumn2)
 
void DivideRow (int iRow, double dDivisor)
 
void DivideColumn (int iColumn, double dDivisor)
 
void SubtractRow (int iRow1, int iRow2, double dScale)
 
void SubtractColumn (int iColumn1, int iColumn2, double dScale)
 
void Identity ()
 
CMatrixEqualsMultiple (const CMatrix &LeftMatrix, const CMatrix &RightMatrix)
 This function multiplies the left matrix with the right matrix. More...
 
CMatrixEqualsTransposeMultiple (const CMatrix &LeftMatrix, const CMatrix &RightMatrix)
 This function multiplies the transpose of the left matrix with the right matrix. More...
 
CMatrixEqualsMultipleTranspose (const CMatrix &LeftMatrix, const CMatrix &RightMatrix)
 This function multiplies the transpose of the left matrix with the right matrix. More...
 
void PrintMatrix (char szMatrixName[], ostream &Output=cout, int iWidth=16, bool bScientific=true)
 

Protected Member Functions

double GetInverseSlow (CMatrix &Inverse) const
 

Protected Attributes

int m_iWidth
 
int m_iHeight
 
double * m_dMatrix
 

Detailed Description

Class to represent a matrix and perform various operations on it.

Definition at line 32 of file Matrix.h.

Constructor & Destructor Documentation

◆ CMatrix() [1/3]

TexGen::CMatrix::CMatrix ( )
inline

Definition at line 104 of file Matrix.h.

◆ CMatrix() [2/3]

TexGen::CMatrix::CMatrix ( int  iHeight,
int  iWidth 
)
inline

Definition at line 111 of file Matrix.h.

References m_dMatrix, m_iHeight, m_iWidth, and ZeroMatrix().

◆ CMatrix() [3/3]

TexGen::CMatrix::CMatrix ( const CMatrix CopyMe)
inline

Definition at line 119 of file Matrix.h.

◆ ~CMatrix()

TexGen::CMatrix::~CMatrix ( void  )
inline

Definition at line 128 of file Matrix.h.

References m_dMatrix.

Member Function Documentation

◆ DivideColumn()

void TexGen::CMatrix::DivideColumn ( int  iColumn,
double  dDivisor 
)
inline

Definition at line 755 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ DivideRow()

void TexGen::CMatrix::DivideRow ( int  iRow,
double  dDivisor 
)
inline

Definition at line 743 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ Empty()

bool TexGen::CMatrix::Empty ( ) const
inline

Definition at line 171 of file Matrix.h.

References m_iHeight, and m_iWidth.

Referenced by operator+=(), and operator-=().

◆ EqualsMultiple()

CMatrix & TexGen::CMatrix::EqualsMultiple ( const CMatrix LeftMatrix,
const CMatrix RightMatrix 
)
inline

This function multiplies the left matrix with the right matrix.

Warning, LeftMatrix and RightMatrix parameters should not be equal to this

Definition at line 293 of file Matrix.h.

References Initialise(), m_iHeight, m_iWidth, and ZeroMatrix().

Referenced by TexGen::CElement::GetBMatrix(), TexGen::CElementTriTension::GetDMatrix(), TexGen::CInterpolationCubic::GetNaturalCubicSplines(), TexGen::CInterpolationCubic::GetPeriodicCubicSplines(), GetPolarDecomposition(), and GetSquareRoot().

◆ EqualsMultipleTranspose()

CMatrix & TexGen::CMatrix::EqualsMultipleTranspose ( const CMatrix LeftMatrix,
const CMatrix RightMatrix 
)
inline

This function multiplies the transpose of the left matrix with the right matrix.

Warning, LeftMatrix and RightMatrix parameters should not be equal to this

Definition at line 347 of file Matrix.h.

References Initialise(), m_iHeight, m_iWidth, and ZeroMatrix().

Referenced by TexGen::CElementTriBending::GetDMatrix().

◆ EqualsTransposeMultiple()

CMatrix & TexGen::CMatrix::EqualsTransposeMultiple ( const CMatrix LeftMatrix,
const CMatrix RightMatrix 
)
inline

This function multiplies the transpose of the left matrix with the right matrix.

Warning, LeftMatrix and RightMatrix parameters should not be equal to this

Definition at line 320 of file Matrix.h.

References Initialise(), m_iHeight, m_iWidth, and ZeroMatrix().

Referenced by TexGen::CElement::GetKeMatrix(), and GetPolarDecomposition().

◆ GetDeterminant()

double TexGen::CMatrix::GetDeterminant ( ) const
inline

Definition at line 489 of file Matrix.h.

References GetInverse(), m_iHeight, and m_iWidth.

Referenced by TexGen::CElementTri::GetArea(), GetInverse(), and GetInverseSlow().

◆ GetEigen()

void TexGen::CMatrix::GetEigen ( CMatrix EigenVectors,
CMatrix EigenValues 
) const
inline

Definition at line 827 of file Matrix.h.

References Initialise(), m_iHeight, and m_iWidth.

Referenced by GetSquareRoot().

◆ GetHeight()

int TexGen::CMatrix::GetHeight ( ) const
inline

Definition at line 176 of file Matrix.h.

References m_iHeight.

Referenced by TexGen::CLinearTransformation::CLinearTransformation().

◆ GetInverse()

double TexGen::CMatrix::GetInverse ( CMatrix Inverse) const
inline

◆ GetInverseSlow()

double TexGen::CMatrix::GetInverseSlow ( CMatrix Inverse) const
inlineprotected

Definition at line 677 of file Matrix.h.

References GetDeterminant(), GetSubMatrix(), Initialise(), m_iHeight, and m_iWidth.

◆ GetPolarDecomposition()

void TexGen::CMatrix::GetPolarDecomposition ( CMatrix U,
CMatrix P 
) const
inline

◆ GetSquareRoot()

void TexGen::CMatrix::GetSquareRoot ( CMatrix Root) const
inline

Definition at line 461 of file Matrix.h.

References EqualsMultiple(), GetEigen(), GetInverse(), m_iHeight, and m_iWidth.

Referenced by GetPolarDecomposition().

◆ GetSubMatrix()

CMatrix & TexGen::CMatrix::GetSubMatrix ( CMatrix SubMatrix,
int  iRow,
int  iColumn 
) const
inline

Definition at line 793 of file Matrix.h.

References Initialise(), m_iHeight, and m_iWidth.

Referenced by GetInverseSlow().

◆ GetTranspose()

CMatrix TexGen::CMatrix::GetTranspose ( )
inline

Definition at line 220 of file Matrix.h.

References m_iHeight, and m_iWidth.

Referenced by TexGen::CDomainPlanes::Deform().

◆ GetValue()

const double TexGen::CMatrix::GetValue ( int  i,
int  j 
) const
inline

Definition at line 200 of file Matrix.h.

References m_dMatrix, and m_iWidth.

Referenced by SetSubMatrix().

◆ GetWidth()

int TexGen::CMatrix::GetWidth ( ) const
inline

Definition at line 181 of file Matrix.h.

References m_iWidth.

Referenced by TexGen::CLinearTransformation::CLinearTransformation().

◆ Identity()

void TexGen::CMatrix::Identity ( )
inline

◆ Initialise()

void TexGen::CMatrix::Initialise ( int  iHeight,
int  iWidth 
)
inline

◆ InitialiseIdentity()

void TexGen::CMatrix::InitialiseIdentity ( int  iSize)
inline

◆ operator()() [1/2]

double & TexGen::CMatrix::operator() ( int  i,
int  j 
)
inline

Definition at line 186 of file Matrix.h.

References m_dMatrix, and m_iWidth.

◆ operator()() [2/2]

const double & TexGen::CMatrix::operator() ( int  i,
int  j 
) const
inline

Definition at line 193 of file Matrix.h.

References m_dMatrix, and m_iWidth.

◆ operator*() [1/2]

CMatrix TexGen::CMatrix::operator* ( const CMatrix RightMatrix) const
inline

Definition at line 234 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ operator*() [2/2]

CMatrix TexGen::CMatrix::operator* ( double  dRight) const
inline

Definition at line 252 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ operator*=()

CMatrix & TexGen::CMatrix::operator*= ( double  dRight)
inline

Definition at line 374 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ operator+()

CMatrix TexGen::CMatrix::operator+ ( const CMatrix RightMatrix) const
inline

Definition at line 266 of file Matrix.h.

References m_dMatrix, m_iHeight, and m_iWidth.

◆ operator+=()

CMatrix & TexGen::CMatrix::operator+= ( const CMatrix RightMatrix)
inline

Definition at line 401 of file Matrix.h.

References Empty(), Initialise(), m_iHeight, and m_iWidth.

◆ operator-()

CMatrix TexGen::CMatrix::operator- ( const CMatrix RightMatrix) const
inline

Definition at line 279 of file Matrix.h.

References m_dMatrix, m_iHeight, and m_iWidth.

◆ operator-=()

CMatrix & TexGen::CMatrix::operator-= ( const CMatrix RightMatrix)
inline

Definition at line 419 of file Matrix.h.

References Empty(), Initialise(), m_iHeight, and m_iWidth.

◆ operator/=()

CMatrix & TexGen::CMatrix::operator/= ( double  dRight)
inline

Definition at line 387 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ operator=()

CMatrix & TexGen::CMatrix::operator= ( const CMatrix RightMatrix)
inline

Definition at line 134 of file Matrix.h.

References Initialise(), m_dMatrix, m_iHeight, and m_iWidth.

◆ PrintMatrix()

void TexGen::CMatrix::PrintMatrix ( char  szMatrixName[],
ostream &  Output = cout,
int  iWidth = 16,
bool  bScientific = true 
)
inline

Definition at line 437 of file Matrix.h.

References m_iHeight, and m_iWidth.

Referenced by TexGen::operator<<().

◆ SetSubMatrix()

void TexGen::CMatrix::SetSubMatrix ( TexGen::CMatrix SubMatrix,
int  iRow,
int  iColumn 
)
inline

Definition at line 1119 of file Matrix.h.

References GetValue(), m_iHeight, and m_iWidth.

◆ SetValue()

void TexGen::CMatrix::SetValue ( int  i,
int  j,
double  dVal 
)
inline

Definition at line 207 of file Matrix.h.

References m_dMatrix, and m_iWidth.

◆ SubtractColumn()

void TexGen::CMatrix::SubtractColumn ( int  iColumn1,
int  iColumn2,
double  dScale 
)
inline

Definition at line 780 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ SubtractRow()

void TexGen::CMatrix::SubtractRow ( int  iRow1,
int  iRow2,
double  dScale 
)
inline

Definition at line 767 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ SwapColumns()

void TexGen::CMatrix::SwapColumns ( int  iColumn1,
int  iColumn2 
)
inline

Definition at line 727 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ SwapRows()

void TexGen::CMatrix::SwapRows ( int  iRow1,
int  iRow2 
)
inline

Definition at line 711 of file Matrix.h.

References m_iHeight, and m_iWidth.

◆ ZeroMatrix()

void TexGen::CMatrix::ZeroMatrix ( )
inline

Member Data Documentation

◆ m_dMatrix

double* TexGen::CMatrix::m_dMatrix
protected

◆ m_iHeight

int TexGen::CMatrix::m_iHeight
protected

◆ m_iWidth

int TexGen::CMatrix::m_iWidth
protected

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