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

Interface for storage classes which store values of type T. More...

#include <AbstractMultiStorage.hpp>

Inheritance diagram for sgpp::combigrid::AbstractMultiStorage< T >:
sgpp::combigrid::TreeStorage< T >

Public Member Functions

virtual bool containsIndex (MultiIndex const &index) const =0
 
virtual T & get (MultiIndex const &index)=0
 
virtual std::shared_ptr< AbstractMultiStorageIterator< T > > getGuidedIterator (MultiIndexIterator &indexIter, IterationPolicy const &policy=IterationPolicy::Default)=0
 
virtual size_t getNumDimensions () const =0
 
virtual std::shared_ptr< AbstractMultiStorageIterator< T > > getStoredDataIterator ()=0
 
virtual void set (MultiIndex const &index, T const &value)=0
 Unlike get(), this function does not activate a computation if there is no entry for the given multi-index in the storage. More...
 
virtual ~AbstractMultiStorage ()
 

Detailed Description

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

Interface for storage classes which store values of type T.

These values can be accessed via a multi-index. The (efficiency-optimized) TreeStorage class poses certain restrictions on which values are automatically included into the storage if other values are included.

Constructor & Destructor Documentation

◆ ~AbstractMultiStorage()

Member Function Documentation

◆ containsIndex()

template<typename T >
virtual bool sgpp::combigrid::AbstractMultiStorage< T >::containsIndex ( MultiIndex const &  index) const
pure virtual
Returns
Returns true iff the storage contains a value for the given MultiIndex.

Implemented in sgpp::combigrid::TreeStorage< T >.

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

◆ get()

template<typename T >
virtual T& sgpp::combigrid::AbstractMultiStorage< T >::get ( MultiIndex const &  index)
pure virtual
Returns
Returns a reference to the element stored at the given MultiIndex. If the element was not yet in the storage, it is created.

Implemented in sgpp::combigrid::TreeStorage< T >.

◆ getGuidedIterator()

template<typename T >
virtual std::shared_ptr<AbstractMultiStorageIterator<T> > sgpp::combigrid::AbstractMultiStorage< T >::getGuidedIterator ( MultiIndexIterator indexIter,
IterationPolicy const &  policy = IterationPolicy::Default 
)
pure virtual
Parameters
indexIterIterator that defines which values should be iterated over.
policyDefines for each dimension the order that the values should be traversed in.
Returns
Returns an iterator that iterates over all values that indexIter iterates over, possibly creating them on-the-fly. Depending on the given policy, the values are not traversed in their natural order but in an order given by the iterators in the policy.

Implemented in sgpp::combigrid::TreeStorage< T >.

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

◆ getNumDimensions()

template<typename T >
virtual size_t sgpp::combigrid::AbstractMultiStorage< T >::getNumDimensions ( ) const
pure virtual

◆ getStoredDataIterator()

template<typename T >
virtual std::shared_ptr<AbstractMultiStorageIterator<T> > sgpp::combigrid::AbstractMultiStorage< T >::getStoredDataIterator ( )
pure virtual
Returns
Returns an iterator that iterates over all values that are already stored in the storage.

Implemented in sgpp::combigrid::TreeStorage< T >.

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

◆ set()

template<typename T >
virtual void sgpp::combigrid::AbstractMultiStorage< T >::set ( MultiIndex const &  index,
T const &  value 
)
pure virtual

Unlike get(), this function does not activate a computation if there is no entry for the given multi-index in the storage.

Instead, it directly sets the given value.

Implemented in sgpp::combigrid::TreeStorage< T >.


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