Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Minuit2::NumericalDerivator Class Reference

Definition at line 40 of file NumericalDerivator.h.

Public Member Functions

 NumericalDerivator (bool always_exactly_mimic_minuit2=true)
 
 NumericalDerivator (const NumericalDerivator &other)
 
 NumericalDerivator (double step_tolerance, double grad_tolerance, unsigned int ncycles, double error_level, bool always_exactly_mimic_minuit2=true)
 
bool AlwaysExactlyMimicMinuit2 () const
 
std::vector< DerivatorElementDifferentiate (unsigned int nDim, const FCNBase *function, const double *x, std::span< const ROOT::Fit::ParameterSettings > parameters, std::span< const DerivatorElement > previous_gradient)
 
double DInt2Ext (const ROOT::Fit::ParameterSettings &parameter, double val) const
 
double Ext2int (const ROOT::Fit::ParameterSettings &parameter, double val) const
 
DerivatorElement FastPartialDerivative (const FCNBase *function, std::span< const ROOT::Fit::ParameterSettings > parameters, unsigned int i_component, const DerivatorElement &previous)
 
double GetValue () const
 
double Int2ext (const ROOT::Fit::ParameterSettings &parameter, double val) const
 
DerivatorElement operator() (unsigned int nDim, const FCNBase *function, const double *x, std::span< const ROOT::Fit::ParameterSettings > parameters, unsigned int i_component, const DerivatorElement &previous)
 
DerivatorElement PartialDerivative (unsigned int nDim, const FCNBase *function, const double *x, std::span< const ROOT::Fit::ParameterSettings > parameters, unsigned int i_component, DerivatorElement previous)
 
void PreseedFVal (double fval, std::span< const double > cx)
 Pre-seed the cache of the function value at the central point, so that a subsequent SetupDifferentiate() at the same point cx (in Minuit-internal coordinates) can skip its function evaluation.
 
void SetAlwaysExactlyMimicMinuit2 (bool flag)
 
void SetErrorLevel (double value)
 
void SetGradTolerance (double value)
 
void SetInitialGradient (std::span< const ROOT::Fit::ParameterSettings > parameters, std::vector< DerivatorElement > &gradient)
 This function was not implemented as in Minuit2.
 
void SetNCycles (unsigned int value)
 
void SetStepTolerance (double value)
 
void SetupDifferentiate (unsigned int nDim, const FCNBase *function, const double *cx, std::span< const ROOT::Fit::ParameterSettings > parameters)
 This function sets internal state based on input parameters.
 

Private Attributes

bool fAlwaysExactlyMimicMinuit2
 
double fDfmin
 
ROOT::Minuit2::SinParameterTransformation fDoubleLimTrafo
 
double fGradTolerance = 0.1
 
ROOT::Minuit2::SqrtLowParameterTransformation fLowerLimTrafo
 
unsigned int fNCycles = 2
 
ROOT::Minuit2::MnMachinePrecision fPrecision
 
double fStepTolerance = 0.5
 
double fUp = 1
 
ROOT::Minuit2::SqrtUpParameterTransformation fUpperLimTrafo
 
double fVal = 0
 
double fVrysml
 
std::vector< doublefVx
 
std::vector< doublefVxExternal
 
std::vector< doublefVxFValCache
 

#include <Minuit2/NumericalDerivator.h>

Constructor & Destructor Documentation

◆ NumericalDerivator() [1/3]

NumericalDerivator::NumericalDerivator ( bool always_exactly_mimic_minuit2 = true)
explicit

Definition at line 39 of file NumericalDerivator.cxx.

◆ NumericalDerivator() [2/3]

NumericalDerivator::NumericalDerivator ( const NumericalDerivator & other)
default

◆ NumericalDerivator() [3/3]

NumericalDerivator::NumericalDerivator ( double step_tolerance,
double grad_tolerance,
unsigned int ncycles,
double error_level,
bool always_exactly_mimic_minuit2 = true )

Definition at line 44 of file NumericalDerivator.cxx.

Member Function Documentation

◆ AlwaysExactlyMimicMinuit2()

bool ROOT::Minuit2::NumericalDerivator::AlwaysExactlyMimicMinuit2 ( ) const
inline

Definition at line 88 of file NumericalDerivator.h.

◆ Differentiate()

std::vector< DerivatorElement > NumericalDerivator::Differentiate ( unsigned int nDim,
const FCNBase * function,
const double * x,
std::span< const ROOT::Fit::ParameterSettings > parameters,
std::span< const DerivatorElement > previous_gradient )

Definition at line 153 of file NumericalDerivator.cxx.

◆ DInt2Ext()

double NumericalDerivator::DInt2Ext ( const ROOT::Fit::ParameterSettings & parameter,
double val ) const

Definition at line 202 of file NumericalDerivator.cxx.

◆ Ext2int()

double NumericalDerivator::Ext2int ( const ROOT::Fit::ParameterSettings & parameter,
double val ) const

Definition at line 185 of file NumericalDerivator.cxx.

◆ FastPartialDerivative()

DerivatorElement NumericalDerivator::FastPartialDerivative ( const FCNBase * function,
std::span< const ROOT::Fit::ParameterSettings > parameters,
unsigned int i_component,
const DerivatorElement & previous )

Definition at line 91 of file NumericalDerivator.cxx.

◆ GetValue()

double ROOT::Minuit2::NumericalDerivator::GetValue ( ) const
inline

Definition at line 75 of file NumericalDerivator.h.

◆ Int2ext()

double NumericalDerivator::Int2ext ( const ROOT::Fit::ParameterSettings & parameter,
double val ) const

Definition at line 169 of file NumericalDerivator.cxx.

◆ operator()()

