41 return (*
this)(par,
gra);
49 int npar = params.size();
52 for (
int i = 0; i <
npar; ++i) {
72 MnPrint print(
"Numerical2PGradientCalculator");
85 double vrysml = 8. * eps * eps;
98 print.
Debug(
"Calculating gradient around function value",
fcnmin,
"\n\t at point", par.
Vec());
120 for (
int i = 0; i <
int(
n); i++) {
132 for (
unsigned int j = 0;
j <
ncycle;
j++) {
134 double step = std::max(
optstp, std::fabs(0.1 *
gstep(i)));
180 if (i == 0 &&
j == 0) {
182 printtl.Trace([&](std::ostream &os) {
184 print.
Trace([&](std::ostream &os) {
186 os << std::setw(10) <<
"parameter" << std::setw(6) <<
"cycle" << std::setw(15) <<
"x" << std::setw(15)
187 <<
"step" << std::setw(15) <<
"f1" << std::setw(15) <<
"f2" << std::setw(15) <<
"grd"
188 << std::setw(15) <<
"g2" << std::endl;
192 printtl.Trace([&](std::ostream &os) {
194 print.
Trace([&](std::ostream &os) {
196 const int pr = os.precision(13);
198 os << std::setw(10) <<
Trafo().Name(
iext) << std::setw(5) <<
j <<
" " <<
x(i) <<
" " << step <<
" "
199 <<
fs1 <<
" " <<
fs2 <<
" " <<
grd(i) <<
" " <<
g2(i) << std::endl;
225 print.
Debug([&](std::ostream &os) {
226 const int pr = os.precision(13);
228 os << std::setw(14) <<
"Parameter" << std::setw(14) <<
"Gradient" << std::setw(14) <<
"g2 " << std::setw(14)
229 <<
"step" << std::endl;
230 for (
int i = 0; i <
int(
n); i++) {
232 os << std::setw(14) <<
Trafo().Name(
iext) <<
" " <<
grd(i) <<
" " <<
g2(i) <<
" " <<
gstep(i) << std::endl;
249 return Strategy().GradientNCycles();
255 return Strategy().GradientStepTolerance();
261 return Strategy().GradientTolerance();
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Class to calculate an initial estimate of the gradient.
const MnAlgebraicVector & Vec() const
Sets the relative floating point (double) arithmetic precision.
void Debug(const Ts &... args)
void Trace(const Ts &... args)
const MnUserTransformation & Trafo() const
const MnStrategy & Strategy() const
const MnMachinePrecision & Precision() const
FunctionGradient operator()(const MinimumParameters &) const override
double GradTolerance() const
const MnUserTransformation & fTransformation
unsigned int Ncycle() const
const MnFcn & Fcn() const
double StepTolerance() const
CPyCppyy::Parameter Parameter
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...