klMatrix
Public Member Functions | Data Fields | Protected Attributes
klMatrix< TYPE > Class Template Reference

#include <kl_matrix.h>

Inheritance diagram for klMatrix< TYPE >:
Inheritance graph
Collaboration diagram for klMatrix< TYPE >:
Collaboration graph

Public Member Functions

 klMatrix (TYPE *mem, __int64 row, __int64 col, bool own=0)
 
 klMatrix (klMemMgr *mgr, __int64 row, __int64 col)
 
 klMatrix (__int64 row, __int64 col)
 
 klMatrix ()
 
 klMatrix (const klMatrix< TYPE > &src)
 
 klMatrix (klMatrix< TYPE > &&src)
 
 ~klMatrix ()
 
klMatrix< TYPE > & operator= (const klMatrix< TYPE > &src)
 
klVector< TYPE > & operator[] (__int64 row) const
 
klMatrix< TYPE > operator* (klMatrix< TYPE > a) const
 
klVector< TYPE > operator* (klVector< TYPE > a) const
 
klMatrix< TYPE > & operator= (TYPE c)
 
klMatrix< TYPE > & operator+= (TYPE c)
 
klMatrix< TYPE > & operator+= (const klMatrix< TYPE > &c)
 
klMatrix< TYPE > & operator-= (const klMatrix< TYPE > &c)
 
klMatrix< TYPE > & operator-= (TYPE c)
 
klMatrix< TYPE > & operator*= (const klMatrix< TYPE > &a)
 
klMatrix< TYPE > & operator*= (TYPE c)
 
klMatrix< TYPE > & operator/= (TYPE c)
 
bool operator== (const klMatrix< TYPE > &m) const
 
klMatrix< TYPE > & operator/= (const klMatrix< TYPE > &c)
 
void setRow (__int64 j, klVector< TYPE > r)
 
klMatrix< TYPE > transpose () const
 
void threshold (double low=DBL_MIN, double lowVal=DBL_MIN, double high=DBL_MAX, double highVal=DBL_MAX)
 
complex< double > det ()
 
klMatrix< TYPE > getSubBlock (__int64 i, __int64 j, __int64 k, __int64 l)
 
void setSubBlock (klMatrix< TYPE > block, __int64 i, __int64 j)
 
void setColumn (__int64 i, klVector< TYPE > v)
 
klMatrix< TYPE > inverse () const
 
klVector< complex< double > > eigenvalues ()
 
TYPE trace ()
 
TYPE ConditionNumber (bool ellone=0)
 
TYPE norm (bool ell_infty=0)
 
klVector< TYPE > getColumn (__int64 col)
 
__int64 getRows () const
 
__int64 getColumns () const
 
TYPE * getMemory () const
 
klMemMgrgetMemMgr () const
 
bool isContiguous () const
 
klMatrix< TYPE > columnToRowMajor ()
 
void makeNanFriendly ()
 
size_t precision () const
 
void setup (__int64 row, __int64 col, klMemMgr *mgr=0)
 
klMatrix< TYPE > upper ()
 
klMatrix< TYPE > lower ()
 
klVector< TYPE > diag ()
 
template<>
klMatrix< float > operator* (klMatrix< float > a) const
 
template<>
float norm (bool ell_infty)
 
template<>
float ConditionNumber (bool ellone)
 
- Public Member Functions inherited from klRefCount< klMutex >
 klRefCount (void)
 
 klRefCount (const klRefCount &obj)
 
 ~klRefCount (void)
 
void addRef (void)
 
bool deleteRef (void)
 
klRefCountoperator= (const klRefCount &obj)
 
long useCount () const
 

Data Fields

vector< std::string > _dimensionNames
 

Protected Attributes

klVector< TYPE > * _vectors
 
__int64 _own
 
bool _contiguous
 
__int64 _row
 
__int64 _col
 
TYPE * _memory
 
klMemMgr_mgr
 
string _filename
 

Constructor & Destructor Documentation

template<class TYPE>
klMatrix< TYPE >::klMatrix ( TYPE *  mem,
__int64  row,
__int64  col,
bool  own = 0 
)
inline
template<class TYPE>
klMatrix< TYPE >::klMatrix ( klMemMgr mgr,
__int64  row,
__int64  col 
)
inline
template<class TYPE>
klMatrix< TYPE >::klMatrix ( __int64  row,
__int64  col 
)
inline
template<class TYPE>
klMatrix< TYPE >::klMatrix ( )
inline
template<class TYPE>
klMatrix< TYPE >::klMatrix ( const klMatrix< TYPE > &  src)
inline
template<class TYPE>
klMatrix< TYPE >::klMatrix ( klMatrix< TYPE > &&  src)
inline
template<class TYPE>
klMatrix< TYPE >::~klMatrix ( )
inline

Member Function Documentation

template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::columnToRowMajor ( )
inline

Here is the caller graph for this function:

template<class TYPE>
TYPE klMatrix< TYPE >::ConditionNumber ( bool  ellone = 0)
inline

Here is the caller graph for this function:

