From a2c3b8e0833f22ed001bc0f00a8044ba84398f30 Mon Sep 17 00:00:00 2001 From: jing Date: Mon, 27 Jan 2014 15:13:37 -0500 Subject: [PATCH] remove changes in gtsam/linear/NoiseModel.cpp to fix unit test failures --- gtsam/linear/NoiseModel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtsam/linear/NoiseModel.cpp b/gtsam/linear/NoiseModel.cpp index 3218d9ebb..641b47640 100644 --- a/gtsam/linear/NoiseModel.cpp +++ b/gtsam/linear/NoiseModel.cpp @@ -370,6 +370,8 @@ SharedDiagonal Constrained::QR(Matrix& Ab) const { list Rd; Vector pseudo(m); // allocate storage for pseudo-inverse + Vector invsigmas = reciprocal(sigmas_); + Vector weights = emul(invsigmas,invsigmas); // calculate weights once // We loop over all columns, because the columns that can be eliminated // are not necessarily contiguous. For each one, estimate the corresponding @@ -381,7 +383,7 @@ SharedDiagonal Constrained::QR(Matrix& Ab) const { // Calculate weighted pseudo-inverse and corresponding precision gttic(constrained_QR_weightedPseudoinverse); - double precision = weightedPseudoinverse(a, precisions_, pseudo); + double precision = weightedPseudoinverse(a, weights, pseudo); gttoc(constrained_QR_weightedPseudoinverse); // If precision is zero, no information on this column