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

Implementation of VectorFunction that wraps a std::function object. More...

#include <WrapperVectorFunction.hpp>

Inheritance diagram for sgpp::optimization::WrapperVectorFunction:
sgpp::optimization::VectorFunction

Public Types

typedef std::function< void(const base::DataVector &, base::DataVector &)> FunctionEvalType
 

Public Member Functions

void clone (std::unique_ptr< VectorFunction > &clone) const override
 
void eval (const base::DataVector &x, base::DataVector &value) override
 
 WrapperVectorFunction (size_t d, size_t m, FunctionEvalType f)
 Constructor. More...
 
 ~WrapperVectorFunction () 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

FunctionEvalType f
 function to be wrapped 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

Implementation of VectorFunction that wraps a std::function object.

Member Typedef Documentation

◆ FunctionEvalType

Constructor & Destructor Documentation

◆ WrapperVectorFunction()

sgpp::optimization::WrapperVectorFunction::WrapperVectorFunction ( size_t  d,
size_t  m,
FunctionEvalType  f 
)
inline

Constructor.

Parameters
ddimension of the domain
mnumber of components
ffunction to be wrapped

Referenced by clone().

◆ ~WrapperVectorFunction()

sgpp::optimization::WrapperVectorFunction::~WrapperVectorFunction ( )
inlineoverride

Destructor.

Member Function Documentation

◆ clone()

void sgpp::optimization::WrapperVectorFunction::clone ( std::unique_ptr< VectorFunction > &  clone) const
inlineoverridevirtual

◆ eval()

void sgpp::optimization::WrapperVectorFunction::eval ( const base::DataVector x,
base::DataVector value 
)
inlineoverridevirtual
Parameters
[in]xevaluation point \(\vec{x} \in [0, 1]^d\)
[out]value\(g(\vec{x})\)

Implements sgpp::optimization::VectorFunction.

References f.

Member Data Documentation

◆ f

FunctionEvalType sgpp::optimization::WrapperVectorFunction::f
protected

function to be wrapped

Referenced by clone(), and eval().


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