Removed spurious printing when increasing lambda due to negative matrix
parent
43bc372a83
commit
fd4c4fda5d
|
|
@ -168,8 +168,10 @@ Eigen::LDLT<Matrix>::TranspositionType ldlPartial(Matrix& ABC, size_t nFrontal)
|
|||
ldlt.compute(ABC.block(0,0,nFrontal,nFrontal).selfadjointView<Eigen::Upper>());
|
||||
|
||||
if(ldlt.vectorD().unaryExpr(boost::bind(less<double>(), _1, 0.0)).any()) {
|
||||
gtsam::print(Matrix(ldlt.matrixU()), "U: ");
|
||||
gtsam::print(Vector(ldlt.vectorD()), "D: ");
|
||||
if(debug) {
|
||||
gtsam::print(Matrix(ldlt.matrixU()), "U: ");
|
||||
gtsam::print(Vector(ldlt.vectorD()), "D: ");
|
||||
}
|
||||
throw NegativeMatrixException();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,8 @@ namespace gtsam {
|
|||
}
|
||||
}
|
||||
} catch(const NegativeMatrixException& e) {
|
||||
cout << "Negative matrix, increasing lambda" << endl;
|
||||
if(verbosity >= Parameters::LAMBDA)
|
||||
cout << "Negative matrix, increasing lambda" << endl;
|
||||
// Either we're not cautious, or the same lambda was worse than the current error.
|
||||
// The more adventurous lambda was worse too, so make lambda more conservative
|
||||
// and keep the same values.
|
||||
|
|
|
|||
Loading…
Reference in New Issue