MADNESS 0.10.1
|
#include <indexit.h>
Public Member Functions | |
template<typename V > | |
IndexIterator (const V &limits) | |
Iterates dimension d from 0 to limts[d]-1 inclusive. | |
IndexIterator (int ndim, const long limits[]) | |
Iterates dimension d from 0 to limts[d]-1 inclusive. | |
IndexIterator (int ndim, long top) | |
Iterates all dimensions from 0 to top-1 inclusive. | |
virtual | ~IndexIterator () |
operator bool () const | |
const std::vector< long > & | operator* () const |
virtual IndexIterator & | operator++ () |
this function should be abstracted and deprecated | |
long | operator[] (int d) const |
IndexIterator & | reset () |
Static Public Member Functions | |
static void | test () |
this function should also be deprecated | |
Protected Attributes | |
bool | finished |
std::vector< long > | i |
Current index. | |
std::vector< long > | n |
User specified upper limits for each dimension. | |
Private Member Functions | |
IndexIterator () | |
Bury the default constructor. | |
Facilitates iteration through a multidimension index space. Since there are multiple ways for navigating index space (column- vs. row-major, etc.), this class should be abstract, with an abstract ++ operator. The original IndexIterator assumed the highest dimension (NDIM-1) would be iterated quickest (this index changes each time ++ is called), however, sometimes a different order is desired.
For legacy purposes, operator++ is thus NOT abstract, but has the implementation of the HighDimIndexIterator defined below. Eventually, the IndexIterator::operator++ should be deprecated, and such instances of IndexIterator replaced with HighDimIndexIterator.
|
inlineprivate |
Bury the default constructor.
|
inline |
|
inline |
Iterates all dimensions from 0 to top-1 inclusive.
|
inlinevirtual |
|
inline |
References finished.
|
inline |
References finished, i, and MADNESS_ASSERT.
|
inlinevirtual |
this function should be abstracted and deprecated
Reimplemented in madness::HighDimIndexIterator, madness::LowDimIndexIterator, and madness::NonstandardIndexIterator.
|
inline |
References d, finished, i, and MADNESS_ASSERT.
|
inline |
|
inlinestatic |
this function should also be deprecated
References n, and madness::print().
|
protected |
|
protected |
Current index.
Referenced by madness::NonstandardIndexIterator::NonstandardIndexIterator(), madness::NonstandardIndexIterator::NonstandardIndexIterator(), madness::NonstandardIndexIterator::NonstandardIndexIterator(), madness::NonstandardIndexIterator::NonstandardIndexIterator(), operator*(), operator++(), madness::HighDimIndexIterator::operator++(), madness::LowDimIndexIterator::operator++(), madness::NonstandardIndexIterator::operator++(), operator[](), and reset().
|
protected |
User specified upper limits for each dimension.
Referenced by IndexIterator(), IndexIterator(), operator++(), madness::HighDimIndexIterator::operator++(), madness::LowDimIndexIterator::operator++(), madness::NonstandardIndexIterator::operator++(), reset(), and test().