MADNESS  version 0.9
Public Member Functions | Protected Attributes | List of all members
madness::NonstandardIndexIterator Class Reference

#include <indexit.h>

Inheritance diagram for madness::NonstandardIndexIterator:
Inheritance graph
[legend]
Collaboration diagram for madness::NonstandardIndexIterator:
Collaboration graph
[legend]

Public Member Functions

template<typename V , typename D >
 NonstandardIndexIterator (const V &limits, const D &order)
 
 NonstandardIndexIterator (int ndim, const long limits[], const int order[])
 
template<typename D >
 NonstandardIndexIterator (int ndim, long top, const D &order)
 
 NonstandardIndexIterator (int ndim, long top, const int order[])
 
virtual ~NonstandardIndexIterator ()
 
virtual IndexIteratoroperator++ ()
 increment the dimensions in the order detailed in dim More...
 
- Public Member Functions inherited from madness::IndexIterator
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 ()
 
IndexIteratorreset ()
 
long operator[] (int d) const
 
const std::vector< long > & operator* () const
 
 operator bool () const
 

Protected Attributes

std::vector< int > dim
 
- Protected Attributes inherited from madness::IndexIterator
std::vector< long > n
 User specified upper limits for each dimension. More...
 
std::vector< long > i
 Current index. More...
 
bool finished
 

Additional Inherited Members

- Static Public Member Functions inherited from madness::IndexIterator
static void test ()
 this function should also be deprecated More...
 

Detailed Description

The inherited IndexIterator for iterating over the dimensions in a specified order.

NOTE: if iterating quickly over the high dimensions and slowly over the low dimensions (in dimensional order), use HighDimIndexIterator.

NOTE: if iterating quickly over the low dimensions and slowly over the high dimensions (in dimensional order), use LowDimIndexIterator.

Constructor & Destructor Documentation

template<typename V , typename D >
madness::NonstandardIndexIterator::NonstandardIndexIterator ( const V limits,
const D &  order 
)
inline

Iterates dimension d from 0 to limts[d]-1 inclusive

order[0] is the dimension to be iterated over quickest ... order[d-1] is the dimension to be iterated over slowest

References madness::IndexIterator::i.

madness::NonstandardIndexIterator::NonstandardIndexIterator ( int  ndim,
const long  limits[],
const int  order[] 
)
inline

Iterates dimension d from 0 to limts[d]-1 inclusive

order[0] is the dimension to be iterated over quickest ... order[d-1] is the dimension to be iterated over slowest

References madness::IndexIterator::i.

template<typename D >
madness::NonstandardIndexIterator::NonstandardIndexIterator ( int  ndim,
long  top,
const D &  order 
)
inline

Iterates all dimensions from 0 to top-1 inclusive

order[0] is the dimension to be iterated over quickest ... order[d-1] is the dimension to be iterated over slowest

References madness::IndexIterator::i.

madness::NonstandardIndexIterator::NonstandardIndexIterator ( int  ndim,
long  top,
const int  order[] 
)
inline

Iterates all dimensions from 0 to top-1 inclusive

order[0] is the dimension to be iterated over quickest ... order[d-1] is the dimension to be iterated over slowest

References madness::IndexIterator::i.

virtual madness::NonstandardIndexIterator::~NonstandardIndexIterator ( )
inlinevirtual

Member Function Documentation

virtual IndexIterator& madness::NonstandardIndexIterator::operator++ ( )
inlinevirtual

increment the dimensions in the order detailed in dim

Reimplemented from madness::IndexIterator.

References madness::IndexIterator::finished, madness::IndexIterator::i, and madness::IndexIterator::n.

Member Data Documentation

std::vector<int> madness::NonstandardIndexIterator::dim
protected

the array storing the dimensional order for iteration dim[0] is the quickest dimension over which to iterate dim[ndim-1] is the slowest dimension


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