Matrix< T > Class Template Reference
[Utilities]

#include <Matrix.h>

Collaboration diagram for Matrix< T >:

Collaboration graph
[legend]

List of all members.

Classes

class  Row
 Helper class for array-like access - only for use in this class. More...

Public Member Functions

 Matrix (size_t n, size_t m, T v=static_cast< T >(0))
 Matrix (Matrix< T > const &other)
 ~Matrix ()
 Destructor.
const size_t getN () const
const size_t getM () const
T & at (size_t i, size_t j)
T & operator() (size_t i, size_t j)
get (size_t i, size_t j) const
void set (size_t i, size_t j, T v)
Matrix< T > & operator= (Matrix< T > const &other)
Row operator[] (size_t i)
Matrix< T > transposed ()
Matrix< T > & transposeSelf ()
Matrix< T > & operator+= (Matrix< T > &right)
Matrix< T > & operator-= (Matrix< T > &right)
Matrix< T > & operator*= (Matrix< T > &right)
Matrix< T > & operator*= (T scalar)


Detailed Description

template<typename T>
class Matrix< T >

Class representing a matrix - used in HMM

Definition at line 14 of file Matrix.h.


Constructor & Destructor Documentation

template<typename T >
Matrix< T >::Matrix ( size_t  n,
size_t  m,
v = static_cast<T>(0) 
) [inline]

Parameters:
n width of matrix
m height of matrix
v initial value for all fields

Definition at line 145 of file Matrix.h.

template<typename T >
Matrix< T >::Matrix ( Matrix< T > const &  other  )  [inline]

Copycon

Parameters:
other Matrix to be copied

Definition at line 155 of file Matrix.h.

template<typename T >
Matrix< T >::~Matrix (  )  [inline]

Destructor.

Definition at line 167 of file Matrix.h.


Member Function Documentation

template<typename T >
T & Matrix< T >::at ( size_t  i,
size_t  j 
) [inline]

Parameters:
i row
j column
Returns:
a reference to the element at i,m

Definition at line 174 of file Matrix.h.

template<typename T >
T Matrix< T >::get ( size_t  i,
size_t  j 
) const [inline]

Parameters:
i row
j column
Returns:
element at i,m

Definition at line 189 of file Matrix.h.

template<typename T >
const size_t Matrix< T >::getM (  )  const [inline]

Returns:
height of matrix

Definition at line 55 of file Matrix.h.

template<typename T >
const size_t Matrix< T >::getN (  )  const [inline]

Returns:
width of matrix

Definition at line 52 of file Matrix.h.

template<typename T >
T& Matrix< T >::operator() ( size_t  i,
size_t  j 
) [inline]

Parameters:
i row
j column
Returns:
a reference to the element at i,m

Definition at line 69 of file Matrix.h.

template<typename T >
Matrix< T > & Matrix< T >::operator*= ( scalar  )  [inline]

Multiply scalar with this matrix

Parameters:
scalar scalar to multiply with
Returns:
self

Definition at line 324 of file Matrix.h.

template<typename T >
Matrix< T > & Matrix< T >::operator*= ( Matrix< T > &  right  )  [inline]

Multiply matrix with this matrix

Parameters:
right matrix to multiply with
Returns:
self

Definition at line 299 of file Matrix.h.

template<typename T >
Matrix< T > & Matrix< T >::operator+= ( Matrix< T > &  right  )  [inline]

Add matrix to this matrix

Parameters:
right matrix to add
Returns:
self

Definition at line 253 of file Matrix.h.

template<typename T >
Matrix< T > & Matrix< T >::operator-= ( Matrix< T > &  right  )  [inline]

Substract matrix from this matrix

Parameters:
right matrix to substract
Returns:
self

Definition at line 276 of file Matrix.h.

template<typename T >
Matrix< T > & Matrix< T >::operator= ( Matrix< T > const &  other  )  [inline]

Parameters:
other matrix to be copied
Returns:
reference to self

Definition at line 211 of file Matrix.h.

template<typename T >
Row Matrix< T >::operator[] ( size_t  i  )  [inline]

helper for two dimensional array-like accessing of values

Parameters:
i row
Returns:
a Row object for further access

Definition at line 96 of file Matrix.h.

template<typename T >
void Matrix< T >::set ( size_t  i,
size_t  j,
v 
) [inline]

Parameters:
i row
j column
v element to be set to i,m

Definition at line 205 of file Matrix.h.

template<typename T >
Matrix< T > Matrix< T >::transposed (  )  [inline]

Transpose Matrix. Note: this does not affect this matrix. If you want to do this, use transposeSelf instead!

Returns:
the transposed matrix.

Definition at line 241 of file Matrix.h.

template<typename T >
Matrix< T > & Matrix< T >::transposeSelf (  )  [inline]

Transpose Matrix. Note: this affects this matrix. If you do not want this, use transposed instead!

Returns:
self

Definition at line 233 of file Matrix.h.


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

Generated on Sun Nov 30 23:45:40 2008 for Modular Motion Processor by  doxygen 1.5.7.1