UT_Matrix Class Reference

#include <UT_Matrix.h>

List of all members.

Public Member Functions

 UT_Matrix ()
 UT_Matrix (int nrl, int nrh, int ncl, int nch)
 UT_Matrix (int nrl, int nrh, int ncl, int nch, float *array)
 UT_Matrix (int nrl, int ncl, UT_Matrix &mat)
 UT_Matrix (const UT_Matrix &mat)
 ~UT_Matrix ()
void init (int nrl, int nrh, int ncl, int nch)
void resize (int nrows, int ncols)
void appendCol (float *new_col=0)
void appendRow (float *new_row=0)
int isInit () const
void submatrix (const UT_Matrix &A, int nrl, int nrh, int ncl, int nch)
void submatrix (float *array, int nrl, int nrh, int ncl, int nch, int stride=-1)
void zero (int nrl, int nrh, int ncl, int nch)
void zero ()
void getSubmatrix2 (UT_Matrix2 &mat, int row, int col) const
void setSubmatrix2 (int row, int col, const UT_Matrix2 &mat)
void addSubmatrix2 (int row, int col, const UT_Matrix2 &mat)
void getSubmatrix3 (UT_DMatrix3 &mat, int row, int col) const
void setSubmatrix3 (int row, int col, const UT_DMatrix3 &mat)
void addSubmatrix3 (int row, int col, const UT_DMatrix3 &mat)
void getSubmatrix4 (UT_DMatrix4 &mat, int row, int col) const
void setSubmatrix4 (int row, int col, const UT_DMatrix4 &mat)
void addSubmatrix4 (int row, int col, const UT_DMatrix4 &mat)
void makeIdentity ()
void negate ()
int getNRL () const
int getNRH () const
int getNCL () const
int getNCH () const
int rows () const
int columns () const
void changeNRLAndNCL (int nrl, int ncl)
void setShallowNRL (int nrl)
void setShallowNRH (int nrh)
void setShallowNCL (int ncl)
void setShallowNCH (int nch)
float & operator() (int row, int col)
float operator() (int row, int col) const
UT_Matrixoperator= (const UT_Matrix &m)
UT_Matrixoperator+= (const UT_Matrix &m)
UT_Matrixoperator-= (const UT_Matrix &m)
void preMult (const UT_Matrix &A, UT_Matrix &result) const
void postMult (const UT_Matrix &A, UT_Matrix &result) const
void preMult (const UT_Vector &x, UT_Vector &result) const
void postMult (const UT_Vector &x, UT_Vector &result) const
void upperNormalUpdate (const UT_Matrix &A)
void outerproductUpdate (float b, const UT_Vector &x, const UT_Vector &y)
void addScaledMatrix (const UT_Matrix &A, float scale)
void setAndScale (const UT_Matrix &A, float scale)
void preMultGivensInPlace (float c, float s)
void postMultGivensInPlace (float c, float s)
void multVec (const UT_Vector &x, UT_Vector &result) const
float rowsL2dist (int r1, int r2, int cl=-1, int ch=-1) const
float normFrobenius () const
float norm1 () const
float normInfinite () const
void transpose (UT_Matrix &result) const
bool isSymmetric (fpreal64 tolerance=UT_FTOLERANCE) const
float * row (int i) const
void clearAndDestroy ()
int save (ostream &os, int binary) const

Protected Member Functions

void outTo (ostream &os) const

Friends

ostream & operator<< (ostream &os, const UT_Matrix &m)


Detailed Description

Definition at line 37 of file UT_Matrix.h.


Constructor & Destructor Documentation

UT_Matrix::UT_Matrix (  ) 

UT_Matrix::UT_Matrix ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

UT_Matrix::UT_Matrix ( int  nrl,
int  nrh,
int  ncl,
int  nch,
float *  array 
)

UT_Matrix::UT_Matrix ( int  nrl,
int  ncl,
UT_Matrix mat 
)

UT_Matrix::UT_Matrix ( const UT_Matrix mat  )  [explicit]

UT_Matrix::~UT_Matrix (  ) 


Member Function Documentation

void UT_Matrix::addScaledMatrix ( const UT_Matrix A,
float  scale 
)

void UT_Matrix::addSubmatrix2 ( int  row,
int  col,
const UT_Matrix2 mat 
)

void UT_Matrix::addSubmatrix3 ( int  row,
int  col,
const UT_DMatrix3 mat 
)

void UT_Matrix::addSubmatrix4 ( int  row,
int  col,
const UT_DMatrix4 mat 
)

void UT_Matrix::appendCol ( float *  new_col = 0  ) 

void UT_Matrix::appendRow ( float *  new_row = 0  ) 

void UT_Matrix::changeNRLAndNCL ( int  nrl,
int  ncl 
)

void UT_Matrix::clearAndDestroy (  ) 

int UT_Matrix::columns (  )  const [inline]

Definition at line 129 of file UT_Matrix.h.

int UT_Matrix::getNCH (  )  const [inline]

Definition at line 123 of file UT_Matrix.h.

