HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_MatrixT< T > Class Template Reference

#include <UT_Matrix.h>

Public Types

typedef T value_type
 

Public Member Functions

 UT_MatrixT ()
 
 UT_MatrixT (int nrl, int nrh, int ncl, int nch)
 
 UT_MatrixT (int nrl, int nrh, int ncl, int nch, T *array)
 
 UT_MatrixT (int nrl, int ncl, UT_MatrixT &mat)
 
 UT_MatrixT (const UT_MatrixT< T > &mat)
 
 ~UT_MatrixT ()
 
void init (int nrl, int nrh, int ncl, int nch)
 
void resize (int nrows, int ncols)
 
void appendCol (T *new_col=0)
 
void appendRow (T *new_row=0)
 
int isInit () const
 
void submatrix (const UT_MatrixT< T > &A, int nrl, int nrh, int ncl, int nch)
 
void submatrix (T *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_Matrix2T< T > &mat, int row, int col) const
 
void setSubmatrix2 (int row, int col, const UT_Matrix2T< T > &mat)
 
void addSubmatrix2 (int row, int col, const UT_Matrix2T< T > &mat)
 
void getSubmatrix3 (UT_Matrix3T< T > &mat, int row, int col) const
 
void setSubmatrix3 (int row, int col, const UT_Matrix3T< T > &mat)
 
void addSubmatrix3 (int row, int col, const UT_Matrix3T< T > &mat)
 
void getSubmatrix4 (UT_Matrix4T< T > &mat, int row, int col) const
 
void setSubmatrix4 (int row, int col, const UT_Matrix4T< T > &mat)
 
void addSubmatrix4 (int row, int col, const UT_Matrix4T< T > &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)
 
Toperator() (int row, int col)
 
T operator() (int row, int col) const
 
UT_MatrixT< T > & operator= (const UT_MatrixT< T > &m)
 
UT_MatrixT< T > & operator+= (const UT_MatrixT< T > &m)
 
UT_MatrixT< T > & operator-= (const UT_MatrixT< T > &m)
 
void preMult (const UT_MatrixT< T > &A, UT_MatrixT< T > &result) const
 
void postMult (const UT_MatrixT< T > &A, UT_MatrixT< T > &result) const
 
template<typename S >
void preMult (const UT_VectorT< S > &x, UT_VectorT< S > &result) const
 
template<typename S >
void postMult (const UT_VectorT< S > &x, UT_VectorT< S > &result) const
 
void upperNormalUpdate (const UT_MatrixT< T > &A)
 
template<typename S >
void outerproductUpdate (T b, const UT_VectorT< S > &x, const UT_VectorT< S > &y)
 
void addScaledMatrix (const UT_MatrixT< T > &A, T scale)
 
void setAndScale (const UT_MatrixT< T > &A, T scale)
 
void preMultGivensInPlace (T c, T s)
 
void postMultGivensInPlace (T c, T s)
 
template<typename S >
void multVec (const UT_VectorT< S > &x, UT_VectorT< S > &result) const
 
T rowsL2dist (int r1, int r2, int cl=-1, int ch=-1) const
 
T normFrobenius () const
 
T norm1 () const
 
T normInfinite () const
 
void transpose (UT_MatrixT< T > &result) const
 
bool isSymmetric (T tolerance=SYS_FTOLERANCE_D) const
 
Trow (int i) const
 
void clearAndDestroy ()
 
int save (std::ostream &os, int binary) const
 
int64 getMemoryUsage (bool inclusive) const
 

Protected Member Functions

void outTo (std::ostream &os) const
 

Friends

std::ostream & operator<< (std::ostream &os, const UT_MatrixT< T > &m)
 

Detailed Description

template<typename T>
class UT_MatrixT< T >

Definition at line 28 of file UT_Matrix.h.

Member Typedef Documentation

template<typename T>
typedef T UT_MatrixT< T >::value_type

Definition at line 32 of file UT_Matrix.h.

Constructor & Destructor Documentation

