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

Sparse grid interpolant of a vector-valued function. More...

#include <InterpolantVectorFunction.hpp>

Inheritance diagram for sgpp::optimization::InterpolantVectorFunction:
sgpp::optimization::VectorFunction

Public Member Functions

void clone (std::unique_ptr< VectorFunction > &clone) const override
 
void eval (const base::DataVector &x, base::DataVector &value) override
 Evaluation of the function. More...
 
const base::DataMatrixgetAlpha () const
 
 InterpolantVectorFunction (base::Grid &grid, const base::DataMatrix &alpha)
 Constructor. More...
 
void setAlpha (const base::DataMatrix &alpha)
 
 ~InterpolantVectorFunction () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::VectorFunction
size_t getNumberOfComponents () const
 
size_t getNumberOfParameters () const
 
 VectorFunction (size_t d, size_t m)
 Constructor. More...
 
virtual ~VectorFunction ()
 Destructor. More...
 

Protected Attributes

base::DataMatrix alpha
 coefficient matrix More...
 
base::Gridgrid
 sparse grid More...
 
std::unique_ptr
< base::OperationEval
opEval
 pointer to evaluation operation More...
 
- Protected Attributes inherited from sgpp::optimization::VectorFunction
size_t d
 dimension of the domain More...
 
size_t m
 number of components More...
 

Detailed Description

Sparse grid interpolant of a vector-valued function.

More generally, the function can be any linear combination \(g\colon [0, 1]^d \to \mathbb{R}^m\), \(g_j(\vec{x}) = \sum_{k=1}^N \alpha_{k,j} \varphi_k(\vec{x})\) of the basis functions \(\varphi_k = \varphi_{\vec{\ell}_k,\vec{i}_k}\) of a sparse grid with grid points \(\vec{x}_k = \vec{x}_{\vec{\ell}_k,\vec{i}_k}\). But most often, the function (e.g., its coefficients) is constructed as an interpolant at the grid points for some function values.

Constructor & Destructor Documentation

sgpp::optimization::InterpolantVectorFunction::InterpolantVectorFunction ( base::Grid grid,
const base::DataMatrix alpha 
)
inline

Constructor.

Do not destruct the grid before the InterpolantVectorFunction object!

Parameters
gridsparse grid
alphacoefficient matrix (j-th column contains hierarchical surplusses \(\alpha_{\cdot,j}\) of \(g_j\))

Referenced by clone().

sgpp::optimization::InterpolantVectorFunction::~InterpolantVectorFunction ( )
inlineoverride

Destructor.

Member Function Documentation

void sgpp::optimization::InterpolantVectorFunction::clone ( std::unique_ptr< VectorFunction > &  clone) const
inlineoverridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::VectorFunction.

References alpha, grid, and InterpolantVectorFunction().

void sgpp::optimization::InterpolantVectorFunction::eval ( const base::DataVector x,
base::DataVector value 
)
inlineoverridevirtual

Evaluation of the function.

Parameters
[in]xevaluation point \(\vec{x} \in [0, 1]^d\)
[out]value\(g(\vec{x})\)

Implements sgpp::optimization::VectorFunction.

References alpha, sgpp::optimization::VectorFunction::d, opEval, and sgpp::base::DataVector::setAll().

const base::DataMatrix& sgpp::optimization::InterpolantVectorFunction::getAlpha ( ) const
inline
Returns
coefficient matrix

References alpha.

void sgpp::optimization::InterpolantVectorFunction::setAlpha ( const base::DataMatrix alpha)
inline
Parameters
alphacoefficient matrix

References alpha.

Member Data Documentation

base::DataMatrix sgpp::optimization::InterpolantVectorFunction::alpha
protected
std::unique_ptr<base::OperationEval> sgpp::optimization::InterpolantVectorFunction::opEval
protected

pointer to evaluation operation

Referenced by eval().


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