MinimTransformFunction class to perform a transformations on the variables to deal with fixed or limited variables (support both double and single bounds) The class manages the passed function pointer.
Definition at line 41 of file MinimTransformFunction.h.
Public Types | |
typedef ROOT::Math::IMultiGradFunction::BaseFunc | BaseFunc |
typedef ROOT::Math::IMultiGradFunction | BaseGradFunc |
Public Types inherited from ROOT::Math::IGradientFunctionMultiDimTempl< T > | |
typedef IBaseFunctionMultiDimTempl< T > | BaseFunc |
typedef IGradientFunctionMultiDimTempl< T > | BaseGrad |
Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T > | |
typedef T | BackendType |
typedef IBaseFunctionMultiDimTempl< T > | BaseFunc |
Public Member Functions | |
MinimTransformFunction (const IMultiGradFunction *f, const std::vector< ROOT::Math::EMinimVariableType > &types, const std::vector< double > &values, const std::map< unsigned int, std::pair< double, double > > &bounds) | |
Constructor from a IMultiGradFunction interface that is externally managed vector specifying the variable types (free, bounded or fixed, defined in enum EMinimVariableTypes ) variable values (used for the fixed ones) and a map with the bounds (for the bounded variables) | |
~MinimTransformFunction () override | |
Destructor (no operation) | |
IMultiGenFunction * | Clone () const override |
clone: not supported (since unique_ptr used in the fVariables) | |
void | GradientTransformation (const double *x, const double *gExt, double *gInt) const |
transform gradient vector (external -> internal) at internal point x | |
void | InvStepTransformation (const double *x, const double *sext, double *sint) const |
inverse transformation for steps (external -> internal) at external point x | |
void | InvTransformation (const double *xext, double *xint) const |
inverse transformation (external -> internal) | |
void | MatrixTransformation (const double *x, const double *covInt, double *covExt) const |
transform covariance matrix (internal -> external) at internal point x use row storages for matrices m(i,j) = rep[ i * dim + j] | |
unsigned int | NDim () const override |
Retrieve the dimension of the function. | |
unsigned int | NTot () const |
const IMultiGradFunction * | OriginalFunction () const |
const double * | Transformation (const double *x) const |
transform from internal to external result is cached also inside the class | |
void | Transformation (const double *xint, double *xext) const |
transform from internal to external | |
Public Member Functions inherited from ROOT::Math::IGradientFunctionMultiDimTempl< T > | |
T | Derivative (const T *x, unsigned int icoord, T *previous_grad, T *previous_g2, T *previous_gstep) const |
In some cases, the derivative algorithm will use information from the previous step, these can be passed in with this overload. | |
T | Derivative (const T *x, unsigned int icoord=0) const |
Return the partial derivative with respect to the passed coordinate. | |
virtual void | FdF (const T *x, T &f, T *df) const |
Optimized method to evaluate at the same time the function value and derivative at a point x. | |
virtual void | Gradient (const T *x, T *grad) const |
Evaluate all the vector of function derivatives (gradient) at a point x. | |
virtual void | GradientWithPrevResult (const T *x, T *grad, T *previous_grad, T *previous_g2, T *previous_gstep) const |
In some cases, the gradient algorithm will use information from the previous step, these can be passed in with this overload. | |
bool | HasGradient () const |
virtual bool | returnsInMinuit2ParameterSpace () const |
Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T > | |
virtual | ~IBaseFunctionMultiDimTempl ()=default |
T | operator() (const T *x) const |
Evaluate the function at a point x[]. | |
Private Member Functions | |
MinimTransformFunction (const MinimTransformFunction &) | |
double | DoDerivative (const double *x, unsigned int icoord) const override |
calculate derivatives | |
double | DoEval (const double *x) const override |
function evaluation | |
MinimTransformFunction & | operator= (const MinimTransformFunction &) |
Private Attributes | |
const IMultiGradFunction * | fFunc |
user function | |
std::vector< unsigned int > | fIndex |
vector with external indices for internal variables | |
std::vector< MinimTransformVariable > | fVariables |
vector of variable settings and transformation function | |
std::vector< double > | fX |
internal cached of external values | |
#include <Math/MinimTransformFunction.h>
Definition at line 46 of file MinimTransformFunction.h.
Definition at line 45 of file MinimTransformFunction.h.
ROOT::Math::MinimTransformFunction::MinimTransformFunction | ( | const IMultiGradFunction * | f, |
const std::vector< ROOT::Math::EMinimVariableType > & | types, | ||
const std::vector< double > & | values, | ||
const std::map< unsigned int, std::pair< double, double > > & | bounds | ||
) |
Constructor from a IMultiGradFunction interface that is externally managed vector specifying the variable types (free, bounded or fixed, defined in enum EMinimVariableTypes ) variable values (used for the fixed ones) and a map with the bounds (for the bounded variables)
Definition at line 24 of file MinimTransformFunction.cxx.
|
inlineoverride |
Destructor (no operation)
Definition at line 62 of file MinimTransformFunction.h.
|
inlineprivate |
Definition at line 127 of file MinimTransformFunction.h.
|
inlineoverridevirtual |
clone: not supported (since unique_ptr used in the fVariables)
Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.
Definition at line 71 of file MinimTransformFunction.h.
|
inlineoverrideprivate |
calculate derivatives
Definition at line 118 of file MinimTransformFunction.h.
function evaluation
Definition at line 107 of file MinimTransformFunction.h.
void ROOT::Math::MinimTransformFunction::GradientTransformation | ( | const double * | x, |
const double * | gExt, | ||
double * | gInt | ||
) | const |
transform gradient vector (external -> internal) at internal point x
Definition at line 121 of file MinimTransformFunction.cxx.
void ROOT::Math::MinimTransformFunction::InvStepTransformation | ( | const double * | x, |
const double * | sext, | ||
double * | sint | ||
) | const |
inverse transformation for steps (external -> internal) at external point x
Definition at line 100 of file MinimTransformFunction.cxx.
void ROOT::Math::MinimTransformFunction::InvTransformation | ( | const double * | xext, |
double * | xint | ||
) | const |
inverse transformation (external -> internal)
Definition at line 87 of file MinimTransformFunction.cxx.
void ROOT::Math::MinimTransformFunction::MatrixTransformation | ( | const double * | x, |
const double * | covInt, | ||
double * | covExt | ||
) | const |
transform covariance matrix (internal -> external) at internal point x use row storages for matrices m(i,j) = rep[ i * dim + j]
Definition at line 136 of file MinimTransformFunction.cxx.
|
inlineoverridevirtual |
Retrieve the dimension of the function.
Reimplemented from ROOT::Math::IGradientFunctionMultiDimTempl< T >.
Definition at line 66 of file MinimTransformFunction.h.
|
inline |
Definition at line 68 of file MinimTransformFunction.h.
|
inlineprivate |
Definition at line 132 of file MinimTransformFunction.h.
|
inline |
Definition at line 101 of file MinimTransformFunction.h.
transform from internal to external result is cached also inside the class
Definition at line 78 of file MinimTransformFunction.h.
void ROOT::Math::MinimTransformFunction::Transformation | ( | const double * | xint, |
double * | xext | ||
) | const |
transform from internal to external
Definition at line 63 of file MinimTransformFunction.cxx.
|
private |
user function
Definition at line 143 of file MinimTransformFunction.h.
|
private |
vector with external indices for internal variables
Definition at line 142 of file MinimTransformFunction.h.
|
private |
vector of variable settings and transformation function
Definition at line 141 of file MinimTransformFunction.h.
|
mutableprivate |
internal cached of external values
Definition at line 140 of file MinimTransformFunction.h.