From 4bc9ee6787912dcbebe41fed8f97cecfbc30949c Mon Sep 17 00:00:00 2001 From: Sungtae An Date: Fri, 30 Jan 2015 14:28:24 -0500 Subject: [PATCH] Fix error from PCG solver which causes test failure on Mac, with Luca --- gtsam/linear/PCGSolver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtsam/linear/PCGSolver.cpp b/gtsam/linear/PCGSolver.cpp index ffb744239..3698edc2f 100644 --- a/gtsam/linear/PCGSolver.cpp +++ b/gtsam/linear/PCGSolver.cpp @@ -84,8 +84,7 @@ void GaussianFactorGraphSystem::multiply(const Vector &x, Vector& AtAx) const { gfg_.multiplyHessianAdd(1.0, vvX, vvAtAx); // Make the result as Vector form - AtAx = vvAtAx.vector(); - + AtAx = vvAtAx.vector(keyInfo_.ordering()); } /*****************************************************************************/ @@ -96,7 +95,7 @@ void GaussianFactorGraphSystem::getb(Vector &b) const { VectorValues vvb = gfg_.gradientAtZero(); // Make the result as Vector form - b = -vvb.vector(); + b = -vvb.vector(keyInfo_.ordering()); } /**********************************************************************************/