From 019892b9004f6eddcc15211d7af84b9eddcd91b8 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Fri, 23 Sep 2011 02:26:29 +0000 Subject: [PATCH] A bit more debug info in ldlPartial --- gtsam/base/cholesky.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtsam/base/cholesky.cpp b/gtsam/base/cholesky.cpp index 26cd3fb5e..093540890 100644 --- a/gtsam/base/cholesky.cpp +++ b/gtsam/base/cholesky.cpp @@ -162,6 +162,11 @@ Eigen::LDLT::TranspositionType ldlPartial(Matrix& ABC, size_t nFrontal) const size_t n = ABC.rows(); + if(debug) { + cout << "Partial LDL with " << nFrontal << " frontal scalars, "; + print(ABC, "ABC: "); + } + // Compute Cholesky factorization of A, overwrites A = sqrt(D)*R // tic(1, "ldl"); Eigen::LDLT ldlt; @@ -203,6 +208,8 @@ Eigen::LDLT::TranspositionType ldlPartial(Matrix& ABC, size_t nFrontal) if(debug) cout << "L:\n" << Eigen::MatrixXd(ABC.bottomRightCorner(n-nFrontal,n-nFrontal).selfadjointView()) << endl; // toc(3, "compute L"); + if(debug) cout << "P: " << ldlt.transpositionsP().indices() << endl; + return ldlt.transpositionsP(); }