SG++-Doxygen-Documentation
sgpp::combigrid::AbstractMultiStorageIterator< T > Class Template Referenceabstract

Abstract base class for iterators iterating over (existing or maybe also non-existing) entries of an AbstractMultiStorage. More...

#include <AbstractMultiStorageIterator.hpp>

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

Public Member Functions

virtual bool computationRequested ()=0
 
virtual MultiIndex getMultiIndex () const =0
 
virtual size_t indexAt (size_t d) const =0
 
virtual bool isValid ()=0
 
virtual int moveToNext ()=0
 
virtual std::function< T()> requestComputationTask ()=0
 
virtual void setValue (T const &input)=0
 Sets a value at the current entry. More...
 
virtual T & value ()=0
 
virtual ~AbstractMultiStorageIterator ()
 

Detailed Description

template<typename T>
class sgpp::combigrid::AbstractMultiStorageIterator< T >

Abstract base class for iterators iterating over (existing or maybe also non-existing) entries of an AbstractMultiStorage.

Constructor & Destructor Documentation

◆ ~AbstractMultiStorageIterator()

Member Function Documentation

◆ computationRequested()

template<typename T >
virtual bool sgpp::combigrid::AbstractMultiStorageIterator< T >::computationRequested ( )
pure virtual
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()).

Implemented in sgpp::combigrid::TreeStorageGuidedIterator< T >, and sgpp::combigrid::TreeStorageStoredDataIterator< T >.

Referenced by sgpp::combigrid::AbstractMultiStorageIterator< T >::~AbstractMultiStorageIterator().

◆ getMultiIndex()

template<typename T >
virtual MultiIndex sgpp::combigrid::AbstractMultiStorageIterator< T >::getMultiIndex ( ) const
pure virtual

◆ indexAt()

template<typename T >
virtual size_t sgpp::combigrid::AbstractMultiStorageIterator< T >::indexAt ( size_t  d) const
pure virtual
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.

Implemented in sgpp::combigrid::TreeStorageGuidedIterator< T >, and sgpp::combigrid::TreeStorageStoredDataIterator< T >.

Referenced by sgpp::combigrid::AbstractMultiStorageIterator< T >::~AbstractMultiStorageIterator().

◆ isValid()

template<typename T >
virtual bool sgpp::combigrid::AbstractMultiStorageIterator< T >::isValid ( )
pure virtual

◆ moveToNext()

template<typename T >
virtual int sgpp::combigrid::AbstractMultiStorageIterator< T >::moveToNext ( )
pure virtual
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.

Implemented in sgpp::combigrid::TreeStorageStoredDataIterator< T >, and sgpp::combigrid::TreeStorageGuidedIterator< T >.

Referenced by sgpp::combigrid::AbstractMultiStorageIterator< T >::~AbstractMultiStorageIterator().

◆ requestComputationTask()

template<typename T >
virtual std::function<T()> sgpp::combigrid::AbstractMultiStorageIterator< T >::requestComputationTask ( )
pure virtual
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.

Implemented in sgpp::combigrid::TreeStorageGuidedIterator< T >, and sgpp::combigrid::TreeStorageStoredDataIterator< T >.

Referenced by sgpp::combigrid::AbstractMultiStorageIterator< T >::~AbstractMultiStorageIterator().

◆ setValue()

template<typename T >
virtual void sgpp::combigrid::AbstractMultiStorageIterator< T >::setValue ( T const &  input)
pure virtual

◆ value()

template<typename T >
virtual T& sgpp::combigrid::AbstractMultiStorageIterator< T >::value ( )
pure virtual

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