SG++-Doxygen-Documentation
|
Iterative grid generator using simultaneous optimistic optimization (SOO). More...
#include <IterativeGridGeneratorSOO.hpp>
Public Types | |
typedef std::function< size_t(size_t)> | AdaptivityFunction |
Public Member Functions | |
bool | generate () override |
Generate the grid. More... | |
AdaptivityFunction | getAdaptivity () const |
IterativeGridGeneratorSOO (ScalarFunction &f, base::Grid &grid, size_t N, double adaptivity=DEFAULT_ADAPTIVITY) | |
Constructor. More... | |
void | setAdaptivity (double adaptivity) |
void | setAdaptivity (AdaptivityFunction adaptivity) |
~IterativeGridGeneratorSOO () override | |
Destructor. More... | |
Public Member Functions inherited from sgpp::optimization::IterativeGridGenerator | |
const base::DataVector & | getFunctionValues () const |
base::Grid & | getGrid () const |
IterativeGridGenerator (ScalarFunction &f, base::Grid &grid, size_t N) | |
Constructor. More... | |
virtual | ~IterativeGridGenerator () |
Destructor. More... | |
Static Public Attributes | |
static constexpr double | DEFAULT_ADAPTIVITY = 0.5 |
default adaptivity More... | |
Protected Attributes | |
AdaptivityFunction | hMax |
adaptivity More... | |
Protected Attributes inherited from sgpp::optimization::IterativeGridGenerator | |
ScalarFunction & | f |
objective function More... | |
base::DataVector | functionValues |
vector of function values at the grid points More... | |
base::Grid & | grid |
underlying grid More... | |
size_t | N |
maximal number of grid points More... | |
Additional Inherited Members | |
Protected Member Functions inherited from sgpp::optimization::IterativeGridGenerator | |
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. More... | |
void | undoRefinement (size_t oldGridSize) |
Removes grid points with indices [oldGridSize, oldGridSize + 1, ..., grid.getSize() - 1] from the grid. More... | |
Iterative grid generator using simultaneous optimistic optimization (SOO).
typedef std::function<size_t(size_t)> sgpp::optimization::IterativeGridGeneratorSOO::AdaptivityFunction |
sgpp::optimization::IterativeGridGeneratorSOO::IterativeGridGeneratorSOO | ( | ScalarFunction & | f, |
base::Grid & | grid, | ||
size_t | N, | ||
double | adaptivity = DEFAULT_ADAPTIVITY |
||
) |
Constructor.
Do not destruct the grid before this object!
f | objective function |
grid | grid (should be empty) |
N | maximal number of grid points |
adaptivity | adaptivity (positive number) |
References setAdaptivity().
|
override |
Destructor.
|
overridevirtual |
Generate the grid.
Implements sgpp::optimization::IterativeGridGenerator.
References sgpp::optimization::ScalarFunction::eval(), sgpp::optimization::IterativeGridGenerator::evalFunction(), sgpp::optimization::IterativeGridGenerator::f, sgpp::base::HashRefinement::free_refine(), sgpp::optimization::IterativeGridGenerator::functionValues, sgpp::base::HashGridStorage::getCoordinates(), sgpp::optimization::Printer::getInstance(), sgpp::base::HashGridPoint::getLevel(), sgpp::optimization::ScalarFunction::getNumberOfParameters(), sgpp::base::HashGridStorage::getSize(), sgpp::base::Grid::getStorage(), sgpp::optimization::IterativeGridGenerator::grid, python.utils.sg_projections::gridStorage, hMax, python.statsfileInfo::i, sgpp::base::HashGridStorage::insert(), sgpp::optimization::IterativeGridGenerator::N, sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), python.uq.operations.discretizeProduct::refinable, sgpp::base::HashGridPoint::set(), and sgpp::optimization::IterativeGridGenerator::undoRefinement().
IterativeGridGeneratorSOO::AdaptivityFunction sgpp::optimization::IterativeGridGeneratorSOO::getAdaptivity | ( | ) | const |
References hMax.
void sgpp::optimization::IterativeGridGeneratorSOO::setAdaptivity | ( | double | adaptivity | ) |
References hMax, and sgpp::combigrid::pow().
Referenced by IterativeGridGeneratorSOO().
void sgpp::optimization::IterativeGridGeneratorSOO::setAdaptivity | ( | IterativeGridGeneratorSOO::AdaptivityFunction | adaptivity | ) |
References hMax.
|
static |
default adaptivity
|
protected |
adaptivity
Referenced by generate(), getAdaptivity(), and setAdaptivity().