SG++-Doxygen-Documentation
sgpp::base::BreadthFirstSearch< FUNC > Class Template Reference

Class for applying a functor of type FUNC on all grid points of a sparse grid in a breadth-first search (BFS) manner. More...

#include <BreadthFirstSearch.hpp>

Public Member Functions

 BreadthFirstSearch (GridStorage &storage)
 Constructor. More...
 
 BreadthFirstSearch (FUNC &functor, GridStorage &storage)
 Constructor. More...
 
template<class DataType >
void execute (const DataType &source, DataType &result)
 Execute the BFS. More...
 
 ~BreadthFirstSearch ()
 Destructor. More...
 

Protected Types

typedef GridStorage::grid_iterator grid_iterator
 grid iterator More...
 

Protected Attributes

FUNC functor
 functor to apply in the BFS More...
 
GridStoragestorage
 storage of the grid More...
 

Detailed Description

template<class FUNC>
class sgpp::base::BreadthFirstSearch< FUNC >

Class for applying a functor of type FUNC on all grid points of a sparse grid in a breadth-first search (BFS) manner.

Especially useful for hierarchization with basis functions which fulfill a Lagrange property, e.g., fundamental splines. The functor should implement void operator()(const DataVector& source, DataVector& result, const grid_iterator& iterator), where source is the original data (e.g., node values), result is the result of the functor (e.g., surplusses), and iterator is at the current grid point.

Member Typedef Documentation

◆ grid_iterator

grid iterator

Constructor & Destructor Documentation

◆ BreadthFirstSearch() [1/2]

template<class FUNC>
sgpp::base::BreadthFirstSearch< FUNC >::BreadthFirstSearch ( GridStorage storage)
inlineexplicit

Constructor.

Uses the default constructor for the functor.

Parameters
storagestorage of the grid

◆ BreadthFirstSearch() [2/2]

template<class FUNC>
sgpp::base::BreadthFirstSearch< FUNC >::BreadthFirstSearch ( FUNC functor,
GridStorage storage 
)
inline

Constructor.

Parameters
functorfunctor to apply in the BFS
storagestorage of the grid

◆ ~BreadthFirstSearch()

template<class FUNC>
sgpp::base::BreadthFirstSearch< FUNC >::~BreadthFirstSearch ( )
inline

Destructor.

Member Function Documentation

◆ execute()

Member Data Documentation

◆ functor

template<class FUNC>
FUNC sgpp::base::BreadthFirstSearch< FUNC >::functor
protected

functor to apply in the BFS

Referenced by sgpp::base::BreadthFirstSearch< FUNC >::execute().

◆ storage

template<class FUNC>
GridStorage& sgpp::base::BreadthFirstSearch< FUNC >::storage
protected

storage of the grid

Referenced by sgpp::base::BreadthFirstSearch< FUNC >::execute().


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