33#ifndef MADNESS_MRA_INDEXIT_H__INCLUDED
34#define MADNESS_MRA_INDEXIT_H__INCLUDED
69 n(limits.size()),
i(limits.size(), 0l),
finished(false) {
70 for (
unsigned int d = 0;
d <
n.size(); ++
d)
77 for (
unsigned int d = 0;
d <
n.size(); ++
d)
90 for (
unsigned int d = 0;
d <
n.size(); ++
d)
102 const std::vector<long>&
108 operator bool()
const {
115 for (
int d =
n.size() - 1;
d >= 0; --
d) {
164 for (
int d =
n.size() - 1;
d >= 0; --
d) {
204 for (
int d = 0;
d < ndim; ++
d) {
241 template<
typename V,
typename D>
244 int i, j, ndim = order.size();
247 for(
i = 0;
i < ndim; ++
i) {
251 for(j = 0; j <
i; ++j)
267 for(
i = 0;
i < ndim; ++
i) {
271 for(j = 0; j <
i; ++j)
289 for(
i = 0;
i < ndim; ++
i) {
293 for(j = 0; j <
i; ++j)
309 for(
i = 0;
i < ndim; ++
i) {
313 for(j = 0; j <
i; ++j)
326 for (
int d = 0;
d < ndim; ++
d) {
HighDimIndexIterator()
Bury the default constructor.
Definition indexit.h:144
virtual ~HighDimIndexIterator()
Definition indexit.h:158
virtual IndexIterator & operator++()
Definition indexit.h:163
HighDimIndexIterator(int ndim, const long limits[])
Iterates dimension d from 0 to limts[d]-1 inclusive.
Definition indexit.h:152
HighDimIndexIterator(int ndim, long top)
Iterates all dimensions from 0 to top-1 inclusive.
Definition indexit.h:156
HighDimIndexIterator(const V &limits)
Iterates dimension d from 0 to limts[d]-1 inclusive.
Definition indexit.h:149
virtual IndexIterator & operator++()
this function should be abstracted and deprecated
Definition indexit.h:114
bool finished
Definition indexit.h:63
IndexIterator(int ndim, const long limits[])
Iterates dimension d from 0 to limts[d]-1 inclusive.
Definition indexit.h:75
static void test()
this function should also be deprecated
Definition indexit.h:128
std::vector< long > i
Current index.
Definition indexit.h:62
virtual ~IndexIterator()
Definition indexit.h:86
long operator[](int d) const
Definition indexit.h:97
IndexIterator & reset()
Definition indexit.h:89
std::vector< long > n
User specified upper limits for each dimension.
Definition indexit.h:61
IndexIterator()
Bury the default constructor.
Definition indexit.h:58
IndexIterator(const V &limits)
Iterates dimension d from 0 to limts[d]-1 inclusive.
Definition indexit.h:68
IndexIterator(int ndim, long top)
Iterates all dimensions from 0 to top-1 inclusive.
Definition indexit.h:82
const std::vector< long > & operator*() const
Definition indexit.h:103
virtual IndexIterator & operator++()
Definition indexit.h:202
LowDimIndexIterator(int ndim, const long limits[])
Iterates dimension d from 0 to limts[d]-1 inclusive.
Definition indexit.h:191
virtual ~LowDimIndexIterator()
Definition indexit.h:197
LowDimIndexIterator()
Bury the default constructor.
Definition indexit.h:183
LowDimIndexIterator(const V &limits)
Iterates dimension d from 0 to limts[d]-1 inclusive.
Definition indexit.h:188
LowDimIndexIterator(int ndim, long top)
Iterates all dimensions from 0 to top-1 inclusive.
Definition indexit.h:195
std::vector< int > dim
Definition indexit.h:233
NonstandardIndexIterator(const V &limits, const D &order)
Definition indexit.h:242
NonstandardIndexIterator(int ndim, long top, const D &order)
Definition indexit.h:284
virtual IndexIterator & operator++()
increment the dimensions in the order detailed in dim
Definition indexit.h:324
virtual ~NonstandardIndexIterator()
Definition indexit.h:320
NonstandardIndexIterator(int ndim, long top, const int order[])
Definition indexit.h:305
NonstandardIndexIterator(int ndim, const long limits[], const int order[])
Definition indexit.h:263
NonstandardIndexIterator()
Bury the default constructor.
Definition indexit.h:227
A simple, fixed dimension vector.
Definition vector.h:64
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition madness_exception.h:134
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition print.h:225
static const double d
Definition nonlinschro.cc:121
Defines simple templates for printing to std::cout "a la Python".
Definition test_ar.cc:204
static double V(const coordT &r)
Definition tdse.cc:288