SG++-Doxygen-Documentation
sgpp::optimization::IterativeGridGenerator Class Referenceabstract

Abstract base class for iterative grid generation methods. More...

#include <IterativeGridGenerator.hpp>

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

Public Member Functions

virtual bool generate ()=0
 Pure virtual method for iterative grid generation. More...
 
const base::DataVectorgetFunctionValues () const
 
base::GridgetGrid () const
 
 IterativeGridGenerator (ScalarFunction &f, base::Grid &grid, size_t N)
 Constructor. More...
 
virtual ~IterativeGridGenerator ()
 Destructor. More...
 

Protected Member Functions

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...
 

Protected Attributes

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...
 

Detailed Description

Abstract base class for iterative grid generation methods.

Constructor & Destructor Documentation

◆ IterativeGridGenerator()

sgpp::optimization::IterativeGridGenerator::IterativeGridGenerator ( ScalarFunction f,
base::Grid grid,
size_t  N 
)

Constructor.

Do not destruct the grid before this object!

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

◆ ~IterativeGridGenerator()

sgpp::optimization::IterativeGridGenerator::~IterativeGridGenerator ( )
virtual

Destructor.

Member Function Documentation

◆ evalFunction()

void sgpp::optimization::IterativeGridGenerator::evalFunction ( size_t  oldGridSize = 0)
protected

◆ generate()

virtual bool sgpp::optimization::IterativeGridGenerator::generate ( )
pure virtual

Pure virtual method for iterative grid generation.

Returns
true on success, otherwise false

Implemented in sgpp::optimization::IterativeGridGeneratorRitterNovak, sgpp::optimization::IterativeGridGeneratorLinearSurplus, and sgpp::optimization::IterativeGridGeneratorSOO.

◆ getFunctionValues()

const base::DataVector & sgpp::optimization::IterativeGridGenerator::getFunctionValues ( ) const
Returns
vector of function values at the grid points

References functionValues.

Referenced by sgpp::optimization::Printer::printIterativeGridGenerator().

◆ getGrid()

base::Grid & sgpp::optimization::IterativeGridGenerator::getGrid ( ) const
Returns
underlying grid

References grid.

Referenced by sgpp::optimization::Printer::printIterativeGridGenerator().

◆ undoRefinement()

void sgpp::optimization::IterativeGridGenerator::undoRefinement ( size_t  oldGridSize)
protected

Member Data Documentation

◆ f

ScalarFunction& sgpp::optimization::IterativeGridGenerator::f
protected

◆ functionValues

◆ grid

◆ N


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