DerivatorElement NumericalDerivator::operator() ( unsigned int nDim,
const FCNBase * function,
const double * x,
std::span< const ROOT::Fit::ParameterSettings > parameters,
unsigned int i_component,
const DerivatorElement & previous )

Definition at line 145 of file NumericalDerivator.cxx.

◆ PartialDerivative()

DerivatorElement NumericalDerivator::PartialDerivative ( unsigned int nDim,
const FCNBase * function,
const double * x,
std::span< const ROOT::Fit::ParameterSettings > parameters,
unsigned int i_component,
DerivatorElement previous )

Definition at line 82 of file NumericalDerivator.cxx.

◆ PreseedFVal()

void ROOT::Minuit2::NumericalDerivator::PreseedFVal ( double fval,
std::span< const double > cx )
inline

Pre-seed the cache of the function value at the central point, so that a subsequent SetupDifferentiate() at the same point cx (in Minuit-internal coordinates) can skip its function evaluation.

Callers that already know the function value at the gradient point (e.g. from the line search that Minuit just completed) can use this to avoid one full function call.

Definition at line 55 of file NumericalDerivator.h.

◆ SetAlwaysExactlyMimicMinuit2()

void ROOT::Minuit2::NumericalDerivator::SetAlwaysExactlyMimicMinuit2 ( bool flag)
inline

Definition at line 89 of file NumericalDerivator.h.

◆ SetErrorLevel()

void ROOT::Minuit2::NumericalDerivator::SetErrorLevel ( double value)
inline

Definition at line 79 of file NumericalDerivator.h.

◆ SetGradTolerance()

void ROOT::Minuit2::NumericalDerivator::SetGradTolerance ( double value)
inline

Definition at line 77 of file NumericalDerivator.h.

◆ SetInitialGradient()

void NumericalDerivator::SetInitialGradient ( std::span< const ROOT::Fit::ParameterSettings > parameters,
std::vector< DerivatorElement > & gradient )

This function was not implemented as in Minuit2.

Now it copies the behavior of InitialGradientCalculator. See https://github.com/roofit-dev/root/issues/10

Definition at line 224 of file NumericalDerivator.cxx.

◆ SetNCycles()

void ROOT::Minuit2::NumericalDerivator::SetNCycles ( unsigned int value)
inline

Definition at line 78 of file NumericalDerivator.h.

◆ SetStepTolerance()

void ROOT::Minuit2::NumericalDerivator::SetStepTolerance ( double value)
inline

Definition at line 76 of file NumericalDerivator.h.

◆ SetupDifferentiate()

void NumericalDerivator::SetupDifferentiate ( unsigned int nDim,
const FCNBase * function,
const double * cx,
std::span< const ROOT::Fit::ParameterSettings > parameters )

This function sets internal state based on input parameters.

This state setup is used in the actual (partial) derivative calculations.

Definition at line 58 of file NumericalDerivator.cxx.

Member Data Documentation

◆ fAlwaysExactlyMimicMinuit2

bool ROOT::Minuit2::NumericalDerivator::fAlwaysExactlyMimicMinuit2
private

Definition at line 112 of file NumericalDerivator.h.

◆ fDfmin

double ROOT::Minuit2::NumericalDerivator::fDfmin
private

Definition at line 100 of file NumericalDerivator.h.

◆ fDoubleLimTrafo

ROOT::Minuit2::SinParameterTransformation ROOT::Minuit2::NumericalDerivator::fDoubleLimTrafo
private

Definition at line 107 of file NumericalDerivator.h.

◆ fGradTolerance

double ROOT::Minuit2::NumericalDerivator::fGradTolerance = 0.1
private

Definition at line 93 of file NumericalDerivator.h.

◆ fLowerLimTrafo

ROOT::Minuit2::SqrtLowParameterTransformation ROOT::Minuit2::NumericalDerivator::fLowerLimTrafo
private

Definition at line 109 of file NumericalDerivator.h.

◆ fNCycles

unsigned int ROOT::Minuit2::NumericalDerivator::fNCycles = 2
private

Definition at line 111 of file NumericalDerivator.h.

◆ fPrecision

ROOT::Minuit2::MnMachinePrecision ROOT::Minuit2::NumericalDerivator::fPrecision
private

Definition at line 105 of file NumericalDerivator.h.

◆ fStepTolerance

double ROOT::Minuit2::NumericalDerivator::fStepTolerance = 0.5
private

Definition at line 92 of file NumericalDerivator.h.

◆ fUp

double ROOT::Minuit2::NumericalDerivator::fUp = 1
private

Definition at line 94 of file NumericalDerivator.h.

◆ fUpperLimTrafo

ROOT::Minuit2::SqrtUpParameterTransformation ROOT::Minuit2::NumericalDerivator::fUpperLimTrafo
private

Definition at line 108 of file NumericalDerivator.h.

◆ fVal

double ROOT::Minuit2::NumericalDerivator::fVal = 0
private

Definition at line 95 of file NumericalDerivator.h.

◆ fVrysml

double ROOT::Minuit2::NumericalDerivator::fVrysml
private

Definition at line 101 of file NumericalDerivator.h.

◆ fVx

std::vector<double> ROOT::Minuit2::NumericalDerivator::fVx
private

Definition at line 97 of file NumericalDerivator.h.

◆ fVxExternal

std::vector<double> ROOT::Minuit2::NumericalDerivator::fVxExternal
private

Definition at line 98 of file NumericalDerivator.h.

◆ fVxFValCache

std::vector<double> ROOT::Minuit2::NumericalDerivator::fVxFValCache
private

Definition at line 99 of file NumericalDerivator.h.

Libraries for ROOT::Minuit2::NumericalDerivator:

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