SG++-Doxygen-Documentation
sgpp::combigrid::TreeStorageGuidedIterator< T > Class Template Reference

Iterator class that travels "along" a MultiIndexIterator through a TreeStorage. More...

#include <TreeStorageGuidedIterator.hpp>

Inheritance diagram for sgpp::combigrid::TreeStorageGuidedIterator< T >:

## Public Member Functions

virtual bool computationRequested ()

virtual MultiIndex getMultiIndex () const

virtual size_t indexAt (size_t d) const

virtual bool isValid ()

virtual int moveToNext ()

virtual void setValue (T const &input)
Sets a value at the current entry. More...

TreeStorageGuidedIterator (IterationPolicy const &policy, AbstractTreeStorageNode< T > *root, size_t numDimensions, MultiIndexIterator &iterator)
The number of dimensions is also contained in the iterator, but it is passed separately, so the casts below can't fail because of an iterator with a wrong number of dimensions. More...

virtual T & value ()

virtual ~TreeStorageGuidedIterator ()

Public Member Functions inherited from sgpp::combigrid::AbstractMultiStorageIterator< T >
virtual ~AbstractMultiStorageIterator ()

## Detailed Description

### template<typename T> class sgpp::combigrid::TreeStorageGuidedIterator< T >

Iterator class that travels "along" a MultiIndexIterator through a TreeStorage.

If entries are not already contained, they are created during iteration. For a detailed method description, see AbstractMultiStorageIterator.

## Constructor & Destructor Documentation

template<typename T >
 sgpp::combigrid::TreeStorageGuidedIterator< T >::TreeStorageGuidedIterator ( IterationPolicy const & policy, AbstractTreeStorageNode< T > * root, size_t numDimensions, MultiIndexIterator & iterator )
inline

The number of dimensions is also contained in the iterator, but it is passed separately, so the casts below can't fail because of an iterator with a wrong number of dimensions.

References CGLOG, and sgpp::combigrid::IterationPolicy::value().

template<typename T >
 virtual sgpp::combigrid::TreeStorageGuidedIterator< T >::~TreeStorageGuidedIterator ( )
inlinevirtual

## Member Function Documentation

template<typename T >
 virtual bool sgpp::combigrid::TreeStorageGuidedIterator< T >::computationRequested ( )
inlinevirtual
Returns
True iff the value the iterator points to has already been computed or the computation has been requested (in case of parallel evaluation, using requestComputationTask()).
template<typename T >
 virtual MultiIndex sgpp::combigrid::TreeStorageGuidedIterator< T >::getMultiIndex ( ) const
inlinevirtual
Returns
Returns the MultiIndex containing the components that can be retrieved using indexAt().
template<typename T >
 virtual size_t sgpp::combigrid::TreeStorageGuidedIterator< T >::indexAt ( size_t d ) const
inlinevirtual
Returns
Returns the index in the given dimension that the iterator points to. If this iterator was configured with a certain policy to permute the indices it accesses, this does not affect the index returned. For example, in the beginning, indexAt(0) will always return 0, even if the index is 5 after the permutation.
template<typename T >
 virtual bool sgpp::combigrid::TreeStorageGuidedIterator< T >::isValid ( )
inlinevirtual
Returns
returns true if the iterator points to a valid position.
template<typename T >
 virtual int sgpp::combigrid::TreeStorageGuidedIterator< T >::moveToNext ( )
inlinevirtual
Returns
Returns the difference of the greatest dimension and the lowest updated dimension, i. e. the lowest dimension where the corresponding multi-index changed. This will be mostly be zero, if the last dimension has many points. Returns -1 if the next entry is invalid.
template<typename T >
 virtual std::function sgpp::combigrid::TreeStorageGuidedIterator< T >::requestComputationTask ( )
inlinevirtual
Returns
Returns a function that computes the value at the current entry (if it is not already stored). This is useful for parallel function evaluation.
template<typename T >
 virtual void sgpp::combigrid::TreeStorageGuidedIterator< T >::setValue ( T const & input )
inlinevirtual

Sets a value at the current entry.

template<typename T >
 virtual T& sgpp::combigrid::TreeStorageGuidedIterator< T >::value ( )
inlinevirtual
Returns
Returns a reference to the value the iterator points to

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