37 if (err.
size() == 1 && err(0, 0) <
prec.Eps()) {
41 if (err.
size() == 1 && err(0, 0) >
prec.Eps()) {
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)
62 print.
Warn(
"Added to diagonal of Error matrix a value",
dg);
69 for (
unsigned int i = 0; i < err.
Nrow(); i++) {
73 s(i) = 1. / std::sqrt(err(i, 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);
84 pmax = std::max(std::fabs(
pmax), 1.);
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);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Class describing a symmetric matrix of size n.
unsigned int Nrow() const
unsigned int size() const
unsigned int size() const
MinimumError keeps the inv.
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Sets the relative floating point (double) arithmetic precision.
MinimumState operator()(const MinimumState &, const MnMachinePrecision &) const
void Debug(const Ts &... args)
void Warn(const Ts &... args)
LAVector eigenvalues(const LASymMatrix &mat)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...