From b96aa633706fa63ee9c97dc33b6f026477d6b688 Mon Sep 17 00:00:00 2001 From: Enrique Fernandez Date: Fri, 12 Feb 2016 15:39:28 -0500 Subject: [PATCH] Add Gaussian::Covariance NOTE about inverse --- gtsam/linear/NoiseModel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtsam/linear/NoiseModel.cpp b/gtsam/linear/NoiseModel.cpp index cb77902d0..776c60375 100644 --- a/gtsam/linear/NoiseModel.cpp +++ b/gtsam/linear/NoiseModel.cpp @@ -120,7 +120,10 @@ Gaussian::shared_ptr Gaussian::Covariance(const Matrix& covariance, if (variances) return Diagonal::Variances(*variances, true); else { - // TODO: can we do this more efficiently and still get an upper triangular nmatrix?? + // NOTE: if cov = L'*L, then the square root information R can be found by + // QR, as L.inverse() = Q*R, with Q some rotation matrix. However, R has + // annoying sign flips with respect the simpler Information(inv(cov)), + // hence we choose the simpler path here: return Information(covariance.inverse(), false); } }