|
ROOT
Reference Guide |
|
Go to the documentation of this file.
37 if (err.
size() == 1 && err(0, 0) < prec.
Eps()) {
41 if (err.
size() == 1 && err(0, 0) > prec.
Eps()) {
46 double epspdf = std::max(1.e-6, prec.
Eps2());
47 double dgmin = err(0, 0);
49 for (
unsigned int i = 0; i < err.
Nrow(); i++) {
51 print.
Warn(
"non-positive diagonal element in covariance matrix[", i,
"] =", err(i, i));
53 if (err(i, i) < dgmin)
59 dg = 0.5 + epspdf - dgmin;
62 print.
Warn(
"Added to diagonal of Error matrix a value", dg);
69 for (
unsigned int i = 0; i < err.
Nrow(); i++) {
74 for (
unsigned int j = 0; j <= i; j++) {
75 p(i, j) = err(i, j) *
s(i) *
s(j);
81 double pmin = eval(0);
82 double pmax = eval(eval.
size() - 1);
85 if (pmin > epspdf * pmax)
88 double padd = 0.001 * pmax - pmin;
90 for (
unsigned int i = 0; i < err.
Nrow(); i++)
91 err(i, i) *= (1. + padd);
93 print.
Debug([&](std::ostream &os) {
95 for (
unsigned i = 0; i < err.
Nrow(); ++i)
96 os <<
"\n " << eval(i);
101 print.
Warn(
"Matrix forced pos-def by adding to diagonal", padd);
double Eps2() const
eps2 returns 2*sqrt(eps)
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
void Debug(const Ts &... args)
LAVector eigenvalues(const LASymMatrix &mat)
const FunctionGradient & Gradient() const
Class describing a symmetric matrix of size n.
unsigned int size() const
static constexpr double s
MinimumState operator()(const MinimumState &, const MnMachinePrecision &) const
double Eps() const
eps returns the smallest possible number so that 1.+eps > 1.
void Warn(const Ts &... args)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
const MinimumError & Error() const
Sets the relative floating point (double) arithmetic precision.
unsigned int Nrow() const
unsigned int size() const
MinimumError keeps the inv.
const MinimumParameters & Parameters() const
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...