template<typename T>
UT_MatrixT< T >::UT_MatrixT ( )
template<typename T>
UT_MatrixT< T >::UT_MatrixT ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)
template<typename T>
UT_MatrixT< T >::UT_MatrixT ( int  nrl,
int  nrh,
int  ncl,
int  nch,
T array 
)
template<typename T>
UT_MatrixT< T >::UT_MatrixT ( int  nrl,
int  ncl,
UT_MatrixT< T > &  mat 
)
template<typename T>
UT_MatrixT< T >::UT_MatrixT ( const UT_MatrixT< T > &  mat)
explicit
template<typename T>
UT_MatrixT< T >::~UT_MatrixT ( )

Member Function Documentation

template<typename T>
void UT_MatrixT< T >::addScaledMatrix ( const UT_MatrixT< T > &  A,
T  scale 
)
template<typename T>
void UT_MatrixT< T >::addSubmatrix2 ( int  row,
int  col,
const UT_Matrix2T< T > &  mat 
)
template<typename T>
void UT_MatrixT< T >::addSubmatrix3 ( int  row,
int  col,
const UT_Matrix3T< T > &  mat 
)
template<typename T>
void UT_MatrixT< T >::addSubmatrix4 ( int  row,
int  col,
const UT_Matrix4T< T > &  mat 
)
template<typename T>
void UT_MatrixT< T >::appendCol ( T new_col = 0)
template<typename T>
void UT_MatrixT< T >::appendRow ( T new_row = 0)
template<typename T>
void UT_MatrixT< T >::changeNRLAndNCL ( int  nrl,
int  ncl 
)
template<typename T>
void UT_MatrixT< T >::clearAndDestroy ( )
template<typename T>
int UT_MatrixT< T >::columns ( ) const
inline

Definition at line 124 of file UT_Matrix.h.

template<typename T>
int64 UT_MatrixT< T >::getMemoryUsage ( bool  inclusive) const
inline

Definition at line 234 of file UT_Matrix.h.

template<typename T>
int UT_MatrixT< T >::getNCH ( ) const
inline

Definition at line 118 of file UT_Matrix.h.

template<typename T>
int UT_MatrixT< T >::getNCL ( ) const
inline

Definition at line 115 of file UT_Matrix.h.

template<typename T>
int UT_MatrixT< T >::getNRH ( ) const
inline

Definition at line 112 of file UT_Matrix.h.

template<typename T>
int UT_MatrixT< T >::getNRL ( ) const
inline

Definition at line 109 of file UT_Matrix.h.

template<typename T>
void UT_MatrixT< T >::getSubmatrix2 ( UT_Matrix2T< T > &  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_MatrixF? methods are 0 based while this class is usually 1 based. Only double matrices are supported as they are the preferred matrix format.

template<typename T>
void UT_MatrixT< T >::getSubmatrix3 ( UT_Matrix3T< T > &  mat,
int  row,
int  col 
) const
template<typename T>
void UT_MatrixT< T >::getSubmatrix4 ( UT_Matrix4T< T > &  mat,
int  row,
int  col 
) const
template<typename T>
void UT_MatrixT< T >::init ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)
template<typename T>
int UT_MatrixT< T >::isInit ( ) const
inline

Definition at line 66 of file UT_Matrix.h.

template<typename T>
bool UT_MatrixT< T >::isSymmetric ( T  tolerance = SYS_FTOLERANCE_D) const
template<typename T>
void UT_MatrixT< T >::makeIdentity ( )
template<typename T>
template<typename S >
void UT_MatrixT< T >::multVec ( const UT_VectorT< S > &  x,
UT_VectorT< S > &  result 
) const
template<typename T>
void UT_MatrixT< T >::negate ( )
template<typename T>
T UT_MatrixT< T >::norm1 ( ) const
template<typename T>
T UT_MatrixT< T >::normFrobenius ( ) const
template<typename T>
T UT_MatrixT< T >::normInfinite ( ) const
template<typename T>
T& UT_MatrixT< T >::operator() ( int  row,
int  col 
)
inline

Definition at line 139 of file UT_Matrix.h.

template<typename T>
T UT_MatrixT< T >::operator() ( int  row,
int  col 
) const
inline

Definition at line 145 of file UT_Matrix.h.