int UT_Matrix::getNCL (  )  const [inline]

Definition at line 120 of file UT_Matrix.h.

int UT_Matrix::getNRH (  )  const [inline]

Definition at line 117 of file UT_Matrix.h.

int UT_Matrix::getNRL (  )  const [inline]

Definition at line 114 of file UT_Matrix.h.

void UT_Matrix::getSubmatrix2 ( UT_Matrix2 mat,
int  row,
int  col 
) const

These methods allow one to read out and write into blocks of the UT_Matrix using our other matrix classes. This is very useful when working with block algorithms. Keep in mind that the usual UT_Matrix? methods are 0 based while this class is usually 1 based. Only double matrices are supported as they are the preferred matrix format.

void UT_Matrix::getSubmatrix3 ( UT_DMatrix3 mat,
int  row,
int  col 
) const

void UT_Matrix::getSubmatrix4 ( UT_DMatrix4 mat,
int  row,
int  col 
) const

void UT_Matrix::init ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)

int UT_Matrix::isInit (  )  const [inline]

Definition at line 71 of file UT_Matrix.h.

bool UT_Matrix::isSymmetric ( fpreal64  tolerance = UT_FTOLERANCE  )  const

void UT_Matrix::makeIdentity (  ) 

void UT_Matrix::multVec ( const UT_Vector x,
UT_Vector result 
) const

void UT_Matrix::negate (  ) 

float UT_Matrix::norm1 (  )  const

float UT_Matrix::normFrobenius (  )  const

float UT_Matrix::normInfinite (  )  const

float UT_Matrix::operator() ( int  row,
int  col 
) const [inline]

Definition at line 150 of file UT_Matrix.h.

float& UT_Matrix::operator() ( int  row,
int  col 
) [inline]

Definition at line 144 of file UT_Matrix.h.

UT_Matrix& UT_Matrix::operator+= ( const UT_Matrix m  ) 

UT_Matrix& UT_Matrix::operator-= ( const UT_Matrix m  ) 

UT_Matrix& UT_Matrix::operator= ( const UT_Matrix m  ) 

void UT_Matrix::outerproductUpdate ( float  b,
const UT_Vector x,
const UT_Vector y 
)

void UT_Matrix::outTo ( ostream &  os  )  const [protected]

void UT_Matrix::postMult ( const UT_Vector x,
UT_Vector result 
) const [inline]

Definition at line 179 of file UT_Matrix.h.

void UT_Matrix::postMult ( const UT_Matrix A,
UT_Matrix result 
) const

void UT_Matrix::postMultGivensInPlace ( float  c,
float  s 
)

void UT_Matrix::preMult ( const UT_Vector x,
UT_Vector result 
) const

void UT_Matrix::preMult ( const UT_Matrix A,
UT_Matrix result 
) const

void UT_Matrix::preMultGivensInPlace ( float  c,
float  s 
)

void UT_Matrix::resize ( int  nrows,
int  ncols 
)

float* UT_Matrix::row ( int  i  )  const [inline]

Definition at line 218 of file UT_Matrix.h.

int UT_Matrix::rows (  )  const [inline]

Definition at line 126 of file UT_Matrix.h.

float UT_Matrix::rowsL2dist ( int  r1,
int  r2,
int  cl = -1,
int  ch = -1 
) const

int UT_Matrix::save ( ostream &  os,
int  binary 
) const

void UT_Matrix::setAndScale ( const UT_Matrix A,
float  scale 
)

void UT_Matrix::setShallowNCH ( int  nch  )  [inline]

Definition at line 141 of file UT_Matrix.h.

void UT_Matrix::setShallowNCL ( int  ncl  )  [inline]

Definition at line 140 of file UT_Matrix.h.

void UT_Matrix::setShallowNRH ( int  nrh  )  [inline]

Definition at line 139 of file UT_Matrix.h.

void UT_Matrix::setShallowNRL ( int  nrl  )  [inline]

Definition at line 138 of file UT_Matrix.h.

void UT_Matrix::setSubmatrix2 ( int  row,
int  col,
const UT_Matrix2 mat 
)

void UT_Matrix::setSubmatrix3 ( int  row,
int  col,
const UT_DMatrix3 mat 
)

void UT_Matrix::setSubmatrix4 ( int  row,
int  col,
const UT_DMatrix4 mat 
)

void UT_Matrix::submatrix ( float *  array,
int  nrl,
int  nrh,
int  ncl,
int  nch,
int  stride = -1 
)

void UT_Matrix::submatrix ( const UT_Matrix A,
int  nrl,
int  nrh,
int  ncl,
int  nch 
)

void UT_Matrix::transpose ( UT_Matrix result  )  const

void UT_Matrix::upperNormalUpdate ( const UT_Matrix A  ) 

void UT_Matrix::zero (  )  [inline]

Definition at line 85 of file UT_Matrix.h.

void UT_Matrix::zero ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const UT_Matrix m 
) [friend]

Definition at line 229 of file UT_Matrix.h.


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

Generated on Fri May 25 00:10:50 2012 for HDK by  doxygen 1.5.9