38 template<
class Type>
class CMatrix;
160 CMatrix(
int iRows = 0,
int iColumns = 0,
bool bInitialize =
false);
197 virtual string className()
const {
return string(
"CMatrix");};
252 void setElement(
int i,
int j,
const Type& tValue);
419 void MultMv(Type* v1, Type* v2);
432 void dump(ostream& stream=cout);
456 bool exportToMatFile(
const char* acPath,
const char* acVarame,
bool bAppend =
true);
CMatrix< Type > invert() const
int rows() const
Definition: CMatrix.h:195
void setDiagonal(Type tValue)
void operator*=(Type rScalar)
CMatrix< Type > operator*(const CMatrix< Type > &tMat1, const CMatrix< Type > &tMat2)
int iRows
Definition: CMatrix.h:147
CDenseVector< Type > getRow(int iRow) const
CMatrix< Type > operator+(const CMatrix< Type > &rtMat1, const CMatrix< Type > &rtMat2)
void setData(Type *ptData, bool bColumnMajorOrder=false)
Type * _data()
Definition: CMatrix.h:467
IO_MODE
Definition: CObject.h:38
void save(const CMatrix< Type > &rtMat, char *acString)
bool serialize(fstream &stream, IO_MODE=READ)
Read/write from binary stream.
Template object implementing a matrix of single and double precision elements.
Definition: CDenseVector.h:38
bool serialize2(CArchiv &tArchiv)
bool exportToMatFile(const char *acPath, const char *acVarame, bool bAppend=true)
void resize(int iRows, int iCols, bool bPreserveData=false)
CMatrix< Type > operator/(const CMatrix< Type > &rtMat, const Type &rtScalar)
void operator+=(Type rScalar)
virtual string className() const
Returns the class name.
Definition: CMatrix.h:197
Type maxElement(int &rtX, int &rtY) const
const Type & getElement(int i, int j) const
CMatrix< Type > transpose()
void setElement(int i, int j, const Type &tValue)
CMatrix(int iRows=0, int iColumns=0, bool bInitialize=false)
Type & operator()(int i, int j)
void operator/=(Type rScalar)
void setRow(int iRow, const CDenseVector< Type > &tVec)
void replicateMatrix(int iX, int iY, const CMatrix< Type > &tMat)
Type minElement(int &rtX, int &rtY) const
CMatrix< Type > elementDiv(const CMatrix< Type > &rtMat1, const CMatrix< Type > &rtMat2)
CDenseVector< Type > getDiagonal() const
void setColumn(int iIndex, CDenseVector< Type > &tVec)
Type * ptData
Definition: CMatrix.h:149
CDenseVector< Type > getColumn(int iColumn) const
CMatrix< Type > elementMul(const CMatrix< Type > &rtMat1, const CMatrix< Type > &rtMat2)
void insert(int i, int j, const CMatrix< Type > &rtSubmatrix)
Base class of object serialization.
Definition: CArchiv.h:19
int columns() const
Definition: CMatrix.h:203
int eig(CDenseVector< Type > &rtEigenvalues, CMatrix< Type > &rtEigenvectors, int iNum=0, TMatrixType tType=SYMETRIC)
Template object for vectors of single and double precision and integer.
Definition: CDenseVector.h:37
templatized vector for numerical applications
Definition: CMatrix.h:39
CMatrix< Type > & operator=(const CMatrix< Type > &rtSrc)
Base class for all object.
Definition: CObject.h:51
int iCols
Definition: CMatrix.h:148
int importFromMatFile(const char *acPath, const char *acVarname)
void dump(ostream &stream=cout)
void operator-=(Type rScalar)
TMatrixType
Definition: CMatrix.h:35
void zeros()
Definition: CMatrix.h:439
int calcLUFactorization(CMatrix< Type > &rtL, CMatrix< Type > &rtU, CDenseVector< int > &rtIdx) const
void load(CMatrix< Type > &rtMat, char *acString)
CMatrix< Type > operator-(const CMatrix< Type > &rtMat1, const CMatrix< Type > &rtMat2)