![]() |
SG++-Doxygen-Documentation
|
Abstract class that defines the interfaces for the different grid's GridGenerators. More...
#include <GridGenerator.hpp>
Public Member Functions | |
virtual void | anisotropicFull (std::vector< size_t > dimlevels) |
Creates an anisotropicFull Grid for certain level vector, for example [2,3,1] results in a 3x7x1 grid. | |
virtual void | cliques (size_t level, size_t clique_size)=0 |
Creates a sparse grid with fully connected cliques. | |
virtual void | cliques (size_t level, size_t clique_size, double T) |
Creates a sparse grid with fully connected cliques. | |
virtual void | coarsen (CoarseningFunctor &func, std::vector< size_t > *removedSeq)=0 |
Coarsens a grid according to the settings of the CoarseningFunctor func. | |
virtual void | coarsenNFirstOnly (CoarseningFunctor &func, size_t numFirstOnly, std::vector< size_t > *removedSeq, size_t minIndexConsidered)=0 |
Coarsens a grid according to the settings of the CoarseningFunctor func. | |
virtual void | full (size_t level)=0 |
Creates a full grid for a certain level \( n \), i.e., \( V_n =
*\bigoplus_{|\vec{l}|_\infty
*\leq n} W_{\vec{l}}\). | |
virtual size_t | getNumberOfRefinablePoints ()=0 |
Returns the number of points on the grid that can be refined in the next iteration. | |
virtual size_t | getNumberOfRefinablePointsToMaxLevel (size_t maxLevel)=0 |
Returns the number of points on the grid that can be refined in the next iteration additionally a maximum level for refinement is taken into account. | |
virtual size_t | getNumberOfRemovablePoints ()=0 |
Returns the number of points on the grid that can be removed in the next iteration. | |
GridGenerator () | |
Constructor. | |
virtual void | refine (RefinementFunctor &func, std::vector< size_t > *addedPoints=nullptr)=0 |
Refines a grid according to the settings of the RefinementFunctor func. | |
virtual void | refineInter (RefinementFunctor &func, const std::set< std::set< size_t > > &interactions) |
Refines a grid according to the settings of the RefinementFunctor func. | |
virtual void | refineMaxLevel (RefinementFunctor &func, size_t maxLevel)=0 |
Refines a grid according to the settings of the RefinementFunctor func. | |
virtual void | regular (size_t level)=0 |
Creates a regular sparse grid for a certain level \( n \), i.e., \(
*V_n^{(1)} =
*\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\). | |
virtual void | regular (size_t level, double T) |
Creates a regular sparse grid for a certain level \( n \), i.e., \(
*V_n^{(1)} =
*\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\). | |
virtual void | regularInter (size_t level, const std::set< std::set< size_t > > &terms, double T) |
Creates a regular sparse grid for a certain level \( n \), i.e., \(
*V_n^{(1)} =
*\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\). | |
virtual void | truncated (size_t level, size_t l_user) |
Creates a grid which doesn't contain the fullgrids with li<l_user, for any li level_t. | |
virtual | ~GridGenerator () |
Destructor. | |
Abstract class that defines the interfaces for the different grid's GridGenerators.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Creates an anisotropicFull Grid for certain level vector, for example [2,3,1] results in a 3x7x1 grid.
Reimplemented in sgpp::base::StandardGridGenerator.
Referenced by sgpp::datadriven::GridFactory::createGrid().
|
pure virtual |
Creates a sparse grid with fully connected cliques.
level | Grid level |
clique_size | clique size |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
|
inlinevirtual |
Creates a sparse grid with fully connected cliques.
level | Grid level |
clique_size | clique size |
T | modifier for subgrid selection, T = 0 implies standard sparse grid. For further information see Griebel and Knapek's paper optimized tensor-product approximation spaces |
Reimplemented in sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, and sgpp::base::StandardGridGenerator.
|
pure virtual |
Coarsens a grid according to the settings of the CoarseningFunctor func.
func | pointer to coarsening functor |
removedSeq | pointer to vector to append the seq numbers of coarsened grid points to. |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
|
pure virtual |
Coarsens a grid according to the settings of the CoarseningFunctor func.
Only numFirstOnly first grid points are checked for coarsening.
func | pointer to coarsening functor |
numFirstOnly | max. number grid points to be coarsened |
removedSeq | pointer to vector to append the seq numbers of coarsened grid points to. |
minIndexConsidered | Minimum index of grid points that will be coarsened |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by sgpp::pde::PDESolver::coarsenInitialGridSurplus().
|
pure virtual |
Creates a full grid for a certain level \( n \), i.e., \( V_n = *\bigoplus_{|\vec{l}|_\infty *\leq n} W_{\vec{l}}\).
level | Grid level |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
|
pure virtual |
Returns the number of points on the grid that can be refined in the next iteration.
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by sgpp::pde::PDESolver::refineInitialGridSurplus(), and sgpp::pde::PDESolver::refineInitialGridSurplusSubDomain().
|
pure virtual |
Returns the number of points on the grid that can be refined in the next iteration additionally a maximum level for refinement is taken into account.
maxLevel | no points on higher levels than maxLevel will be created |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by sgpp::pde::PDESolver::refineInitialGridSurplusToMaxLevel(), and sgpp::pde::PDESolver::refineInitialGridSurplusToMaxLevelSubDomain().
|
pure virtual |
Returns the number of points on the grid that can be removed in the next iteration.
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by sgpp::pde::PDESolver::coarsenInitialGridSurplus().
|
pure virtual |
Refines a grid according to the settings of the RefinementFunctor func.
func | reference to refinement functor |
addedPoints | pointer to vector to add newly created grid points to |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by doAllRefinements(), doAllRefinements(), doAllRefinements(), doAllRefinements(), sgpp::datadriven::AlgorithmAdaBoostBase::doRefinement(), sgpp::datadriven::RefinementHandler::handleDataAndZeroBasedRefinement(), sgpp::datadriven::RefinementHandler::handleSurplusBasedRefinement(), sgpp::base::Grid::refine(), sgpp::pde::PDESolver::refineInitialGridSurplus(), sgpp::pde::PDESolver::refineInitialGridSurplusSubDomain(), sgpp::datadriven::SparseGridDensityEstimator::train(), sgpp::datadriven::LearnerSGDE::train(), and sgpp::datadriven::LearnerBaseSP::train().
|
inlinevirtual |
Refines a grid according to the settings of the RefinementFunctor func.
Does not create any interactions, that are not in the list of allowed interactions.
Refines the grid, but only adds interactions that are contained in the set interactions, i.e. only desired interactions. Each desired interaction is encoded as a vector which contains all desired interactions. For example, if we want to include grid points that model an interaction between the first and the second predictor, we would include the vector [1,2] in interactions.
func | pointer to refinement functor |
interactions | allowed interactions |
Reimplemented in sgpp::base::StandardGridGenerator.
|
pure virtual |
Refines a grid according to the settings of the RefinementFunctor func.
additionally a maximum level for refinement is taken into account
func | pointer to refinement functor |
maxLevel | no points on higher levels than maxLevel will be created |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by sgpp::pde::PDESolver::refineInitialGridSurplusToMaxLevel(), and sgpp::pde::PDESolver::refineInitialGridSurplusToMaxLevelSubDomain().
|
pure virtual |
Creates a regular sparse grid for a certain level \( n \), i.e., \( *V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\).
level | Grid level |
Implemented in sgpp::base::BoundaryGridGenerator, sgpp::base::GeneralizedBoundaryGridGenerator, sgpp::base::L0BoundaryGridGenerator, sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, sgpp::base::SquareRootGridGenerator, sgpp::base::StandardGridGenerator, and sgpp::base::StretchedBoundaryGridGenerator.
Referenced by sgpp::pde::HeatEquationSolver::constructGrid(), sgpp::pde::PoissonEquationSolver::constructGrid(), sgpp::pde::HeatEquationSolverWithStretching::constructGrid(), sgpp::datadriven::GridFactory::createGrid(), sgpp::datadriven::AlgorithmAdaBoostBase::doAdaBoostR2(), sgpp::datadriven::AlgorithmAdaBoostBase::doAdaBoostRT(), sgpp::datadriven::AlgorithmAdaBoostBase::doDiscreteAdaBoost(), sgpp::datadriven::AlgorithmAdaBoostBase::doRealAdaBoost(), sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), hpx_main(), sgpp::datadriven::LearnerBaseSP::InitializeGrid(), main(), and main().
|
inlinevirtual |
Creates a regular sparse grid for a certain level \( n \), i.e., \( *V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\).
If the used grid doesn't support the parameter t, t = 0 is used instead.
level | Grid level |
T | modifier for subgrid selection, T = 0 implies standard sparse grid. For further information see Griebel and Knapek's paper optimized tensor-product approximation spaces |
Reimplemented in sgpp::base::PeriodicGridGenerator, sgpp::base::PrewaveletGridGenerator, and sgpp::base::StandardGridGenerator.
|
inlinevirtual |
Creates a regular sparse grid for a certain level \( n \), i.e., \( *V_n^{(1)} = *\bigoplus_{|\vec{l}|_1 \leq n+d-1} W_{\vec{l}}\).
If the used grid doesn't support the parameter t, t = 0 is used instead. This grid generator allows the creation of regular grids that only contain some interaction terms.
level | Grid level |
T | modifier for subgrid selection, T = 0 implies standard sparse grid. For further information see Griebel and Knapek's paper optimized tensor-product approximation spaces |
terms | determines the included interaction terms. |
Reimplemented in sgpp::base::StandardGridGenerator.
Referenced by sgpp::datadriven::GridFactory::createGrid().
|
inlinevirtual |
Creates a grid which doesn't contain the fullgrids with li<l_user, for any li level_t.
Reimplemented in sgpp::base::GeneralizedBoundaryGridGenerator.