Matrix Class Reference

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

#include "Matrix.hpp"

Public Member Functions

void swap (Matrix &other)
 swap
 
element access

zero-based indexing

T & operator() (size_t r, size_t c)
 
const T & operator() (size_t r, size_t c) const
 
size
size_t nRows () const
 
size_t nCols () const
 

Detailed Description

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

Template Parameters
Telement type
nRows_number of rows
nCols_number of columns

Matrix fulfills almost all the requirements of an STL reversible container. The complete implementation is exposed and hence, opals users may instantiate Matrix<T, nRows_, nCols_> with arbitrary template arguments. The class inherits most of its functionality from std::array, with elements stored in row-major order.

Author
wk
Date
06.02.2011