34 MnPrint print(
"InitialGradientCalculator");
36 print.
Debug(
"Calculating initial gradient at point", par.
Vec());
40 for (
unsigned int i = 0; i <
n; i++) {
43 double var = par.
Vec()(i);
46 double save2 = save1 + werr;
52 double vplu = var2 - var;
59 double vmin = var2 - var;
62 double dirin = std::max(0.5 * (std::fabs(vplu) + std::fabs(vmin)), gsmin);
64 double gstep = std::max(gsmin, 0.1 * dirin);
65 double grd = g2 * dirin;
74 print.
Debug(
"Computed initial gradient for parameter",
Trafo().Name(exOfIn),
"value", var,
"[", vmin,
",", vplu,
75 "]",
"dirin", dirin,
"grd", grd,
"g2", g2);
const MnUserTransformation & fTransformation
const MnMachinePrecision & Precision() const
const MnUserTransformation & Trafo() const
FunctionGradient operator()(const MinimumParameters &) const override
unsigned int size() const
const MnAlgebraicVector & Vec() const
double LowerLimit() const
double UpperLimit() const
Sets the relative floating point (double) arithmetic precision.
double Eps2() const
eps2 returns 2*sqrt(eps)
void Debug(const Ts &... args)
CPyCppyy::Parameter Parameter
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...