![]() |
SG++-Doxygen-Documentation
|
Iterative grid generation based on Ritter/Novak's refinement criterion like IterativeGridGeneratorRitterNovak, but adapted for the use with fuzzy intervals. More...
#include <IterativeGridGeneratorFuzzyRitterNovak.hpp>
Static Public Attributes | |
static const size_t | DEFAULT_NUMBER_OF_ALPHA_SEGMENTS = 10 |
![]() | |
static constexpr double | DEFAULT_ADAPTIVITY = 0.85 |
default adaptivity | |
static const base::level_t | DEFAULT_INITIAL_LEVEL = 3 |
default level of initial regular sparse grid | |
static const base::level_t | DEFAULT_MAX_LEVEL = 20 |
default maximal level of grid points | |
Protected Attributes | |
size_t | numberOfAlphaSegments |
number of alpha segments (i.e., number of inner Ritter-Novak generations) | |
std::vector< FuzzyInterval * > | xFuzzy |
fuzzy input intervals | |
![]() | |
double | gamma |
adaptivity | |
base::level_t | initialLevel |
level of initial regular sparse grid | |
base::level_t | maxLevel |
maximal level of grid points | |
PowMethod | powMethod |
exponentiation method | |
![]() | |
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 | |
Additional Inherited Members | |
![]() | |
enum class | PowMethod { STD_POW , FAST_POW } |
exponentiation methods More... | |
![]() | |
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. | |
Iterative grid generation based on Ritter/Novak's refinement criterion like IterativeGridGeneratorRitterNovak, but adapted for the use with fuzzy intervals.
Caution: This class uses HashRefinementMultiple, so it generates grids that don't meet the "hierarchical ancestors" requirement!
Literature: Julian Valentin. B-Splines for Sparse Grids: Algorithms and Application to Higher-Dimensional Optimization. PhD thesis, University of Stuttgart, IPVS, 2019.
sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::IterativeGridGeneratorFuzzyRitterNovak | ( | base::ScalarFunction & | f, |
base::Grid & | grid, | ||
size_t | N, | ||
const std::vector< FuzzyInterval * > & | xFuzzy, | ||
size_t | numberOfAlphaSegments = DEFAULT_NUMBER_OF_ALPHA_SEGMENTS , |
||
double | adaptivity = DEFAULT_ADAPTIVITY , |
||
base::level_t | initialLevel = DEFAULT_INITIAL_LEVEL , |
||
base::level_t | maxLevel = DEFAULT_MAX_LEVEL , |
||
PowMethod | 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 |
xFuzzy | fuzzy input intervals |
numberOfAlphaSegments | number of alpha segments (i.e., number of inner Ritter-Novak generations) |
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 |
|
overridevirtual |
Destructor.
Implements sgpp::optimization::IterativeGridGenerator.
References sgpp::optimization::IterativeGridGenerator::evalFunction(), sgpp::optimization::IterativeGridGenerator::f, sgpp::base::HashRefinement::free_refine(), sgpp::optimization::IterativeGridGenerator::functionValues, sgpp::optimization::IterativeGridGeneratorRitterNovak::gamma, sgpp::base::HashGridPoint::get(), sgpp::base::Grid::getGenerator(), sgpp::base::Printer::getInstance(), sgpp::base::HashGridPoint::getLevel(), sgpp::base::ScalarFunction::getNumberOfParameters(), sgpp::base::DataVector::getSize(), sgpp::base::Grid::getStorage(), sgpp::optimization::IterativeGridGenerator::grid, sgpp::optimization::IterativeGridGeneratorRitterNovak::initialLevel, sgpp::optimization::IterativeGridGeneratorRitterNovak::maxLevel, sgpp::optimization::IterativeGridGenerator::N, numberOfAlphaSegments, sgpp::optimization::IterativeGridGeneratorRitterNovak::powMethod, sgpp::base::Printer::printStatusBegin(), sgpp::base::Printer::printStatusEnd(), sgpp::base::Printer::printStatusUpdate(), sgpp::base::GridGenerator::regular(), sgpp::base::HashGridPoint::set(), sgpp::base::DataVector::setAll(), sgpp::optimization::IterativeGridGeneratorRitterNovak::STD_POW, sgpp::optimization::IterativeGridGenerator::undoRefinement(), and xFuzzy.
size_t sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::getNumberOfAlphaSegments | ( | ) | const |
References numberOfAlphaSegments.
const std::vector< FuzzyInterval * > & sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::getXFuzzy | ( | ) | const |
References xFuzzy.
void sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::setNumberOfAlphaSegments | ( | size_t | numberOfAlphaSegments | ) |
numberOfAlphaSegments | number of alpha segments (i.e., number of inner Ritter-Novak generations) |
References numberOfAlphaSegments.
void sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::setXFuzzy | ( | const std::vector< FuzzyInterval * > & | xFuzzy | ) |
xFuzzy | fuzzy input intervals |
References xFuzzy.
|
static |
|
protected |
number of alpha segments (i.e., number of inner Ritter-Novak generations)
Referenced by generate(), getNumberOfAlphaSegments(), and setNumberOfAlphaSegments().
|
protected |
fuzzy input intervals
Referenced by generate(), getXFuzzy(), and setXFuzzy().