Matrix< T, M, N > Class Template Reference

A template class for storing a two-dimensional array of constant size. More...

#include "Matrix.hpp"

Public Types

typedef T value_type
typedef T * pointer
typedef T & reference
typedef T const & const_reference
typedef std::size_t size_type

Public Member Functions

construction / destruction

n.b.: use clear() to initialize the Matrix

 Matrix ()
 Matrix (const Matrix &other)
 ~Matrix ()
initialization

}@

all elements are set to T()

void clear ()
assignment, swapping

}@

Matrixoperator= (const Matrix &other)
void swap (Matrix &other)
direct data access

}@

zero-based indexing

reference operator() (size_type r, size_type c)
const_reference operator() (size_type r, size_type c) const
size

}@

size_type nRows () const
size_type nCols () const

Static Public Attributes

static const size_type _nRows = M
static const size_type _nCols = N

Detailed Description

template<class T, std::size_t M, std::size_t N>
class opals::Matrix< T, M, N >

A template class for storing a two-dimensional array of constant size.

Template Parameters
Telement type
Mnumber of rows
Nnumber of columns

Symbols for Matrix are exported to opals DLLs as required by their modules' interfaces, meaning that DLL users are able to instantiate Matrix<T,M,N> only with the corresponding template arguments. The interface is based on boost::numeric::ublas::c_matrix

Author
wk
Date
06.02.2011