BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Math::GSLMultiFitFunctionWrapper Class Reference

Description

wrapper to a multi-dim function withtout derivatives for multi-dimensional minimization algorithm

Definition at line 59 of file GSLMultiFitFunctionWrapper.h.

Public Member Functions

 GSLMultiFitFunctionWrapper ()
 
gsl_multifit_function_fdf * GetFunc ()
 
template<class FuncVector >
void SetFunction (const FuncVector &f, unsigned int nres, unsigned int npar)
 Fill gsl function structure from a C++ function iterator and size and number of residuals. More...
 

Private Attributes

gsl_multifit_function_fdf fFunc
 

Constructor & Destructor Documentation

◆ GSLMultiFitFunctionWrapper()

ROOT::Math::GSLMultiFitFunctionWrapper::GSLMultiFitFunctionWrapper ( )
inline

Definition at line 63 of file GSLMultiFitFunctionWrapper.h.

64  {
65  fFunc.f = 0;
66  fFunc.df = 0;
67  fFunc.fdf = 0;
68  fFunc.n = 0;
69  fFunc.p = 0;
70  fFunc.params = 0;
71 #if GSL_MAJOR_VERSION > 1
72  fFunc.nevalf = 0;
73  fFunc.nevaldf = 0;
74 #endif
75  }

References fFunc.

Member Function Documentation

◆ GetFunc()

gsl_multifit_function_fdf* ROOT::Math::GSLMultiFitFunctionWrapper::GetFunc ( )
inline

Definition at line 91 of file GSLMultiFitFunctionWrapper.h.

91 { return &fFunc; }

References fFunc.

Referenced by ROOT::Math::GSLMultiFit::Set().

◆ SetFunction()

template<class FuncVector >
void ROOT::Math::GSLMultiFitFunctionWrapper::SetFunction ( const FuncVector &  f,
unsigned int  nres,
unsigned int  npar 
)
inline

Fill gsl function structure from a C++ function iterator and size and number of residuals.

Definition at line 80 of file GSLMultiFitFunctionWrapper.h.

80  {
81  const void * p = &f;
82  assert (p != 0);
86  fFunc.n = nres;
87  fFunc.p = npar;
88  fFunc.params = const_cast<void *>(p);
89  }
static int FDf(const gsl_vector *x, void *p, gsl_vector *f, gsl_matrix *h)
evaluate derivative and function at the same time
static int Df(const gsl_vector *x, void *p, gsl_matrix *h)
static int F(const gsl_vector *x, void *p, gsl_vector *f)

References fFunc.

Referenced by ROOT::Math::GSLMultiFit::Set().

Member Data Documentation

◆ fFunc

gsl_multifit_function_fdf ROOT::Math::GSLMultiFitFunctionWrapper::fFunc
private

Definition at line 96 of file GSLMultiFitFunctionWrapper.h.

Referenced by GSLMultiFitFunctionWrapper(), GetFunc(), and SetFunction().


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