CMatrix< T > Class Template Reference

Class representing matrix. More...

#include <matrix.h>

List of all members.

Public Member Functions

 CMatrix (int columns=0, int rows=0, T e=0)
 ~CMatrix ()
 CMatrix (const char *fileName)
 CMatrix (const CMatrix &v)
 CMatrix (const CVector< T > &v)
 Constructs diagonal matrix with vector v as the diagonal.
CMatrixoperator= (const CMatrix &v)
CMatrix operator* (const CMatrix &v) const
 Composition of matrices.
CMatrix operator* (T a) const
 Multiplication with scalar.
CVector< T > operator() (const CVector< T > &v) const
 Computing value on the vector v.
CMatrix operator+ (const CMatrix &v) const
CMatrix operator- (const CMatrix &v) const
int getColumn (int a, CVector< T > &v) const
int getRow (int a, CVector< T > &v) const
int putColumn (int a, const CVector< T > &v)
int putRow (int a, const CVector< T > &v)
T & operator() (int i, int j)
 Returns a reference to given element.
el (int i, int j) const
 Returns a value of given element.
CMatrix< T > operator^ (int n) const
 Power operator.
norm1 () const
 Norm maximum.
norm2 () const
 Euclidean norm.
normInf () const
 Norm one.
void round (T epsilon)
 Rounding elements.
int columnsNumber () const
int rowsNumber () const
int write (const char *name, int precision) const
bool isSymmetric () const
bool isSquare () const
CMatrix transpose () const

Private Member Functions

void swapColumns (int a, int b)
void swapRows (int a, int b)
void multiplyCol (int a, T e)
void multiplyRow (int a, T e)
void substractMultiplyCol (int a, int b, T e)
void substractMultiplyRow (int a, int b, T e)

Private Attributes

T ** elements
int columns
int rows


Detailed Description

template<class T>
class CMatrix< T >

Class representing matrix.

Constructor & Destructor Documentation

template<class T>
CMatrix< T >::CMatrix ( int  columns = 0,
int  rows = 0,
e = 0 
) [inline]

template<class T>
CMatrix< T >::~CMatrix (  )  [inline]

template<class T>
CMatrix< T >::CMatrix ( const char *  fileName  )  [inline]

template<class T>
CMatrix< T >::CMatrix ( const CMatrix< T > &  v  )  [inline]

template<class T>
CMatrix< T >::CMatrix ( const CVector< T > &  v  )  [inline]

Constructs diagonal matrix with vector v as the diagonal.


Member Function Documentation

template<class T>
void CMatrix< T >::swapColumns ( int  a,
int  b 
) [inline, private]

template<class T>
void CMatrix< T >::swapRows ( int  a,
int  b 
) [inline, private]

template<class T>
void CMatrix< T >::multiplyCol ( int  a,
e 
) [private]

template<class T>
void CMatrix< T >::multiplyRow ( int  a,
e 
) [private]

template<class T>
void CMatrix< T >::substractMultiplyCol ( int  a,
int  b,
e 
) [inline, private]

template<class T>
void CMatrix< T >::substractMultiplyRow ( int  a,
int  b,
e 
) [inline, private]

template<class T>
CMatrix< T > & CMatrix< T >::operator= ( const CMatrix< T > &  v  )  [inline]

template<class T>
CMatrix< T > CMatrix< T >::operator* ( const CMatrix< T > &  v  )  const [inline]

Composition of matrices.

template<class T>
CMatrix< T > CMatrix< T >::operator* ( a  )  const [inline]

Multiplication with scalar.

template<class T>
CVector< T > CMatrix< T >::operator() ( const CVector< T > &  v  )  const [inline]

Computing value on the vector v.

template<class T>
CMatrix< T > CMatrix< T >::operator+ ( const CMatrix< T > &  v  )  const [inline]

template<class T>
CMatrix< T > CMatrix< T >::operator- ( const CMatrix< T > &  v  )  const [inline]

template<class T>
int CMatrix< T >::getColumn ( int  a,
CVector< T > &  v 
) const [inline]

template<class T>
int CMatrix< T >::getRow ( int  a,
CVector< T > &  v 
) const [inline]

template<class T>
int CMatrix< T >::putColumn ( int  a,
const CVector< T > &  v 
) [inline]

template<class T>
int CMatrix< T >::putRow ( int  a,
const CVector< T > &  v 
) [inline]

template<class T>
T& CMatrix< T >::operator() ( int  i,
int  j 
) [inline]

Returns a reference to given element.

Allows to change the element in the matrix. No indices checking implemented.

template<class T>
T CMatrix< T >::el ( int  i,
int  j 
) const [inline]

Returns a value of given element.

Does not change the element of the matrix. No indices checking implemented.

template<class T>
CMatrix< T > CMatrix< T >::operator^ ( int  n  )  const [inline]

Power operator.

Implemented only for (-1) power. Dimension 2 treated separately.

template<class T>
T CMatrix< T >::norm1 (  )  const [inline]

Norm maximum.

Returns the maximal sum of absolute values among rows of the matrix.

template<class T>
T CMatrix< T >::norm2 (  )  const [inline]

Euclidean norm.

Returns square root of sum of squares of all matrix elements.

template<class T>
T CMatrix< T >::normInf (  )  const [inline]

Norm one.

Returns the maximal sum of absolute values among columnof the matrix.

template<class T>
void CMatrix< T >::round ( epsilon  )  [inline]

Rounding elements.

Any matrix element which absolute value is less than epsilon is changed to 0.

template<class T>
int CMatrix< T >::columnsNumber (  )  const [inline]

template<class T>
int CMatrix< T >::rowsNumber (  )  const [inline]

template<class T>
int CMatrix< T >::write ( const char *  name,
int  precision 
) const [inline]

template<class T>
bool CMatrix< T >::isSymmetric (  )  const [inline]

template<class T>
bool CMatrix< T >::isSquare (  )  const [inline]

template<class T>
CMatrix< T > CMatrix< T >::transpose (  )  const [inline]


Member Data Documentation

template<class T>
T** CMatrix< T >::elements [private]

template<class T>
int CMatrix< T >::columns [private]

template<class T>
int CMatrix< T >::rows [private]


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

Generated on Sat May 24 19:47:31 2008 for Semi-hyperbolicity by  doxygen 1.5.5