MADNESS  0.10.1
Public Member Functions | Protected Attributes | Private Member Functions | 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 ()
 
 operator bool () const
 
const std::vector< long > & operator* () const
 
long operator[] (int d) const
 
IndexIteratorreset ()
 

Protected Attributes

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

Private Member Functions

 NonstandardIndexIterator ()
 Bury the default constructor. More...
 

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

◆ NonstandardIndexIterator() [1/5]

madness::NonstandardIndexIterator::NonstandardIndexIterator ( )
inlineprivate

Bury the default constructor.

◆ NonstandardIndexIterator() [2/5]

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 dim, madness::IndexIterator::i, and MADNESS_ASSERT.

◆ NonstandardIndexIterator() [3/5]

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 dim, madness::IndexIterator::i, and MADNESS_ASSERT.

◆ NonstandardIndexIterator() [4/5]

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 dim, madness::IndexIterator::i, and MADNESS_ASSERT.

◆ NonstandardIndexIterator() [5/5]

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 dim, madness::IndexIterator::i, and MADNESS_ASSERT.

◆ ~NonstandardIndexIterator()

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

Member Function Documentation

◆ operator++()

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

increment the dimensions in the order detailed in dim

Reimplemented from madness::IndexIterator.

References d(), dim, madness::IndexIterator::finished, madness::IndexIterator::i, and madness::IndexIterator::n.

Member Data Documentation

◆ dim

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

Referenced by NonstandardIndexIterator(), and operator++().


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