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

Description

class to wrap a gsl_function_fdf (with derivatives)

Definition at line 105 of file GSLFunctionWrapper.h.

Public Member Functions

 GSLFunctionDerivWrapper ()
 
double Derivative (double x)
 
void Fdf (double x, double &f, double &df)
 
gsl_function_fdf * GetFunc ()
 
bool IsValid ()
 check if function is valid (has been set) More...
 
double operator() (double x)
 
void SetDerivPointer (GSLFuncPointer f)
 
void SetFdfPointer (GSLFdfPointer f)
 
void SetFuncPointer (GSLFuncPointer f)
 
void SetParams (void *p)
 

Private Attributes

gsl_function_fdf fFunc
 

Constructor & Destructor Documentation

◆ GSLFunctionDerivWrapper()

ROOT::Math::GSLFunctionDerivWrapper::GSLFunctionDerivWrapper ( )
inline

Definition at line 109 of file GSLFunctionWrapper.h.

110  {
111  fFunc.f = 0;
112  fFunc.df = 0;
113  fFunc.fdf = 0;
114  fFunc.params = 0;
115  }

References fFunc.

Member Function Documentation

◆ Derivative()

double ROOT::Math::GSLFunctionDerivWrapper::Derivative ( double  x)
inline

Definition at line 129 of file GSLFunctionWrapper.h.

129 { return GSL_FN_FDF_EVAL_DF(&fFunc, x); }

References fFunc.

◆ Fdf()

void ROOT::Math::GSLFunctionDerivWrapper::Fdf ( double  x,
double &  f,
double &  df 
)
inline

Definition at line 131 of file GSLFunctionWrapper.h.

131  {
132  return GSL_FN_FDF_EVAL_F_DF(&fFunc, x, &f, &df);
133  }

References fFunc.

◆ GetFunc()

gsl_function_fdf* ROOT::Math::GSLFunctionDerivWrapper::GetFunc ( )
inline

Definition at line 124 of file GSLFunctionWrapper.h.

124 { return &fFunc; }

References fFunc.

◆ IsValid()

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

check if function is valid (has been set)

Definition at line 136 of file GSLFunctionWrapper.h.

136  {
137  return (fFunc.f != 0 ) ? true : false;
138  }

References fFunc.

◆ operator()()

double ROOT::Math::GSLFunctionDerivWrapper::operator() ( double  x)
inline

Definition at line 127 of file GSLFunctionWrapper.h.

127 { return GSL_FN_FDF_EVAL_F(&fFunc, x); }

References fFunc.

◆ SetDerivPointer()

void ROOT::Math::GSLFunctionDerivWrapper::SetDerivPointer ( GSLFuncPointer  f)
inline

Definition at line 119 of file GSLFunctionWrapper.h.

119 { fFunc.df = f; }

References fFunc.

◆ SetFdfPointer()

void ROOT::Math::GSLFunctionDerivWrapper::SetFdfPointer ( GSLFdfPointer  f)
inline

Definition at line 120 of file GSLFunctionWrapper.h.

120 { fFunc.fdf = f; }

References fFunc.

◆ SetFuncPointer()

void ROOT::Math::GSLFunctionDerivWrapper::SetFuncPointer ( GSLFuncPointer  f)
inline

Definition at line 118 of file GSLFunctionWrapper.h.

118 { fFunc.f = f; }

References fFunc.

◆ SetParams()

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

Definition at line 121 of file GSLFunctionWrapper.h.

121 { fFunc.params = p; }

References fFunc.

Member Data Documentation

◆ fFunc

gsl_function_fdf ROOT::Math::GSLFunctionDerivWrapper::fFunc
private

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