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 sav2 = sav + 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 MnStrategy & Strategy() const
const MnUserTransformation & fTransformation
const MnMachinePrecision & Precision() const
const MnUserTransformation & Trafo() const
double GradTolerance() const
unsigned int Ncycle() const
virtual FunctionGradient operator()(const MinimumParameters &) const
double StepTolerance() const
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)
double GradientStepTolerance() const
double GradientTolerance() const
unsigned int GradientNCycles() const
CPyCppyy::Parameter Parameter
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...