Open PaperOpt
Array2D< T > Class Template Reference

#include <Array2D.h>

List of all members.

Public Member Functions

 Array2D ()
 Array2D (int _rows, int _columns)
 Array2D (const Array2D< T > &m)
 ~Array2D ()
T * operator[] (int i)
const T * operator[] (int i) const
T & operator() (int i, int j)
const T & operator() (int i, int j) const
Array2D< T > & operator= (const Array2D< T > &m)
const V3< T > row (int i) const
void SetRow (int i, const V3< T > &v)
const Array2D< T > operator* (const Array2D< T > &m) const
const V3< T > operator* (const V3< T > &v) const
const Array2D< T > transpose () const
void identity (void)
const int GetColumns () const
const int GetRows () const

Public Attributes

int rows
int columns

template<class T>
class Array2D< T >


Constructor & Destructor Documentation

template<class T>
Array2D< T >::Array2D ( ) [inline]
template<class T>
Array2D< T >::Array2D ( int  _rows,
int  _columns 
) [inline]

Constructor.

Parameters:
_rowsRepresents rows of matrix.
_columnsRepresents columns of matrix.
template<class T>
Array2D< T >::Array2D ( const Array2D< T > &  m) [inline]

Copy constructor.

Parameters:
mArray2D to copy.
template<class T>
Array2D< T >::~Array2D ( ) [inline]

Member Function Documentation

template<class T>
const int Array2D< T >::GetColumns ( ) const [inline]

Here is the caller graph for this function:

template<class T>
const int Array2D< T >::GetRows ( ) const [inline]

Here is the caller graph for this function:

template<class T>
void Array2D< T >::identity ( void  ) [inline]

Set to identity matrix.

Returns:
void
template<class T>
T& Array2D< T >::operator() ( int  i,
int  j 
) [inline]
template<class T>
const T& Array2D< T >::operator() ( int  i,
int  j 
) const [inline]
template<class T>
const Array2D<T> Array2D< T >::operator* ( const Array2D< T > &  m) const [inline]

Array2D <T> multiplicator.

Parameters:
mSecond matrix in multiplication.
Returns:
Array2D <T> Product.
template<class T>
const V3<T> Array2D< T >::operator* ( const V3< T > &  v) const [inline]

Vector multiplication.

Parameters:
vVector.
Returns:
V3 Resulting vector.
template<class T>
Array2D<T>& Array2D< T >::operator= ( const Array2D< T > &  m) [inline]
template<class T>
T* Array2D< T >::operator[] ( int  i) [inline]
template<class T>
const T* Array2D< T >::operator[] ( int  i) const [inline]
template<class T>
const V3<T> Array2D< T >::row ( int  i) const [inline]

Get row as a vector.

Only works with matrices with 3 columns.

Parameters:
iRow to return.
Returns:
V3 Row number i as a vector.
template<class T>
void Array2D< T >::SetRow ( int  i,
const V3< T > &  v 
) [inline]

Fill row with a vector.

Only works with matrices with 3 columns.

Parameters:
iRow to set.
Returns:
void
template<class T>
const Array2D<T> Array2D< T >::transpose ( ) const [inline]

Transpose.

Returns:
Array2D <T> Transpose.

Member Data Documentation

template<class T>
int Array2D< T >::columns
template<class T>
int Array2D< T >::rows

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