SG++
sgpp::base::OperationStencilHierarchisation Class Referenceabstract

This class implements abstract hierarchisation and dehierarchisation routines on the sparse grid by logging the operations into three arrays rather than actually applying them to the data vector object. More...

#include <OperationStencilHierarchisation.hpp>

Inheritance diagram for sgpp::base::OperationStencilHierarchisation:
sgpp::base::OperationHierarchisation sgpp::base::OperationStencilHierarchisationLinear sgpp::base::OperationStencilHierarchisationModLinear

Public Types

typedef std::vector< unsigned int > IndexStencil
 
typedef std::vector< float > WeightStencil
 

Public Member Functions

void doDehierarchisation (DataVector &alpha) override=0
 Implements the dehierarchisation on a sparse grid The results are queried via get{Surplus,Neighbor,Weight}Stencil(). More...
 
void doHierarchisation (DataVector &node_values) override=0
 Implements the abstract hierarchisation on a sparse grid. More...
 
virtual const IndexStencilgetNeighborStencil () const =0
 Access to the results of the hierarchisation operation. More...
 
virtual size_t getStencilSize () const =0
 The number of operations performed, i.e. More...
 
virtual const IndexStencilgetSurplusStencil () const =0
 Access to the results of the hierarchisation operation. More...
 
virtual const WeightStencilgetWeightStencil () const =0
 Access to the results of the hierarchisation operation. More...
 
 OperationStencilHierarchisation ()
 Constructor. More...
 
 ~OperationStencilHierarchisation () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::base::OperationHierarchisation
 OperationHierarchisation ()
 Constructor. More...
 
virtual ~OperationHierarchisation ()
 Destructor. More...
 

Detailed Description

This class implements abstract hierarchisation and dehierarchisation routines on the sparse grid by logging the operations into three arrays rather than actually applying them to the data vector object.

To apply the operations to e.g. a valid DataVector obejct alpha associated with the grid, just run a loop over the stencils and perform

alpha[surplus[i]] += weight[i]*alpha[neighbor[i]]

Obviously the inverse operation (dehierarchisation resp. hierarchisation) can be applied by reversing the loop and using "-" instead of "+".

Member Typedef Documentation

Constructor & Destructor Documentation

sgpp::base::OperationStencilHierarchisation::OperationStencilHierarchisation ( )
inline

Constructor.

sgpp::base::OperationStencilHierarchisation::~OperationStencilHierarchisation ( )
inlineoverride

Member Function Documentation

void sgpp::base::OperationStencilHierarchisation::doDehierarchisation ( DataVector alpha)
overridepure virtual

Implements the dehierarchisation on a sparse grid The results are queried via get{Surplus,Neighbor,Weight}Stencil().

Parameters
alphadummy array

Implements sgpp::base::OperationHierarchisation.

Implemented in sgpp::base::OperationStencilHierarchisationModLinear, and sgpp::base::OperationStencilHierarchisationLinear.

Referenced by ~OperationStencilHierarchisation().

void sgpp::base::OperationStencilHierarchisation::doHierarchisation ( DataVector node_values)
overridepure virtual

Implements the abstract hierarchisation on a sparse grid.

The results are queried via get{Surpluses,Neighbors,Weights}.

Parameters
node_valuesdummy array

Implements sgpp::base::OperationHierarchisation.

Implemented in sgpp::base::OperationStencilHierarchisationModLinear, and sgpp::base::OperationStencilHierarchisationLinear.

Referenced by ~OperationStencilHierarchisation().

virtual const IndexStencil& sgpp::base::OperationStencilHierarchisation::getNeighborStencil ( ) const
pure virtual

Access to the results of the hierarchisation operation.

This is an index array whose contents refer to the indices associated with the grid points by means of the storage scheme used.

Returns
the neighbors array

Implemented in sgpp::base::OperationStencilHierarchisationModLinear, and sgpp::base::OperationStencilHierarchisationLinear.

Referenced by ~OperationStencilHierarchisation().

virtual size_t sgpp::base::OperationStencilHierarchisation::getStencilSize ( ) const
pure virtual

The number of operations performed, i.e.

the length of each of the three arrays.

Returns
the total number of operations

Implemented in sgpp::base::OperationStencilHierarchisationModLinear, and sgpp::base::OperationStencilHierarchisationLinear.

Referenced by ~OperationStencilHierarchisation().

virtual const IndexStencil& sgpp::base::OperationStencilHierarchisation::getSurplusStencil ( ) const
pure virtual

Access to the results of the hierarchisation operation.

This is an index array whose contents refer to the indices associated with the grid points by means of the storage scheme used.

Returns
the surpluses array

Implemented in sgpp::base::OperationStencilHierarchisationModLinear, and sgpp::base::OperationStencilHierarchisationLinear.

Referenced by ~OperationStencilHierarchisation().

virtual const WeightStencil& sgpp::base::OperationStencilHierarchisation::getWeightStencil ( ) const
pure virtual

Access to the results of the hierarchisation operation.

Returns
the weights array

Implemented in sgpp::base::OperationStencilHierarchisationModLinear, and sgpp::base::OperationStencilHierarchisationLinear.

Referenced by ~OperationStencilHierarchisation().


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