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. More... | |
IndexIterator (int ndim, const long limits[]) | |
Iterates dimension d from 0 to limts[d]-1 inclusive. More... | |
IndexIterator (int ndim, long top) | |
Iterates all dimensions from 0 to top-1 inclusive. More... | |
virtual | ~IndexIterator () |
operator bool () const | |
const std::vector< long > & | operator* () const |
virtual IndexIterator & | operator++ () |
this function should be abstracted and deprecated More... | |
long | operator[] (int d) const |
IndexIterator & | reset () |
Static Public Member Functions | |
static void | test () |
this function should also be deprecated More... | |
Protected Attributes | |
bool | finished |
std::vector< long > | i |
Current index. More... | |
std::vector< long > | n |
User specified upper limits for each dimension. More... | |
Private Member Functions | |
IndexIterator () | |
Bury the default constructor. More... | |
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 |
|
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::NonstandardIndexIterator, madness::LowDimIndexIterator, and madness::HighDimIndexIterator.
|
inline |
References d(), finished, i, and MADNESS_ASSERT.
|
inline |
|
inlinestatic |
this function should also be deprecated
References n, and madness::print().
|
protected |
|
protected |
|
protected |
User specified upper limits for each dimension.
Referenced by IndexIterator(), operator++(), madness::HighDimIndexIterator::operator++(), madness::LowDimIndexIterator::operator++(), madness::NonstandardIndexIterator::operator++(), reset(), and test().