SG++-Doxygen-Documentation
sgpp::combigrid::GeneralFunction< Out, In > Class Template Reference

Wrapper for std::function<Out(In)>. More...

#include <GeneralFunction.hpp>

Public Types

typedef std::function< Out(In)> function_type
 
typedef Out output_type
 

Public Member Functions

Out call (In in) const
 Evaluates the function (for python use etc., does the same as operator()). More...
 
 GeneralFunction (Out(*ptr)(In))
 for function pointers More...
 
template<typename T >
 GeneralFunction (T const &f)
 for lambdas or function objects More...
 
 GeneralFunction ()
 Default constructor, creating a constant zero function. More...
 
function_type getStdFunction () const
 
Out operator() (In in) const
 Evaluates the function. More...
 

Detailed Description

template<typename Out, typename In>
class sgpp::combigrid::GeneralFunction< Out, In >

Wrapper for std::function<Out(In)>.

This is necessary because SWIG can't handle std::function objects properly.

Member Typedef Documentation

◆ function_type

template<typename Out, typename In>
typedef std::function<Out(In)> sgpp::combigrid::GeneralFunction< Out, In >::function_type

◆ output_type

template<typename Out, typename In>
typedef Out sgpp::combigrid::GeneralFunction< Out, In >::output_type

Constructor & Destructor Documentation

◆ GeneralFunction() [1/3]

template<typename Out, typename In>
sgpp::combigrid::GeneralFunction< Out, In >::GeneralFunction ( Out(*)(In)  ptr)
inlineexplicit

for function pointers

◆ GeneralFunction() [2/3]

template<typename Out, typename In>
template<typename T >
sgpp::combigrid::GeneralFunction< Out, In >::GeneralFunction ( T const &  f)
inlineexplicit

for lambdas or function objects

◆ GeneralFunction() [3/3]

template<typename Out, typename In>
sgpp::combigrid::GeneralFunction< Out, In >::GeneralFunction ( )
inline

Default constructor, creating a constant zero function.

Member Function Documentation

◆ call()

template<typename Out, typename In>
Out sgpp::combigrid::GeneralFunction< Out, In >::call ( In  in) const
inline

Evaluates the function (for python use etc., does the same as operator()).

◆ getStdFunction()

template<typename Out, typename In>
function_type sgpp::combigrid::GeneralFunction< Out, In >::getStdFunction ( ) const
inline

◆ operator()()

template<typename Out, typename In>
Out sgpp::combigrid::GeneralFunction< Out, In >::operator() ( In  in) const
inline

Evaluates the function.


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