SLIMMER
Public Member Functions | Static Public Attributes | Protected Attributes
SimpleTMat< TM, MATX, MATY, TS > Class Template Reference

Fixed Size Templated Matrix Class. More...

#include <SimpleTMat.h>

Inheritance diagram for SimpleTMat< TM, MATX, MATY, TS >:
SimpleBaseTMat< TM, TS > SimpleNumericArrayIO

List of all members.

Public Member Functions

 SimpleTMat ()
 Default Constructor.
 SimpleTMat (const SimpleTMat< TM, MATX, MATY, TS > &src)
 Copy Constructor.
template<typename TM2 >
 SimpleTMat (const SimpleBaseTMat< TM2, TS > &src)
 Copy Constructor.
TM * operator[] (const TS &i)
 Return Pointer to a Row (so second [] selects column)
const TM * operator[] (const TS &i) const
const TM & operator() (const TS &i, const TS &j) const
TM & operator() (const TS &i)
 Return Refererce to an Element with a Given Offset.
const TM & operator() (const int &i) const
TM Val (const TS i) const
 Return Value of Element at Offset keeping matrix constant.
TM Val (const TS i, const TS j) const
 Return Value of Element i,j keeping matrix constant.
TS MatX () const
 Return Matrix Dimension X.
TS MatY () const
 Return Matrix Dimension Y.
TS MatXY () const
 Return Total Number of Elements in Matrix.
SimpleTMat< TM, MATX, 1, TS > RowMat (const int &row) const
 Return Row as a Matrix (no bounds check for speed!)
SimpleTVec< TM, MATX > RowVec (const int &row) const
 Return Row as a Vector (no bounds check for speed!)
void SetRowVec (const int &row, const SimpleTVec< TM, MATX > &v2)
 Set Row From a Vector (no bounds check for speed!)
SimpleTMat< TM, 1, MATY, TS > ColumnMat (const int &col) const
 Return Column as a Matrix (no bounds check for speed!)
SimpleTVec< TM, MATY > ColumnVec (const int &col) const
 Return Column as a Vector (no bounds check for speed!)
void SetColVec (const int &col, const SimpleTVec< TM, MATX > &v2)
 Set Column From a Vector (no bounds check for speed!)
template<unsigned int MATX2, unsigned int MATY2>
void SubMatrix (SimpleTMat< TM, MATX2, MATY2, TS > &v2, const int &col=0, const int &row=0) const
 Extract a Sub Matrix (no bounds check for speed!)
template<typename T2 >
SimpleTMat< TM, MATX, MATY, TS > & operator= (const SimpleTMat< T2, MATX, MATY, TS > &src)
 Operator Matrix=Matrix.
SimpleTMat< TM, MATX, MATY > & operator+= (const SimpleTMat< TM, MATX, MATY, TS > &src)
 Operator Matrix+= Matrix.
SimpleTMat< TM, MATX, MATY > & operator-= (const SimpleTMat< TM, MATX, MATY, TS > &src)
 Operator Matrix-= Matrix.
SimpleTMat< TM, MATX, MATY > & operator+= (const TM &scalar)
 Operator Matrix+=Scalar.
SimpleTMat< TM, MATX, MATY > & operator-= (const TM &scalar)
 Operator Matrix-*=Scalar.
SimpleTMat< TM, MATX, MATY > & operator*= (const TM &scalar)
 Operator Matrix*=Scalar.
SimpleTMat< TM, MATX, MATY > operator* (const TM &scalar) const
 Operator Matrix*Scalar.
template<typename T2 >
SimpleTVec< TM, MATY > operator* (const SimpleBaseTVec< T2 > &v) const
 Operator Matrix*Vector.
template<unsigned int MATX2>
SimpleTMat< TM, MATX2, MATY > operator* (const SimpleTMat< TM, MATX2, MATX, TS > &v) const
 Operator Matrix*Matrix.
SimpleTMat< TM, MATX, MATY > operator+ (const SimpleTMat< TM, MATX, MATY, TS > &v) const
 Operator Matrix+Matrix.
SimpleTMat< TM, MATX, MATY > operator- (const SimpleTMat< TM, MATX, MATY, TS > &v) const
 Operator Matrix-Matrix.
SimpleTMat< TM, MATY, MATX, TS > Transpose () const
 Return general Non-Square Transpose.
SimpleTMat< TM, MATY, MATX, TS > TransposeReturn () const
 Return general Non-Square Transpose.
TM Determinant ()
 Return Determinant (Recursive Template Definition)
SimpleTVec< TM, MATX > LinSolve ()
 Solve Set Of Linear Equations.
SimpleTMat< TM, MATX, MATX, TS > Inverse ()
 Return Inverse Matrix using LUP.
int JacobiCyclic (SimpleTMat< TM, MATX, MATY, TS > &V, SimpleTVec< TM, MATX > &eVal, int maxit=50, int ShowOverun=(1==1), double threshold=0.001, TM convLimit=0.00001)

Static Public Attributes

static const char _versionID []

Protected Attributes

TM _elem [MATY *MATX]
 Storage for elements.

Detailed Description

template<typename TM = float, unsigned int MATX = 3, unsigned int MATY = 3, typename TS = unsigned int>
class SimpleTMat< TM, MATX, MATY, TS >

Fixed Size Templated Matrix Class.

MATX=NUM COLUMNS, MATY=NUM ROWS

Templated Matrix Class, Both Size and Type fixed by template at Run Time

Id:
SimpleTMat.h,v 1.44 2011/12/14 20:28:14 mads Exp

Constructor & Destructor Documentation

template<typename TM = float, unsigned int MATX = 3, unsigned int MATY = 3, typename TS = unsigned int>
SimpleTMat< TM, MATX, MATY, TS >::SimpleTMat ( const SimpleTMat< TM, MATX, MATY, TS > &  src) [inline]

Copy Constructor.

Including default copy (exact type match)

template<typename TM = float, unsigned int MATX = 3, unsigned int MATY = 3, typename TS = unsigned int>
template<typename TM2 >
SimpleTMat< TM, MATX, MATY, TS >::SimpleTMat ( const SimpleBaseTMat< TM2, TS > &  src) [inline]

Copy Constructor.

from Other Matrix Type derived from SimpleBaseMat)

 All Classes Functions Variables Typedefs