SG++-Doxygen-Documentation
sgpp::base::HierarchisationModPoly Class Reference

Class that implements the hierarchisation on a modified polynomial sparse grid. More...

#include <HierarchisationModPoly.hpp>

Public Member Functions

 HierarchisationModPoly (GridStorage &storage, SPolyModifiedBase *base)
 Constructor, must be bind to a grid. More...
 
void operator() (DataVector &source, DataVector &result, grid_iterator &index, size_t dim)
 Implements operator() needed by the sweep class during the grid traversal. More...
 
 ~HierarchisationModPoly ()
 Destructor. More...
 

Protected Types

typedef GridStorage::grid_iterator grid_iterator
 
typedef index_t index_type
 
typedef level_t level_type
 

Protected Member Functions

void rec (DataVector &source, DataVector &result, grid_iterator &index, size_t dim, DataVector &koeffs)
 Recursive hierarchisaton algorithm, this algorithms works in-place -> source should be equal to result. More...
 

Protected Attributes

SPolyModifiedBasebase
 the base More...
 
GridStoragestorage
 the grid object More...
 

Detailed Description

Class that implements the hierarchisation on a modified polynomial sparse grid.

Therefore the ()operator has to be implement in order to use the sweep algorithm for the grid traversal

Member Typedef Documentation

◆ grid_iterator

◆ index_type

◆ level_type

Constructor & Destructor Documentation

◆ HierarchisationModPoly()

sgpp::base::HierarchisationModPoly::HierarchisationModPoly ( GridStorage storage,
SPolyModifiedBase base 
)

Constructor, must be bind to a grid.

Parameters
storagethe grid storage object of the the grid, on which the hierarchisation should be executed
baseThe polynomial basis functions

◆ ~HierarchisationModPoly()

sgpp::base::HierarchisationModPoly::~HierarchisationModPoly ( )

Destructor.

Member Function Documentation

◆ operator()()

void sgpp::base::HierarchisationModPoly::operator() ( DataVector source,
DataVector result,
grid_iterator index,
size_t  dim 
)

Implements operator() needed by the sweep class during the grid traversal.

This function is applied to the whole grid.

Parameters
sourcethis DataVector holds the node base coefficients of the function that should be applied to the sparse grid
resultthis DataVector holds the linear base coefficients of the sparse grid's ansatz-functions
indexa iterator object of the grid
dimcurrent fixed dimension of the 'execution direction'

References sgpp::base::HashGridIterator::getGridDepth(), rec(), and sgpp::base::DataVector::setAll().

◆ rec()

void sgpp::base::HierarchisationModPoly::rec ( DataVector source,
DataVector result,
grid_iterator index,
size_t  dim,
DataVector koeffs 
)
protected

Recursive hierarchisaton algorithm, this algorithms works in-place -> source should be equal to result.

Parameters
sourcethis DataVector holds the node base coefficients of the function that should be applied to the sparse grid
resultthis DataVector holds the linear base coefficients of the sparse grid's ansatz-functions
indexa iterator object of the grid
dimcurrent fixed dimension of the 'execution direction'
koeffscoefficients of the basis funktions as calculated so far

References base, sgpp::base::PolyModifiedBasis< LT, IT >::evalHierToTop(), sgpp::base::HashGridIterator::get(), sgpp::base::HashGridIterator::hint(), sgpp::base::HashGridStorage::isInvalidSequenceNumber(), sgpp::base::HashGridIterator::leftChild(), sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::stepRight(), storage, and sgpp::base::HashGridIterator::up().

Referenced by operator()().

Member Data Documentation

◆ base

SPolyModifiedBase* sgpp::base::HierarchisationModPoly::base
protected

the base

Referenced by rec().

◆ storage

GridStorage& sgpp::base::HierarchisationModPoly::storage
protected

the grid object

Referenced by rec().


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