SG++-Doxygen-Documentation
sgpp::combigrid::BoundedSumMultiIndexIterator Class Reference

This class can be used to generate multi-indices with bounded 1-norm. More...

#include <BoundedSumMultiIndexIterator.hpp>

Public Member Functions

 BoundedSumMultiIndexIterator (size_t dim, size_t maxIndexSum)
 
size_t indexAt (size_t d) const
 Returns a particular component (in dimension d, starting from 0) of the current multi-index. More...
 
bool isValid ()
 The iterator is valid iff the current value exists (i. More...
 
int moveToNext ()
 Moves the iterator forward to the next multi-index. More...
 
void reset ()
 Start again from the beginning of the sequence. More...
 
MultiIndexvalue ()
 Returns the current multi-index. More...
 

Detailed Description

This class can be used to generate multi-indices with bounded 1-norm.

For example, using a BoundedSumMultiIndexIterator with dim = 2 and maxIndexSum = 2 will generate the indices (0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (2, 0).

Constructor & Destructor Documentation

sgpp::combigrid::BoundedSumMultiIndexIterator::BoundedSumMultiIndexIterator ( size_t  dim,
size_t  maxIndexSum 
)
inline

Member Function Documentation

size_t sgpp::combigrid::BoundedSumMultiIndexIterator::indexAt ( size_t  d) const
inline

Returns a particular component (in dimension d, starting from 0) of the current multi-index.

bool sgpp::combigrid::BoundedSumMultiIndexIterator::isValid ( )
inline

The iterator is valid iff the current value exists (i.

e. the end of the sequence has not been reached yet).

Referenced by sgpp::combigrid::LevelManager::getRegularLevels(), and sgpp::combigrid::LevelManager::getRegularLevelsByNumPoints().

int sgpp::combigrid::BoundedSumMultiIndexIterator::moveToNext ( )
inline

Moves the iterator forward to the next multi-index.

Referenced by sgpp::combigrid::LevelManager::getRegularLevels(), and sgpp::combigrid::LevelManager::getRegularLevelsByNumPoints().

void sgpp::combigrid::BoundedSumMultiIndexIterator::reset ( )
inline

Start again from the beginning of the sequence.

References python.statsfileInfo::i.

MultiIndex& sgpp::combigrid::BoundedSumMultiIndexIterator::value ( )
inline

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