Class documentation of Concepts

Loading...
Searching...
No Matches
concepts::MultiArray< dim, T > Class Template Reference

#include <multiArray.hh>

Inheritance diagram for concepts::MultiArray< dim, T >:
concepts::OutputOperator

Classes

class  Scanner
 

Public Member Functions

 MultiArray (bool commutable=false)
 
T & operator[] (const uint i[dim])
 
T & operator[] (uint i[dim])
 
const T & operator[] (const uint i[dim]) const
 
const T & operator[] (uint i[dim]) const
 
Scannerscan () const
 
bool isElm (const uint i[dim]) const
 
bool isElm (uint i[dim]) const
 
void commute (uint i[dim]) const
 if commutable_ then order the smallest index to front
 
void erase (const uint i[dim])
 
void erase (uint i[dim])
 
void erase_last ()
 
uint size () const
 Size.
 
void clear ()
 Clears the array.
 

Protected Member Functions

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

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 169 of file multiArray.hh.

Constructor & Destructor Documentation

◆ MultiArray()

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 234 of file multiArray.hh.

◆ ~MultiArray()

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

Definition at line 235 of file multiArray.hh.

Member Function Documentation

◆ clear()

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

Clears the array.

Definition at line 403 of file multiArray.hh.

◆ commute()

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 354 of file multiArray.hh.

◆ erase()

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

Erase entry i

Definition at line 364 of file multiArray.hh.

◆ erase_last()

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

Erase last entry

Definition at line 386 of file multiArray.hh.

◆ info()

template<uint dim, typename T >
std::ostream & concepts::MultiArray< dim, T >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Definition at line 411 of file multiArray.hh.

◆ isElm()

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

Checks if the element exists

Definition at line 337 of file multiArray.hh.

◆ operator[]() [1/2]

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 280 of file multiArray.hh.

◆ operator[]() [2/2]

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 311 of file multiArray.hh.

◆ scan()

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

Definition at line 252 of file multiArray.hh.

◆ size()

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

Size.

Definition at line 393 of file multiArray.hh.


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