![]() |
SG++-Doxygen-Documentation
|
Abstract base class for iterative grid generation methods. More...
#include <IterativeGridGenerator.hpp>
Public Member Functions | |
virtual bool | generate ()=0 |
Pure virtual method for iterative grid generation. | |
const base::DataVector & | getFunctionValues () const |
base::Grid & | getGrid () const |
IterativeGridGenerator (base::ScalarFunction &f, base::Grid &grid, size_t N) | |
Constructor. | |
void | printIterativeGridGenerator () const |
Prints grid points and function values. | |
virtual | ~IterativeGridGenerator () |
Destructor. | |
Protected Member Functions | |
void | evalFunction (size_t oldGridSize=0) |
Evaluates the objective function at grid points with indices [oldGridSize, oldGridSize + 1, ..., grid.getSize() - 1] and saves values in functionValues. | |
void | undoRefinement (size_t oldGridSize) |
Removes grid points with indices [oldGridSize, oldGridSize + 1, ..., grid.getSize() - 1] from the grid. | |
Protected Attributes | |
base::ScalarFunction & | f |
objective function | |
base::DataVector | functionValues |
vector of function values at the grid points | |
base::Grid & | grid |
underlying grid | |
size_t | N |
maximal number of grid points | |
Abstract base class for iterative grid generation methods.
sgpp::optimization::IterativeGridGenerator::IterativeGridGenerator | ( | base::ScalarFunction & | f, |
base::Grid & | grid, | ||
size_t | N | ||
) |
Constructor.
Do not destruct the grid before this object!
f | objective function |
grid | grid (should be empty) |
N | maximal number of grid points |
|
virtual |
Destructor.
|
protected |
Evaluates the objective function at grid points with indices [oldGridSize, oldGridSize + 1, ..., grid.getSize() - 1] and saves values in functionValues.
oldGridSize | number of grid points already evaluated |
References sgpp::base::ScalarFunction::clone(), sgpp::base::ScalarFunction::eval(), f, functionValues, sgpp::base::ScalarFunction::getNumberOfParameters(), sgpp::base::Grid::getStorage(), and grid.
Referenced by sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), and sgpp::optimization::IterativeGridGeneratorSOO::generate().
|
pure virtual |
Pure virtual method for iterative grid generation.
Implemented in sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak, sgpp::optimization::IterativeGridGeneratorLinearSurplus, sgpp::optimization::IterativeGridGeneratorRitterNovak, and sgpp::optimization::IterativeGridGeneratorSOO.
const base::DataVector & sgpp::optimization::IterativeGridGenerator::getFunctionValues | ( | ) | const |
References functionValues.
Referenced by printIterativeGridGenerator().
base::Grid & sgpp::optimization::IterativeGridGenerator::getGrid | ( | ) | const |
References grid.
Referenced by python.uq.analysis.asgc.ASGCKnowledge.ASGCKnowledge::getSparseGridFunction(), python.uq.learner.SimulationLearner.SimulationLearner::learnData(), python.uq.learner.SimulationLearner.SimulationLearner::learnDataWithFolding(), python.uq.learner.SimulationLearner.SimulationLearner::learnDataWithTest(), printIterativeGridGenerator(), and python.uq.learner.SimulationLearner.SimulationLearner::refineGrid().
void sgpp::optimization::IterativeGridGenerator::printIterativeGridGenerator | ( | ) | const |
Prints grid points and function values.
References functionValues, getFunctionValues(), getGrid(), sgpp::base::Printer::getInstance(), sgpp::base::Grid::getStorage(), sgpp::base::Printer::printStatusBegin(), sgpp::base::Printer::printStatusEnd(), sgpp::base::Printer::printStatusNewLine(), and sgpp::base::Printer::printStatusUpdate().
|
protected |
Removes grid points with indices [oldGridSize, oldGridSize + 1, ..., grid.getSize() - 1] from the grid.
oldGridSize | number of grid points after removal |
References sgpp::base::Grid::getStorage(), and grid.
Referenced by sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), and sgpp::optimization::IterativeGridGeneratorSOO::generate().
|
protected |
objective function
Referenced by evalFunction(), sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorSOO::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::IterativeGridGeneratorLinearSurplus(), and python.uq.refinement.RefinementStrategy.PredictiveRanking::rank().
|
protected |
vector of function values at the grid points
Referenced by evalFunction(), sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorSOO::generate(), getFunctionValues(), and printIterativeGridGenerator().
|
protected |
underlying grid
Referenced by python.uq.dists.SGDEdist.SGDEdist::__str__(), python.learner.Learner.Learner::applyData(), python.tools.Matrix::ApplyMatrix(), python.uq.dists.SGDEdist.SGDEdist::cdf(), python.uq.learner.Interpolant.Interpolant::doLearningIteration(), python.learner.Learner.Learner::doLearningIteration(), python.learner.Classifier.Classifier::evalError(), python.uq.learner.Interpolant.Interpolant::evalError(), evalFunction(), sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorSOO::generate(), python.tools.Matrix::generateb(), python.controller.CheckpointController.CheckpointController::generateFoldValidationJob(), python.uq.learner.SimulationLearner.SimulationLearner::getCollocationNodes(), getGrid(), python.uq.learner.SimulationLearner.SimulationLearner::getGrid(), python.uq.learner.SimulationLearner.SimulationLearner::getLearner(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::IterativeGridGeneratorLinearSurplus(), python.learner.Learner.Learner::learnData(), python.learner.Learner.Learner::learnDataWithFolding(), python.uq.learner.Regressor.Regressor::learnDataWithFolding(), python.learner.Learner.Learner::learnDataWithTest(), python.uq.learner.Regressor.Regressor::learnDataWithTest(), python.controller.CheckpointController.CheckpointController::loadAll(), python.uq.operations.forcePositivity.operationMakePositive.OperationMakePositive::makePositive(), python.uq.operations.forcePositivity.operationMakePositiveFast.OperationMakePositiveFast::makePositive(), python.uq.dists.SGDEdist.SGDEdist::mean(), python.uq.dists.SGDEdist.SGDEdist::pdf(), python.uq.dists.SGDEdist.SGDEdist::ppf(), python.learner.Classifier.Classifier::refineGrid(), python.learner.Regressor.Regressor::refineGrid(), python.uq.learner.Regressor.Regressor::refineGrid(), python.uq.learner.SimulationLearner.SimulationLearner::refineGrid(), python.controller.CheckpointController.CheckpointController::saveGrid(), python.controller.CheckpointController.CheckpointController::setGrid(), python.learner.Learner.Learner::setGrid(), python.uq.learner.Learner.Learner::setGrid(), python.uq.operations.forcePositivity.localFullGridSearch.LocalFullGrid::split(), python.uq.dists.SGDEdist.SGDEdist::toJson(), undoRefinement(), and python.uq.dists.SGDEdist.SGDEdist::var().
|
protected |
maximal number of grid points
Referenced by sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorLinearSurplus::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), and sgpp::optimization::IterativeGridGeneratorSOO::generate().