Class implements adapter for gsl_function. More...

#include <GslFunctionAdapter.hpp>

Inheritance diagram for julian::GslFunctionAdapter< F >:

Public Member Functions

 GslFunctionAdapter (const F &functor)
 Constructor. More...
 

Static Private Member Functions

static double call (double x, void *params)
 Method called by the GSL algorithm. More...
 

Private Attributes

const F & functor_
 F must be a functor. double operator()(double) will be used by GSL algorithm. More...
 

Detailed Description

template<typename F>
class julian::GslFunctionAdapter< F >

Class implements adapter for gsl_function.

Class implements adapter for gsl_function. Class wraps callable class F so that it can be statically casted to gsl_function.

The GSL algorithm requires the functions with two arguments: the double representing the argument of mathematical function and void pointer to data structure containing parameters of the function. When we want to pass lambda expression to GSL algorithm, we need to adopt interface of lambda expression to interface of gsl_function.

Constructor & Destructor Documentation

template<typename F>
julian::GslFunctionAdapter< F >::GslFunctionAdapter ( const F &  functor)
inline

Constructor.

Parameters
functormust be a functor with overloaded double operator()(double)

Member Function Documentation

template<typename F>
static double julian::GslFunctionAdapter< F >::call ( double  x,
void *  params 
)
inlinestaticprivate

Method called by the GSL algorithm.

Member Data Documentation

template<typename F>
const F& julian::GslFunctionAdapter< F >::functor_
private

F must be a functor. double operator()(double) will be used by GSL algorithm.


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