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::GSLMultiMinFunctionWrapper Class Reference

Description

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

Definition at line 58 of file GSLMultiMinFunctionWrapper.h.

Public Member Functions

 GSLMultiMinFunctionWrapper ()
 
gsl_multimin_function * GetFunc ()
 
bool IsValid ()
 
void SetDim (unsigned int n)
 
void SetFuncPointer (GSLMultiMinFuncPointer f)
 
template<class FuncType >
void SetFunction (const FuncType &f)
 Fill gsl function structure from a C++ Function class. More...
 
void SetParams (void *p)
 

Private Attributes

gsl_multimin_function fFunc
 

Constructor & Destructor Documentation

◆ GSLMultiMinFunctionWrapper()

ROOT::Math::GSLMultiMinFunctionWrapper::GSLMultiMinFunctionWrapper ( )
inline

Definition at line 62 of file GSLMultiMinFunctionWrapper.h.

63  {
64  fFunc.f = 0;
65  fFunc.n = 0;
66  fFunc.params = 0;
67  }

References fFunc.

Member Function Documentation

◆ GetFunc()

gsl_multimin_function* ROOT::Math::GSLMultiMinFunctionWrapper::GetFunc ( )
inline

Definition at line 83 of file GSLMultiMinFunctionWrapper.h.

83 { return &fFunc; }

References fFunc.

◆ IsValid()

bool ROOT::Math::GSLMultiMinFunctionWrapper::IsValid ( )
inline

Definition at line 85 of file GSLMultiMinFunctionWrapper.h.

85  {
86  return (fFunc.f != 0) ? true : false;
87  }

References fFunc.

◆ SetDim()

void ROOT::Math::GSLMultiMinFunctionWrapper::SetDim ( unsigned int  n)
inline

Definition at line 70 of file GSLMultiMinFunctionWrapper.h.

70 { fFunc.n = n; }

References fFunc.

Referenced by SetFunction().

◆ SetFuncPointer()

void ROOT::Math::GSLMultiMinFunctionWrapper::SetFuncPointer ( GSLMultiMinFuncPointer  f)
inline

Definition at line 69 of file GSLMultiMinFunctionWrapper.h.

69 { fFunc.f = f; }

References fFunc.

Referenced by SetFunction().

◆ SetFunction()

template<class FuncType >
void ROOT::Math::GSLMultiMinFunctionWrapper::SetFunction ( const FuncType &  f)
inline

Fill gsl function structure from a C++ Function class.

Definition at line 75 of file GSLMultiMinFunctionWrapper.h.

75  {
76  const void * p = &f;
77  assert (p != 0);
79  SetDim( f.NDim() );
80  SetParams(const_cast<void *>(p));
81  }
void SetFuncPointer(GSLMultiMinFuncPointer f)
static double F(const gsl_vector *x, void *p)

References SetDim(), SetFuncPointer(), and SetParams().

Here is the call graph for this function:

◆ SetParams()

void ROOT::Math::GSLMultiMinFunctionWrapper::SetParams ( void *  p)
inline

Definition at line 71 of file GSLMultiMinFunctionWrapper.h.

71 { fFunc.params = p; }

References fFunc.

Referenced by SetFunction().

Member Data Documentation

◆ fFunc

gsl_multimin_function ROOT::Math::GSLMultiMinFunctionWrapper::fFunc
private

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