SG++-Doxygen-Documentation
|
Iterative grid generation based on Ritter/Novak's refinement criterion. More...
#include <IterativeGridGeneratorRitterNovak.hpp>
Public Types | |
enum | PowMethod { STD_POW, FAST_POW } |
exponentiation methods More... | |
Static Public Attributes | |
static constexpr double | DEFAULT_ADAPTIVITY = 0.85 |
default adaptivity More... | |
static const base::level_t | DEFAULT_INITIAL_LEVEL = 3 |
default level of initial regular sparse grid More... | |
static const base::level_t | DEFAULT_MAX_LEVEL = 20 |
default maximal level of grid points More... | |
Protected Attributes | |
double | gamma |
adaptivity More... | |
base::level_t | initialLevel |
level of initial regular sparse grid More... | |
base::level_t | maxLevel |
maximal level of grid points More... | |
PowMethod | powMethod |
exponentiation method 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 generation based on Ritter/Novak's refinement criterion.
Caution: This class uses HashRefinementMultiple, so it generates grids that don't meet the "hierarchical ancestors" requirement!
Literature: Erich Novak, Klaus Ritter: Global Optimization Using Hyperbolic Cross Points. In: Christodoulos A. Floudas, Panos M. Pardalos (eds.): State of the Art in Global Optimization, Computational Methods and Applications, Vol. 7. Springer 1996. DOI: 10.1007/978-1-4613-3437-8_2
sgpp::optimization::IterativeGridGeneratorRitterNovak::IterativeGridGeneratorRitterNovak | ( | ScalarFunction & | f, |
base::Grid & | grid, | ||
size_t | N, | ||
double | adaptivity = DEFAULT_ADAPTIVITY , |
||
base::level_t | initialLevel = DEFAULT_INITIAL_LEVEL , |
||
base::level_t | maxLevel = DEFAULT_MAX_LEVEL , |
||
PowMethod | powMethod = STD_POW |
||
) |
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 between 0 and 1 |
initialLevel | level of initial regular sparse grid |
maxLevel | maximal level of grid points |
powMethod | exponentiation method (fastPow is faster than std::pow, but only approximative) |
|
override |
Destructor.
|
overridevirtual |
Generate the grid.
Implements sgpp::optimization::IterativeGridGenerator.
References chess::b, sgpp::optimization::IterativeGridGenerator::evalFunction(), sgpp::optimization::IterativeGridGenerator::f, sgpp::optimization::fastPow(), sgpp::base::HashRefinement::free_refine(), sgpp::optimization::IterativeGridGenerator::functionValues, g, gamma, sgpp::base::HashGridPoint::get(), sgpp::base::Grid::getGenerator(), sgpp::optimization::Printer::getInstance(), sgpp::base::HashGridPoint::getLevel(), sgpp::optimization::ScalarFunction::getNumberOfParameters(), sgpp::base::HashGridStorage::getSize(), sgpp::base::DataVector::getSize(), sgpp::base::Grid::getStorage(), sgpp::optimization::IterativeGridGenerator::grid, python.utils.sg_projections::gridStorage, python.statsfileInfo::i, initialLevel, sgpp::base::DataVector::insert(), sgpp::base::HashGridStorage::isContaining(), python.utils.statsfile2gnuplot::j, maxLevel, sgpp::optimization::IterativeGridGenerator::N, sgpp::combigrid::pow(), powMethod, sgpp::optimization::Printer::printStatusBegin(), sgpp::optimization::Printer::printStatusEnd(), sgpp::optimization::Printer::printStatusUpdate(), sgpp::base::GridGenerator::regular(), sgpp::base::HashGridPoint::set(), sgpp::base::DataVector::setAll(), STD_POW, and sgpp::optimization::IterativeGridGenerator::undoRefinement().
double sgpp::optimization::IterativeGridGeneratorRitterNovak::getAdaptivity | ( | ) | const |
References gamma.
base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::getInitialLevel | ( | ) | const |
References initialLevel.
base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::getMaxLevel | ( | ) | const |
References maxLevel.
IterativeGridGeneratorRitterNovak::PowMethod sgpp::optimization::IterativeGridGeneratorRitterNovak::getPowMethod | ( | ) | const |
References powMethod.
void sgpp::optimization::IterativeGridGeneratorRitterNovak::setAdaptivity | ( | double | adaptivity | ) |
adaptivity | adaptivity between 0 and 1 |
References gamma.
void sgpp::optimization::IterativeGridGeneratorRitterNovak::setInitialLevel | ( | base::level_t | initialLevel | ) |
initialLevel | level of initial regular sparse grid |
References initialLevel.
void sgpp::optimization::IterativeGridGeneratorRitterNovak::setMaxLevel | ( | base::level_t | maxLevel | ) |
maxLevel | maximal level of grid points |
References maxLevel.
void sgpp::optimization::IterativeGridGeneratorRitterNovak::setPowMethod | ( | IterativeGridGeneratorRitterNovak::PowMethod | powMethod | ) |
powMethod | exponentiation method |
References powMethod.
|
static |
default adaptivity
|
static |
default level of initial regular sparse grid
|
static |
default maximal level of grid points
|
protected |
adaptivity
Referenced by generate(), getAdaptivity(), and setAdaptivity().
|
protected |
level of initial regular sparse grid
Referenced by generate(), getInitialLevel(), and setInitialLevel().
|
protected |
maximal level of grid points
Referenced by generate(), getMaxLevel(), and setMaxLevel().
|
protected |
exponentiation method
Referenced by generate(), getPowMethod(), and setPowMethod().