template<typename T>
UT_MatrixT<T>& UT_MatrixT< T >::operator+= ( const UT_MatrixT< T > &  m)
template<typename T>
UT_MatrixT<T>& UT_MatrixT< T >::operator-= ( const UT_MatrixT< T > &  m)
template<typename T>
UT_MatrixT<T>& UT_MatrixT< T >::operator= ( const UT_MatrixT< T > &  m)
template<typename T>
template<typename S >
void UT_MatrixT< T >::outerproductUpdate ( T  b,
const UT_VectorT< S > &  x,
const UT_VectorT< S > &  y 
)
template<typename T>
void UT_MatrixT< T >::outTo ( std::ostream &  os) const
protected
template<typename T>
void UT_MatrixT< T >::postMult ( const UT_MatrixT< T > &  A,
UT_MatrixT< T > &  result 
) const
template<typename T>
template<typename S >
void UT_MatrixT< T >::postMult ( const UT_VectorT< S > &  x,
UT_VectorT< S > &  result 
) const
inline

Definition at line 176 of file UT_Matrix.h.

template<typename T>
void UT_MatrixT< T >::postMultGivensInPlace ( T  c,
T  s 
)
template<typename T>
void UT_MatrixT< T >::preMult ( const UT_MatrixT< T > &  A,
UT_MatrixT< T > &  result 
) const
template<typename T>
template<typename S >
void UT_MatrixT< T >::preMult ( const UT_VectorT< S > &  x,
UT_VectorT< S > &  result 
) const
template<typename T>
void UT_MatrixT< T >::preMultGivensInPlace ( T  c,
T  s 
)
template<typename T>
void UT_MatrixT< T >::resize ( int  nrows,
int  ncols 
)
template<typename T>
T* UT_MatrixT< T >::row ( int  i) const
inline

Definition at line 217 of file UT_Matrix.h.

template<typename T>
int UT_MatrixT< T >::rows ( ) const
inline

Definition at line 121 of file UT_Matrix.h.

template<typename T>
T UT_MatrixT< T >::rowsL2dist ( int  r1,
int  r2,
int  cl = -1,
int  ch = -1 
) const
template<typename T>
int UT_MatrixT< T >::save ( std::ostream &  os,
int  binary 
) const
template<typename T>
void UT_MatrixT< T >::setAndScale ( const UT_MatrixT< T > &  A,
T  scale 
)
template<typename T>
void UT_MatrixT< T >::setShallowNCH ( int  nch)
inline

Definition at line 136 of file UT_Matrix.h.

template<typename T>
void UT_MatrixT< T >::setShallowNCL ( int  ncl)
inline

Definition at line 135 of file UT_Matrix.h.

template<typename T>
void UT_MatrixT< T >::setShallowNRH ( int  nrh)
inline

Definition at line 134 of file UT_Matrix.h.

template<typename T>
void UT_MatrixT< T >::setShallowNRL ( int  nrl)
inline

Definition at line 133 of file UT_Matrix.h.

template<typename T>
void UT_MatrixT< T >::setSubmatrix2 ( int  row,
int  col,
const UT_Matrix2T< T > &  mat 
)
template<typename T>
void UT_MatrixT< T >::setSubmatrix3 ( int  row,
int  col,
const UT_Matrix3T< T > &  mat 
)
template<typename T>
void UT_MatrixT< T >::setSubmatrix4 ( int  row,
int  col,
const UT_Matrix4T< T > &  mat 
)
template<typename T>
void UT_MatrixT< T >::submatrix ( const UT_MatrixT< T > &  A,
int  nrl,
int  nrh,
int  ncl,
int  nch 
)
template<typename T>
void UT_MatrixT< T >::submatrix ( T array,
int  nrl,
int  nrh,
int  ncl,
int  nch,
int  stride = -1 
)
template<typename T>
void UT_MatrixT< T >::transpose ( UT_MatrixT< T > &  result) const
template<typename T>
void UT_MatrixT< T >::upperNormalUpdate ( const UT_MatrixT< T > &  A)
template<typename T>
void UT_MatrixT< T >::zero ( int  nrl,
int  nrh,
int  ncl,
int  nch 
)
template<typename T>
void UT_MatrixT< T >::zero ( )
inline

Definition at line 80 of file UT_Matrix.h.

Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  os,
const UT_MatrixT< T > &  m 
)
friend

Definition at line 228 of file UT_Matrix.h.


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