template<>
float klMatrix< float >::ConditionNumber ( bool  ellone)

Here is the call graph for this function:

template<class TYPE>
complex<double> klMatrix< TYPE >::det ( )
inline

Here is the caller graph for this function:

template<class TYPE>
klVector<TYPE> klMatrix< TYPE >::diag ( )
inline
template<class TYPE>
klVector<complex<double> > klMatrix< TYPE >::eigenvalues ( )
inline

Here is the caller graph for this function:

template<class TYPE>
klVector<TYPE> klMatrix< TYPE >::getColumn ( __int64  col)
inline

Here is the caller graph for this function:

template<class TYPE>
__int64 klMatrix< TYPE >::getColumns ( ) const
inline

Here is the caller graph for this function:

template<class TYPE>
klMemMgr* klMatrix< TYPE >::getMemMgr ( ) const
inline
template<class TYPE>
TYPE* klMatrix< TYPE >::getMemory ( ) const
inline

Here is the caller graph for this function:

template<class TYPE>
__int64 klMatrix< TYPE >::getRows ( ) const
inline

Here is the caller graph for this function:

template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::getSubBlock ( __int64  i,
__int64  j,
__int64  k,
__int64  l 
)
inline

Here is the caller graph for this function:

template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::inverse ( ) const
inline

Here is the caller graph for this function:

template<class TYPE>
bool klMatrix< TYPE >::isContiguous ( ) const
inline
template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::lower ( )
inline

Here is the caller graph for this function:

template<class TYPE>
void klMatrix< TYPE >::makeNanFriendly ( )
inline

Here is the caller graph for this function:

template<class TYPE>
TYPE klMatrix< TYPE >::norm ( bool  ell_infty = 0)
inline

Here is the caller graph for this function:

template<>
float klMatrix< float >::norm ( bool  ell_infty)
template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::operator* ( klMatrix< TYPE >  a) const
inline
template<class TYPE>
klVector<TYPE> klMatrix< TYPE >::operator* ( klVector< TYPE >  a) const
inline
template<>
klMatrix< float > klMatrix< float >::operator* ( klMatrix< float >  a) const

Here is the call graph for this function:

template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator*= ( const klMatrix< TYPE > &  a)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator*= ( TYPE  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator+= ( TYPE  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator+= ( const klMatrix< TYPE > &  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator-= ( const klMatrix< TYPE > &  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator-= ( TYPE  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator/= ( TYPE  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator/= ( const klMatrix< TYPE > &  c)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator= ( const klMatrix< TYPE > &  src)
inline
template<class TYPE>
klMatrix<TYPE>& klMatrix< TYPE >::operator= ( TYPE  c)
inline
template<class TYPE>
bool klMatrix< TYPE >::operator== ( const klMatrix< TYPE > &  m) const
inline
template<class TYPE>
klVector<TYPE>& klMatrix< TYPE >::operator[] ( __int64  row) const
inline

Here is the caller graph for this function:

template<class TYPE>
size_t klMatrix< TYPE >::precision ( ) const
inline
template<class TYPE>
void klMatrix< TYPE >::setColumn ( __int64  i,
klVector< TYPE >  v 
)
inline
template<class TYPE>
void klMatrix< TYPE >::setRow ( __int64  j,
klVector< TYPE >  r 
)
inline

Here is the caller graph for this function:

template<class TYPE>
void klMatrix< TYPE >::setSubBlock ( klMatrix< TYPE >  block,
__int64  i,
__int64  j 
)
inline

Here is the caller graph for this function:

template<class TYPE>
void klMatrix< TYPE >::setup ( __int64  row,
__int64  col,
klMemMgr mgr = 0 
)
inline

Here is the caller graph for this function:

template<class TYPE>
void klMatrix< TYPE >::threshold ( double  low = DBL_MIN,
double  lowVal = DBL_MIN,
double  high = DBL_MAX,
double  highVal = DBL_MAX 
)
inline

Here is the caller graph for this function:

template<class TYPE>
TYPE klMatrix< TYPE >::trace ( )
inline
template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::transpose ( ) const
inline

Here is the caller graph for this function:

template<class TYPE>
klMatrix<TYPE> klMatrix< TYPE >::upper ( )
inline

Here is the caller graph for this function:

Field Documentation

template<class TYPE>
__int64 klMatrix< TYPE >::_col
protected
template<class TYPE>
bool klMatrix< TYPE >::_contiguous
protected
template<class TYPE>
vector<std::string> klMatrix< TYPE >::_dimensionNames
template<class TYPE>
string klMatrix< TYPE >::_filename
protected
template<class TYPE>
TYPE* klMatrix< TYPE >::_memory
protected
template<class TYPE>
klMemMgr* klMatrix< TYPE >::_mgr
protected
template<class TYPE>
__int64 klMatrix< TYPE >::_own
mutableprotected
template<class TYPE>
__int64 klMatrix< TYPE >::_row
protected
template<class TYPE>
klVector<TYPE>* klMatrix< TYPE >::_vectors
protected

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