![]() |
SG++-Doxygen-Documentation
|
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... | |
| GridStorage & | storage |
| storage of the grid More... | |
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.
|
protected |
grid iterator
|
inlineexplicit |
Constructor.
Uses the default constructor for the functor.
| storage | storage of the grid |
|
inline |
Constructor.
| functor | functor to apply in the BFS |
| storage | storage of the grid |
|
inline |
Destructor.
|
inline |
Execute the BFS.
| [in] | source | original data (e.g., node values) |
| [out] | result | result of the BFS (e.g., surplusses) |
References sgpp::base::BreadthFirstSearch< FUNC >::functor, sgpp::base::HashGridStorage::getDimension(), sgpp::base::HashGridStorage::getSize(), sgpp::base::HashGridIterator::leftChild(), chess::point, sgpp::base::HashGridIterator::seq(), sgpp::base::HashGridIterator::set(), sgpp::base::HashGridIterator::stepRight(), sgpp::base::BreadthFirstSearch< FUNC >::storage, and sgpp::base::HashGridIterator::up().
Referenced by sgpp::base::OperationHierarchisationFundamentalSpline::doHierarchisation(), and sgpp::base::OperationHierarchisationModFundamentalSpline::doHierarchisation().
|
protected |
functor to apply in the BFS
Referenced by sgpp::base::BreadthFirstSearch< FUNC >::execute().
|
protected |
storage of the grid
Referenced by sgpp::base::BreadthFirstSearch< FUNC >::execute().