Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Classes | Public Member Functions | Protected Member Functions | Private Attributes
concepts::MultiArray< dim, T > Class Template Reference

Container typename for multidimensional Array which is based on std::map. More...

#include <multiArray.hh>

Inheritance diagram for concepts::MultiArray< dim, T >:
Inheritance graph
[legend]
Collaboration diagram for concepts::MultiArray< dim, T >:
Collaboration graph
[legend]

List of all members.

Classes

class  Scanner
 Class for scanning (iterating) over the array in all dimensions. More...

Public Member Functions

void clear ()
 Clears the array.
void commute (uint i[dim]) const
 if commutable_ then order the smallest index to front
void erase (const uint i[dim])
 Erase entry i.
void erase (uint i[dim])
bool isElm (const uint i[dim]) const
 Checks if the element exists.
bool isElm (uint i[dim]) const
 MultiArray (bool commutable=false)
 Constructor If commutable then the order of the indices is not important, e.g.
T & operator[] (uint i[dim])
const T & operator[] (const uint i[dim]) const
 Index operator for the container.
T & operator[] (const uint i[dim])
 Index operator for the container.
const T & operator[] (uint i[dim]) const
Scannerscan () const
uint size () const
 Size.
 ~MultiArray ()

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.

Private Attributes

const bool commutable_
 flag for commutability
std::map< uint, MultiArray
< dim-1, T > > 
data_
 array of arrays of the dimension dim-1

Detailed Description

template<uint dim, typename T>
class concepts::MultiArray< dim, T >

Container typename for multidimensional Array which is based on std::map.

Is recursivly defined.

Author:
Kersten Schmidt, 2004

Definition at line 166 of file multiArray.hh.


Constructor & Destructor Documentation

template<uint dim, typename T>
concepts::MultiArray< dim, T >::MultiArray ( bool  commutable = false) [inline]

Constructor If commutable then the order of the indices is not important, e.g.

(i,j) and (j,i) have the same entrance.

Definition at line 231 of file multiArray.hh.

template<uint dim, typename T>
concepts::MultiArray< dim, T >::~MultiArray ( ) [inline]

Definition at line 232 of file multiArray.hh.


Member Function Documentation

template<uint dim, typename T >
void concepts::MultiArray< dim, T >::clear ( )

Clears the array.

Definition at line 390 of file multiArray.hh.

Here is the call graph for this function:

template<uint dim, typename T >
void concepts::MultiArray< dim, T >::commute ( uint  i[dim]) const

if commutable_ then order the smallest index to front

Definition at line 348 of file multiArray.hh.

template<uint dim, typename T >
void concepts::MultiArray< dim, T >::erase ( const uint  i[dim])

Erase entry i.

Definition at line 358 of file multiArray.hh.

Here is the call graph for this function:

template<uint dim, typename T>
void concepts::MultiArray< dim, T >::erase ( uint  i[dim])
template<uint dim, typename T >
std::ostream & concepts::MultiArray< dim, T >::info ( std::ostream &  os) const [protected, virtual]

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Definition at line 398 of file multiArray.hh.

template<uint dim, typename T >
bool concepts::MultiArray< dim, T >::isElm ( const uint  i[dim]) const

Checks if the element exists.

Definition at line 331 of file multiArray.hh.

Here is the call graph for this function:

template<uint dim, typename T>
bool concepts::MultiArray< dim, T >::isElm ( uint  i[dim]) const
template<uint dim, typename T>
T& concepts::MultiArray< dim, T >::operator[] ( uint  i[dim])
template<uint dim, typename T>
const T& concepts::MultiArray< dim, T >::operator[] ( uint  i[dim]) const
template<uint dim, typename T >
const T & concepts::MultiArray< dim, T >::operator[] ( const uint  i[dim]) const

Index operator for the container.

Returns:
The (i,j)th element of the array.

Definition at line 305 of file multiArray.hh.

Here is the call graph for this function:

template<uint dim, typename T >
T & concepts::MultiArray< dim, T >::operator[] ( const uint  i[dim])

Index operator for the container.

If an item is not existing, it is created, inserted into the array and then returned.

Returns:
The (i,j)th element of the array.

Definition at line 274 of file multiArray.hh.

Here is the call graph for this function:

template<uint dim, typename T>
Scanner* concepts::MultiArray< dim, T >::scan ( ) const [inline]

Definition at line 249 of file multiArray.hh.

template<uint dim, typename T >
uint concepts::MultiArray< dim, T >::size ( ) const

Size.

Definition at line 380 of file multiArray.hh.

Here is the call graph for this function:


Member Data Documentation

template<uint dim, typename T>
const bool concepts::MultiArray< dim, T >::commutable_ [private]

flag for commutability

Definition at line 270 of file multiArray.hh.

template<uint dim, typename T>
std::map<uint, MultiArray<dim-1, T> > concepts::MultiArray< dim, T >::data_ [private]

array of arrays of the dimension dim-1

Definition at line 268 of file multiArray.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)