16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_FIT_ADAPTER_RESIDUALFUNCTIONADAPTER_H
21 #define BORNAGAIN_FIT_ADAPTER_RESIDUALFUNCTIONADAPTER_H
45 std::vector<double>
get_residuals(
const std::vector<double>& pars);
49 std::vector<double>& gradients);
51 double chi2(
const std::vector<double>& pars);
Defines interface IFunctionAdapter.
Defines class Parameters.
Defines common types for fitting library.
std::function< std::vector< double >(const mumufit::Parameters &)> fcn_residual_t
Minimizer function with access to single data element residuals, required by Fumili2 and GSLMultiMin ...
Base class for objective function adapters, which converts user functions to minimize into the functi...
A collection of fit parameters.
Provides RootResidualFunction which will be minimizer by ROOT.
const RootResidualFunction * rootResidualFunction()
std::vector< std::vector< double > > m_gradients
double element_residual(const std::vector< double > &pars, unsigned int index, std::vector< double > &gradients)
evaluate method for gradients and residuals called directly from the minimizer
std::vector< double > get_residuals(const std::vector< double > &pars)
std::unique_ptr< RootResidualFunction > m_root_objective
void calculate_gradients(const std::vector< double > &pars)
size_t m_datasize
Length of vector with residuals, should stay the same during minimization.
std::vector< double > m_residuals
double chi2(const std::vector< double > &pars)
Evaluate chi2.
ResidualFunctionAdapter(fcn_residual_t func, const Parameters ¶meters)
fcn_residual_t m_fcn
user function to minimize
The multi-library, multi-algorithm fit wrapper library.