SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::base::WrapperVectorFunction Class Reference

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

#include <WrapperVectorFunction.hpp>

Inheritance diagram for sgpp::base::WrapperVectorFunction:
sgpp::base::VectorFunction

Public Types

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

Public Member Functions

void clone (std::unique_ptr< VectorFunction > &clone) const override
 
void eval (const DataVector &x, DataVector &value) override
 
 WrapperVectorFunction (size_t d, size_t m, FunctionEvalType f)
 Constructor.
 
 ~WrapperVectorFunction () override
 Destructor.
 
- Public Member Functions inherited from sgpp::base::VectorFunction
virtual void eval (const DataMatrix &x, DataMatrix &value)
 Convenience method for calculating \(g(\vec{x})\) for multiple \(\vec{x}\).
 
size_t getNumberOfComponents () const
 
size_t getNumberOfParameters () const
 
 VectorFunction (size_t d, size_t m)
 Constructor.
 
virtual ~VectorFunction ()
 Destructor.
 

Protected Attributes

FunctionEvalType f
 function to be wrapped
 
- Protected Attributes inherited from sgpp::base::VectorFunction
size_t d
 dimension of the domain
 
size_t m
 number of components
 

Detailed Description

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

Member Typedef Documentation

◆ FunctionEvalType

Constructor & Destructor Documentation

◆ WrapperVectorFunction()

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

Constructor.

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

◆ ~WrapperVectorFunction()

sgpp::base::WrapperVectorFunction::~WrapperVectorFunction ( )
inlineoverride

Destructor.

Member Function Documentation

◆ clone()

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

Implements sgpp::base::VectorFunction.

References clone(), sgpp::base::VectorFunction::d, f, and sgpp::base::VectorFunction::m.

Referenced by clone().

◆ eval()

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

Implements sgpp::base::VectorFunction.

References f.

Referenced by python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity().

Member Data Documentation

◆ f

FunctionEvalType sgpp::base::WrapperVectorFunction::f
protected

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