C++QEDCore  v2 Milestone 10
a framework for simulating open quantum dynamics – core
cpputils::MultiIndexIterator< RANK > Class Template Reference

An iterator over all possible combinations of indices (a number of integers) between certain bounds. More...

#include <MultiIndexIterator.h>

+ Inheritance diagram for cpputils::MultiIndexIterator< RANK >:
+ Collaboration diagram for cpputils::MultiIndexIterator< RANK >:

Public Types

typedef Base::value_type MultiIndex
 
typedef MultiIndex::T_numtype SingleIndex
 

Public Member Functions

MultiIndexIteratoroperator= (const MultiIndexIterator &other)
 
Constructors
 MultiIndexIterator (const MultiIndex &lbound, const MultiIndex &ubound, mii::Begin)
 Initialization to the beginning of the sequence. More...
 
 MultiIndexIterator (const MultiIndex &lbound, const MultiIndex &ubound, mii::End)
 ” to the end of the sequence (which is in fact beyond the end by one)
 
 MultiIndexIterator (const MultiIndex &ubound, mii::Begin b)
 
 MultiIndexIterator (const MultiIndex &ubound, mii::End e)
 
InputIterator operations
MultiIndexIteratoroperator++ ()
 
const MultiIndex & operator* () const
 
MultiIndex & operator* ()
 
Convenience
const MultiIndexIterator getBegin () const
 
const MultiIndexIterator getEnd () const
 
MultiIndexIteratorsetToBegin ()
 
MultiIndexIteratorsetToEnd ()
 

Friends

bool operator== (const MultiIndexIterator &i1, const MultiIndexIterator &i2)
 Comparison only for the actual values referred to. The user has to take care that the bounds are actually the same!
 

Detailed Description

template<int RANK>
class cpputils::MultiIndexIterator< RANK >

An iterator over all possible combinations of indices (a number of integers) between certain bounds.

Models an input iterator.

Template Parameters
RANKthe number of indices

Definition at line 42 of file MultiIndexIterator.h.

Constructor & Destructor Documentation

template<int RANK>
cpputils::MultiIndexIterator< RANK >::MultiIndexIterator ( const MultiIndex &  lbound,
const MultiIndex &  ubound,
mii::Begin   
)
inline

Initialization to the beginning of the sequence.

Parameters
lboundtiny vector comprising the sequence of lower bounds
uboundtiny vector comprising the sequence of upper bounds (inclusive!)

Definition at line 56 of file MultiIndexIterator.h.

template<int RANK>
cpputils::MultiIndexIterator< RANK >::MultiIndexIterator ( const MultiIndex &  ubound,
mii::Begin  b 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.lbound is all-zero

Parameters
uboundtiny vector comprising the sequence of upper bounds (inclusive!)

Definition at line 66 of file MultiIndexIterator.h.

template<int RANK>
cpputils::MultiIndexIterator< RANK >::MultiIndexIterator ( const MultiIndex &  ubound,
mii::End  e 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.lbound is all-zero

Definition at line 72 of file MultiIndexIterator.h.


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