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

Iterator for the TreeStorage class that only traverses entries stored in the storage. More...

#include <TreeStorageStoredDataIterator.hpp>

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

Public Member Functions

virtual bool computationRequested ()
 Returns true because the iterator only iterates over already stored data. More...
 
virtual MultiIndex getMultiIndex () const
 
virtual size_t indexAt (size_t d) const
 
virtual bool isValid ()
 
virtual int moveToNext ()
 
virtual std::function< T()> requestComputationTask ()
 Returns a dummy function because the values pointed to are already stored. More...
 
virtual void setValue (T const &input)
 Sets a value at the current entry. More...
 
 TreeStorageStoredDataIterator (AbstractTreeStorageNode< T > *root, size_t numDimensions)
 
virtual T & value ()
 
virtual ~TreeStorageStoredDataIterator ()
 
- Public Member Functions inherited from sgpp::combigrid::AbstractMultiStorageIterator< T >
virtual ~AbstractMultiStorageIterator ()
 

Detailed Description

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

Iterator for the TreeStorage class that only traverses entries stored in the storage.

The entries are traversed in lexicographical order (lexicographically ascending multi-indices). For a detailed method description, see AbstractMultiStorageIterator.

Constructor & Destructor Documentation

◆ TreeStorageStoredDataIterator()

◆ ~TreeStorageStoredDataIterator()

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

Member Function Documentation

◆ computationRequested()

template<typename T >
virtual bool sgpp::combigrid::TreeStorageStoredDataIterator< T >::computationRequested ( )
inlinevirtual

Returns true because the iterator only iterates over already stored data.

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

◆ getMultiIndex()

template<typename T >
virtual MultiIndex sgpp::combigrid::TreeStorageStoredDataIterator< T >::getMultiIndex ( ) const
inlinevirtual
Returns
Returns the MultiIndex containing the components that can be retrieved using indexAt().

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

◆ indexAt()

template<typename T >
virtual size_t sgpp::combigrid::TreeStorageStoredDataIterator< 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.

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

◆ isValid()

template<typename T >
virtual bool sgpp::combigrid::TreeStorageStoredDataIterator< T >::isValid ( )
inlinevirtual
Returns
returns true if the iterator points to a valid position.

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

◆ moveToNext()

template<typename T >
virtual int sgpp::combigrid::TreeStorageStoredDataIterator< 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.

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

References h, sgpp::combigrid::LowestTreeStorageNode< T >::statusVector, and sgpp::combigrid::STORED.

Referenced by sgpp::combigrid::TreeStorageStoredDataIterator< T >::TreeStorageStoredDataIterator().

◆ requestComputationTask()

template<typename T >
virtual std::function<T()> sgpp::combigrid::TreeStorageStoredDataIterator< T >::requestComputationTask ( )
inlinevirtual

Returns a dummy function because the values pointed to are already stored.

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

◆ setValue()

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

◆ value()

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

Implements sgpp::combigrid::AbstractMultiStorageIterator< T >.

References sgpp::combigrid::LowestTreeStorageNode< T >::elements.


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