SG++-Doxygen-Documentation
sgpp::optimization::IterativeGridGeneratorSOO Class Reference

Iterative grid generator using simultaneous optimistic optimization (SOO). More...

#include <IterativeGridGeneratorSOO.hpp>

Inheritance diagram for sgpp::optimization::IterativeGridGeneratorSOO:
sgpp::optimization::IterativeGridGenerator

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::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.5
 default adaptivity More...
 

Protected Attributes

AdaptivityFunction hMax
 adaptivity 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 generator using simultaneous optimistic optimization (SOO).

Member Typedef Documentation

◆ AdaptivityFunction

Constructor & Destructor Documentation

◆ IterativeGridGeneratorSOO()

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!

Parameters
fobjective function
gridgrid (should be empty)
Nmaximal number of grid points
adaptivityadaptivity (positive number)

References setAdaptivity().

◆ ~IterativeGridGeneratorSOO()

sgpp::optimization::IterativeGridGeneratorSOO::~IterativeGridGeneratorSOO ( )
override

Destructor.

Member Function Documentation

◆ generate()

◆ getAdaptivity()

IterativeGridGeneratorSOO::AdaptivityFunction sgpp::optimization::IterativeGridGeneratorSOO::getAdaptivity ( ) const

References hMax.

◆ setAdaptivity() [1/2]

void sgpp::optimization::IterativeGridGeneratorSOO::setAdaptivity ( double  adaptivity)

References hMax, and sgpp::combigrid::pow().

Referenced by IterativeGridGeneratorSOO().

◆ setAdaptivity() [2/2]

void sgpp::optimization::IterativeGridGeneratorSOO::setAdaptivity ( IterativeGridGeneratorSOO::AdaptivityFunction  adaptivity)

References hMax.

Member Data Documentation

◆ DEFAULT_ADAPTIVITY

constexpr double sgpp::optimization::IterativeGridGeneratorSOO::DEFAULT_ADAPTIVITY = 0.5
static

default adaptivity

◆ hMax

AdaptivityFunction sgpp::optimization::IterativeGridGeneratorSOO::hMax
protected

adaptivity

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


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