Cube< T > Class Template Reference

template for 3D matrix More...

#include <Cube.hpp>

List of all members.

Classes

class  BadSize
class  BoundsViolation

Public Member Functions

 Cube (unsigned nx, unsigned ny, unsigned nz)
 constructor
void resize (unsigned nx, unsigned ny, unsigned nz)
 resize the cube
T & operator() (unsigned i, unsigned j, unsigned k)
const T & operator() (unsigned i, unsigned j, unsigned k) const
unsigned nx () const
unsigned ny () const
unsigned nz () const

Private Attributes

std::vector< std::vector
< std::vector< T > > > 
_data


Detailed Description

template<typename T>
class Cube< T >

template for 3D matrix

Note: bounds checking is done for the supscript operaters () so don't use this class is speed is of the essence, or implement a method allowing element access without checking the bounds.


Member Data Documentation

template<typename T>
std::vector<std::vector<std::vector<T> > > Cube< T >::_data [private]

vector of vectors of vectors storing the data. Note that we could use just a std::vector<T>, replacing _data[i][j][k] by _data[i*ny*nz + j*nz + k]


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

Generated on Fri Oct 16 18:59:58 2009 for HYPLOT by  doxygen 1.5.8