BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RootResidualFunction Class Reference

Minimizer function with access to single data element residuals, required by Fumili2 and GSLMultiMin minimizers. More...

+ Inheritance diagram for RootResidualFunction:

Public Types

typedef ROOT::Math::BasicFitMethodFunction< ROOT::Math::IMultiGenFunction >::Type_t Type_t
 

Public Member Functions

 RootResidualFunction (scalar_function_t objective_fun, gradient_function_t gradient_fun, size_t npars, size_t ndatasize)
 Constructs RootResidualFunction.
 
Type_t Type () const override
 
ROOT::Math::IMultiGenFunction * Clone () const override
 
double DataElement (const double *pars, unsigned int index, double *gradients=0) const override
 Evaluation of single data element residual. Will be called by ROOT minimizer. More...
 

Detailed Description

Minimizer function with access to single data element residuals, required by Fumili2 and GSLMultiMin minimizers.

Definition at line 32 of file RootResidualFunction.h.

Member Function Documentation

◆ DataElement()

double RootResidualFunction::DataElement ( const double *  pars,
unsigned int  index,
double *  gradients = 0 
) const
override

Evaluation of single data element residual. Will be called by ROOT minimizer.

Returns residual value for given data element index.

Transform call of ancient pointer based function to safer gradient_function_t.

Parameters
parsarray of fit parameter values from the minimizer
indexindex of residual element
gradientsif not zero, then array where we have to put gradients
Returns
value of residual for given data element index

Definition at line 43 of file RootResidualFunction.cpp.


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