SG++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sgpp::optimization::IterativeGridGeneratorRitterNovak Class Reference

Iterative grid generation based on Ritter/Novak's refinement criterion. More...

#include <IterativeGridGeneratorRitterNovak.hpp>

Inheritance diagram for sgpp::optimization::IterativeGridGeneratorRitterNovak:
sgpp::optimization::IterativeGridGenerator

Public Types

enum  PowMethod { STD_POW, FAST_POW }
 exponentiation methods More...
 

Public Member Functions

bool generate () override
 Generate the grid. More...
 
double getAdaptivity () const
 
base::level_t getInitialLevel () const
 
base::level_t getMaxLevel () const
 
PowMethod getPowMethod () const
 
 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. More...
 
void setAdaptivity (double adaptivity)
 
void setInitialLevel (base::level_t initialLevel)
 
void setMaxLevel (base::level_t maxLevel)
 
void setPowMethod (PowMethod powMethod)
 
 ~IterativeGridGeneratorRitterNovak () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::IterativeGridGenerator
const base::DataVectorgetFunctionValues () const
 
base::GridgetGrid () 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.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
ScalarFunctionf
 objective function More...
 
base::DataVector functionValues
 vector of function values at the grid points More...
 
base::Gridgrid
 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...
 

Detailed Description

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

See Also
HashRefinementMultiple

Member Enumeration Documentation

exponentiation methods

Enumerator
STD_POW 
FAST_POW 

Constructor & Destructor Documentation

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!

Parameters
fobjective function
gridgrid (should be empty)
Nmaximal number of grid points
adaptivityadaptivity between 0 and 1
initialLevellevel of initial regular sparse grid
maxLevelmaximal level of grid points
powMethodexponentiation method (fastPow is faster than std::pow, but only approximative)
sgpp::optimization::IterativeGridGeneratorRitterNovak::~IterativeGridGeneratorRitterNovak ( )
override

Destructor.

Member Function Documentation

double sgpp::optimization::IterativeGridGeneratorRitterNovak::getAdaptivity ( ) const
Returns
adaptivity between 0 and 1

References gamma.

base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::getInitialLevel ( ) const
Returns
level of initial regular sparse grid

References initialLevel.

base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::getMaxLevel ( ) const
Returns
maximal level of grid points

References maxLevel.

IterativeGridGeneratorRitterNovak::PowMethod sgpp::optimization::IterativeGridGeneratorRitterNovak::getPowMethod ( ) const
Returns
exponentiation method

References powMethod.

void sgpp::optimization::IterativeGridGeneratorRitterNovak::setAdaptivity ( double  adaptivity)
Parameters
adaptivityadaptivity between 0 and 1

References gamma.

void sgpp::optimization::IterativeGridGeneratorRitterNovak::setInitialLevel ( base::level_t  initialLevel)
Parameters
initialLevellevel of initial regular sparse grid

References initialLevel.

void sgpp::optimization::IterativeGridGeneratorRitterNovak::setMaxLevel ( base::level_t  maxLevel)
Parameters
maxLevelmaximal level of grid points

References maxLevel.

void sgpp::optimization::IterativeGridGeneratorRitterNovak::setPowMethod ( IterativeGridGeneratorRitterNovak::PowMethod  powMethod)
Parameters
powMethodexponentiation method

References powMethod.

Member Data Documentation

constexpr double sgpp::optimization::IterativeGridGeneratorRitterNovak::DEFAULT_ADAPTIVITY = 0.85
static

default adaptivity

const base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::DEFAULT_INITIAL_LEVEL = 3
static

default level of initial regular sparse grid

const base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::DEFAULT_MAX_LEVEL = 20
static

default maximal level of grid points

double sgpp::optimization::IterativeGridGeneratorRitterNovak::gamma
protected

adaptivity

Referenced by generate(), getAdaptivity(), and setAdaptivity().

base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::initialLevel
protected

level of initial regular sparse grid

Referenced by generate(), getInitialLevel(), and setInitialLevel().

base::level_t sgpp::optimization::IterativeGridGeneratorRitterNovak::maxLevel
protected

maximal level of grid points

Referenced by generate(), getMaxLevel(), and setMaxLevel().

PowMethod sgpp::optimization::IterativeGridGeneratorRitterNovak::powMethod
protected

exponentiation method

Referenced by generate(), getPowMethod(), and setPowMethod().


The documentation for this class was generated from the following files: