julian::GslMultiminFunctionFdfAdapter< F, dF, FdF > Class Template Reference

Class implements adapter for gsl_multimin_function. More...

#include <GslMultiminFunctionFdfAdapter.hpp>

Inheritance diagram for julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >:

Public Member Functions

 GslMultiminFunctionFdfAdapter (const F &func1, const dF &func2, const FdF &func3, unsigned int n_)
 Constructor. More...
 

Static Private Member Functions

static double call_f (const gsl_vector *x, void *params)
 Method called by the GSL algorithm. More...
 
static void call_df (const gsl_vector *x, void *params, gsl_vector *grad)
 Method called by the GSL algorithm. More...
 
static void call_fdf (const gsl_vector *x, void *params, double *f, gsl_vector *grad)
 Method called by the GSL algorithm. More...
 

Private Attributes

const F & func1_
 F must be a functor calculating the value of the function. More...
 
const dF & func2_
 dF must be a functor calculating derivative of the function. More...
 
const FdF & func3_
 FdF must be a functor calculating value and derivative of the function. More...
 

Detailed Description

template<typename F, typename dF, typename FdF>
class julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >

Class implements adapter for gsl_multimin_function.

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

Functor F must have overloaded operator: double operator()(std::vector<double>) that calculates function value Functor dF must have overloaded operator: std::vector<double> operator()(std::vector<double>) that calculates gradient Functor FdF must have overloaded operator: std::pair<double,std::vector<double>> operator()(std::vector<double>) that calculates value and gradient of the function

Constructor & Destructor Documentation

template<typename F, typename dF, typename FdF>
julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::GslMultiminFunctionFdfAdapter ( const F &  func1,
const dF &  func2,
const FdF &  func3,
unsigned int  n_ 
)
inline

Constructor.

Parameters
func1must be a functor calculating the value of the function.
func2must be a functor calculating derivative of the function.
func3must be a functor calculating value and derivative of the function.
n_Dimension of the function

Member Function Documentation

template<typename F, typename dF, typename FdF>
static void julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::call_df ( const gsl_vector *  x,
void *  params,
gsl_vector *  grad 
)
inlinestaticprivate

Method called by the GSL algorithm.

template<typename F, typename dF, typename FdF>
static double julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::call_f ( const gsl_vector *  x,
void *  params 
)
inlinestaticprivate

Method called by the GSL algorithm.

template<typename F, typename dF, typename FdF>
static void julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::call_fdf ( const gsl_vector *  x,
void *  params,
double *  f,
gsl_vector *  grad 
)
inlinestaticprivate

Method called by the GSL algorithm.

Member Data Documentation

template<typename F, typename dF, typename FdF>
const F& julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::func1_
private

F must be a functor calculating the value of the function.

template<typename F, typename dF, typename FdF>
const dF& julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::func2_
private

dF must be a functor calculating derivative of the function.

template<typename F, typename dF, typename FdF>
const FdF& julian::GslMultiminFunctionFdfAdapter< F, dF, FdF >::func3_
private

FdF must be a functor calculating value and derivative of the function.


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