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

Interface class for TreeStorage-nodes. More...

#include <AbstractTreeStorageNode.hpp>

Inheritance diagram for sgpp::combigrid::AbstractTreeStorageNode< T >:
sgpp::combigrid::InternalTreeStorageNode< T > sgpp::combigrid::LowestTreeStorageNode< T >

Public Member Functions

virtual bool containsIndex (MultiIndex const &index, size_t depth=0) const =0
 
virtual T & get (MultiIndex const &index, size_t depth=0)=0
 
virtual bool isLeaf () const =0
 
virtual size_t numChildren () const =0
 
virtual void set (MultiIndex const &index, T const &value, size_t depth=0)=0
 Stores the given value at the given multi-index. More...
 
virtual ~AbstractTreeStorageNode ()
 

Detailed Description

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

Interface class for TreeStorage-nodes.

Constructor & Destructor Documentation

◆ ~AbstractTreeStorageNode()

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

Member Function Documentation

◆ containsIndex()

template<typename T>
virtual bool sgpp::combigrid::AbstractTreeStorageNode< T >::containsIndex ( MultiIndex const &  index,
size_t  depth = 0 
) const
pure virtual
Parameters
indexMulti-index indicating the storage position.
depthLevel of the node in the tree, starting from zero.
Returns
true iff the storage contains data at the given index.

Implemented in sgpp::combigrid::InternalTreeStorageNode< T >, and sgpp::combigrid::LowestTreeStorageNode< T >.

◆ get()

template<typename T>
virtual T& sgpp::combigrid::AbstractTreeStorageNode< T >::get ( MultiIndex const &  index,
size_t  depth = 0 
)
pure virtual
Parameters
depthLevel of the node in the tree, starting from zero.
indexIndex of the node to get.
Returns
Returns a reference to the storage entry for the given multi-index. If the entry does not already exist, it is created and initialized with the value resulting from calling the default-value-function.

Implemented in sgpp::combigrid::InternalTreeStorageNode< T >, and sgpp::combigrid::LowestTreeStorageNode< T >.

◆ isLeaf()

template<typename T>
virtual bool sgpp::combigrid::AbstractTreeStorageNode< T >::isLeaf ( ) const
pure virtual
Returns
Returns true iff the node is a leaf

Implemented in sgpp::combigrid::InternalTreeStorageNode< T >, and sgpp::combigrid::LowestTreeStorageNode< T >.

◆ numChildren()

template<typename T>
virtual size_t sgpp::combigrid::AbstractTreeStorageNode< T >::numChildren ( ) const
pure virtual
Returns
Returns the number of children of this node.

Implemented in sgpp::combigrid::InternalTreeStorageNode< T >, and sgpp::combigrid::LowestTreeStorageNode< T >.

◆ set()

template<typename T>
virtual void sgpp::combigrid::AbstractTreeStorageNode< T >::set ( MultiIndex const &  index,
T const &  value,
size_t  depth = 0 
)
pure virtual

Stores the given value at the given multi-index.

If the storage entry does not exist, it is created. The default-value-function is not called.

Parameters
depthLevel of the node in the tree, starting from zero.
indexIndex of the node to set.
valueValue to set.

Implemented in sgpp::combigrid::InternalTreeStorageNode< T >, and sgpp::combigrid::LowestTreeStorageNode< T >.


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