ContRap-Libraries
Public Member Functions | Protected Attributes

crp::GLMatrix< rows, columns > Class Template Reference

Class DoubleMatrix is a storage for matrices with static size. More...

#include <glmath.h>

Public Member Functions

 GLMatrix ()
 Empty constructor.
 ~GLMatrix ()
 Destrcutor.
 GLMatrix (const GLMatrix &matrix)
 Copy constructor.
void make_diagonal (double zero=0.0, double diag=1.0)
 Creates a diagonal matrix.
double & operator() (int row, int column)
 Accesses an element of the matrix.
const double & operator() (int row, int column) const
 Accesses an element of the matrix.

Protected Attributes

double * data
 Matrix elements.

Detailed Description

template<int rows, int columns>
class crp::GLMatrix< rows, columns >

Class DoubleMatrix is a storage for matrices with static size.


Constructor & Destructor Documentation

template<int rows, int columns>
crp::GLMatrix< rows, columns >::GLMatrix ( ) [inline]

Empty constructor.

template<int rows, int columns>
crp::GLMatrix< rows, columns >::~GLMatrix ( ) [inline]

Destrcutor.

template<int rows, int columns>
crp::GLMatrix< rows, columns >::GLMatrix ( const GLMatrix< rows, columns > &  matrix) [inline]

Copy constructor.

Parameters:
matrixMatrix to copy

Member Function Documentation

template<int rows, int columns>
void crp::GLMatrix< rows, columns >::make_diagonal ( double  zero = 0.0,
double  diag = 1.0 
) [inline]

Creates a diagonal matrix.

Parameters:
zeroZero element
diagElement in the diagonal
template<int rows, int columns>
const double& crp::GLMatrix< rows, columns >::operator() ( int  row,
int  column 
) const [inline]

Accesses an element of the matrix.

Parameters:
rowRow coordinate of the element
columnColumn coordinate of the element
Returns:
Array value
template<int rows, int columns>
double& crp::GLMatrix< rows, columns >::operator() ( int  row,
int  column 
) [inline]

Accesses an element of the matrix.

Parameters:
rowRow coordinate of the element
columnColumn coordinate of the element
Returns:
Array cell values

Field Documentation

template<int rows, int columns>
double* crp::GLMatrix< rows, columns >::data [protected]

Matrix elements.


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