SG++-Doxygen-Documentation
sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > > Class Template Reference

Template Specialization for prewavelet basis. More...

#include <GetAffectedBasisFunctions.hpp>

Public Member Functions

 GetAffectedBasisFunctions (GridStorage &storage)
 
void operator() (SPrewaveletBase &basis, const DataVector &point, std::vector< std::pair< size_t, double > > &result)
 Returns evaluations of all basis functions that are non-zero at a given evaluation point. More...
 
 ~GetAffectedBasisFunctions ()
 

Protected Types

typedef index_t index_type
 
typedef level_t level_type
 

Protected Member Functions

void rec (SPrewaveletBase &basis, const DataVector &point, size_t current_dim, GridStorage::grid_iterator &iter, std::vector< std::pair< size_t, double > > &result)
 Recursive traversal of the "tree" of basis functions for evaluation, used in operator(). More...
 

Protected Attributes

GridStoragestorage
 

Detailed Description

template<>
class sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >

Template Specialization for prewavelet basis.

Member Typedef Documentation

◆ index_type

typedef index_t sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >::index_type
protected

◆ level_type

typedef level_t sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >::level_type
protected

Constructor & Destructor Documentation

◆ GetAffectedBasisFunctions()

sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >::GetAffectedBasisFunctions ( GridStorage storage)
inlineexplicit

◆ ~GetAffectedBasisFunctions()

Member Function Documentation

◆ operator()()

void sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >::operator() ( SPrewaveletBase basis,
const DataVector point,
std::vector< std::pair< size_t, double > > &  result 
)
inline

Returns evaluations of all basis functions that are non-zero at a given evaluation point.

For a given evaluation point \(x\), it stores tuples (std::pair) of \((i,\phi_i(x))\) in the result vector for all basis functions that are non-zero. If one wants to evaluate \(f_N(x)\), one only has to compute

\[ \sum_{r\in\mathbf{result}} \alpha[r\rightarrow\mathbf{first}] \cdot r\rightarrow\mathbf{second}. \]

Parameters
basisa sparse grid basis
pointevaluation point within the domain
resulta vector to store the results in

References sgpp::base::GetAffectedBasisFunctions< BASIS >::rec(), and sgpp::base::GetAffectedBasisFunctions< BASIS >::storage.

◆ rec()

void sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >::rec ( SPrewaveletBase basis,
const DataVector point,
size_t  current_dim,
GridStorage::grid_iterator iter,
std::vector< std::pair< size_t, double > > &  result 
)
inlineprotected

Recursive traversal of the "tree" of basis functions for evaluation, used in operator().

For a given evaluation point \(x\), it stores tuples (std::pair) of \((i,\phi_i(x))\) in the result vector for all basis functions that are non-zero.

Parameters
basisa sparse grid basis
pointevaluation point within the domain
current_dimthe dimension currently looked at (recursion parameter)
iteriterator working on the GridStorage of the basis
resulta vector to store the results in

References sgpp::base::PrewaveletBasis< LT, IT >::eval(), sgpp::base::HashGridIterator::get(), sgpp::base::HashGridStorage::getDimension(), sgpp::base::HashGridIterator::hintLeft(), sgpp::base::HashGridIterator::hintRight(), sgpp::base::HashGridIterator::leftChild(), sgpp::base::GetAffectedBasisFunctions< BASIS >::rec(), sgpp::base::HashGridIterator::rightChild(), sgpp::base::HashGridIterator::seq(), and sgpp::base::HashGridIterator::set().

Member Data Documentation

◆ storage

GridStorage& sgpp::base::GetAffectedBasisFunctions< PrewaveletBasis< unsigned int, unsigned int > >::storage
protected

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