SG++-Doxygen-Documentation
sgpp::combigrid::AbstractCombigridStorage Class Referenceabstract

Abstract base class for storage storing a float_t for each level-index-pair. More...

#include <AbstractCombigridStorage.hpp>

Inheritance diagram for sgpp::combigrid::AbstractCombigridStorage:
sgpp::combigrid::CombigridTreeStorage

Public Member Functions

virtual void deserialize (std::string const &str)=0
 Re-loads storage values from a string that has been generated by serialize(). More...
 
virtual double get (MultiIndex const &level, MultiIndex const &index)=0
 
virtual std::shared_ptr< AbstractMultiStorageIterator< double > > getGuidedIterator (MultiIndex const &level, MultiIndexIterator &iterator, std::vector< bool > orderingConfiguration)=0
 
virtual size_t getNumEntries ()=0
 
virtual std::string serialize ()=0
 
virtual void set (MultiIndex const &level, MultiIndex const &index, double value)=0
 Sets a value at the given level-index pair, creating a new entry if no value had been previously stored at this level-index pair. More...
 
virtual void setMutex (std::shared_ptr< std::recursive_mutex > mutexPtr)=0
 Sets a mutex that is locked for critical operations. More...
 
virtual ~AbstractCombigridStorage ()
 

Detailed Description

Abstract base class for storage storing a float_t for each level-index-pair.

The intention is that the entries store function values to be re-used. In the subclass CombigridTreeStorage, a function is passed whose values are evaluated and stored at the first request. At further requests for the same level-index pair, the stored value can be retrieved.

Constructor & Destructor Documentation

◆ ~AbstractCombigridStorage()

sgpp::combigrid::AbstractCombigridStorage::~AbstractCombigridStorage ( )
virtual

Member Function Documentation

◆ deserialize()

◆ get()

virtual double sgpp::combigrid::AbstractCombigridStorage::get ( MultiIndex const &  level,
MultiIndex const &  index 
)
pure virtual

◆ getGuidedIterator()

virtual std::shared_ptr<AbstractMultiStorageIterator<double> > sgpp::combigrid::AbstractCombigridStorage::getGuidedIterator ( MultiIndex const &  level,
MultiIndexIterator iterator,
std::vector< bool >  orderingConfiguration 
)
pure virtual
Parameters
levelLevel to traverse
iteratorIterator that defines which values should be iterated over
orderingConfigurationDefines for each dimension whether the grid points in that dimension should be traversed in sorted order.
Returns
Returns an iterator that iterates along the multi-indices for a given level. These multi-indices are given by the parameter iterator. When moveToNext() is called on the returned iterator, it also calls moveToNext() on the underlying MultiIndexIterator. If the values are not already stored, they are created during iteration.

Implemented in sgpp::combigrid::CombigridTreeStorage.

◆ getNumEntries()

virtual size_t sgpp::combigrid::AbstractCombigridStorage::getNumEntries ( )
pure virtual
Returns
Returns the number of stored values (accumulated over all levels).

Implemented in sgpp::combigrid::CombigridTreeStorage.

◆ serialize()

◆ set()

virtual void sgpp::combigrid::AbstractCombigridStorage::set ( MultiIndex const &  level,
MultiIndex const &  index,
double  value 
)
pure virtual

Sets a value at the given level-index pair, creating a new entry if no value had been previously stored at this level-index pair.

Implemented in sgpp::combigrid::CombigridTreeStorage.

◆ setMutex()

virtual void sgpp::combigrid::AbstractCombigridStorage::setMutex ( std::shared_ptr< std::recursive_mutex >  mutexPtr)
pure virtual

Sets a mutex that is locked for critical operations.

If the mutex is nullptr, nothing is locked.

Implemented in sgpp::combigrid::CombigridTreeStorage.


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