From 8bf0b3c04c24cf4721609ed3a2a554eebbec253a Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Wed, 18 Jan 2012 20:42:53 +0000 Subject: [PATCH] Small fix in printing debug info --- gtsam/linear/GaussianFactorGraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/linear/GaussianFactorGraph.cpp b/gtsam/linear/GaussianFactorGraph.cpp index d3124ae65..6184c9563 100644 --- a/gtsam/linear/GaussianFactorGraph.cpp +++ b/gtsam/linear/GaussianFactorGraph.cpp @@ -433,11 +433,11 @@ namespace gtsam { "convertToJacobians: factor is neither a JacobianFactor nor a HessianFactor."); J::shared_ptr converted(new J(*hessian)); if (debug) { - if (!assert_equal(*hessian, HessianFactor(*converted), 1e-3)) throw runtime_error( - "convertToJacobians: Conversion between Jacobian and Hessian incorrect"); cout << "Converted HessianFactor to JacobianFactor:\n"; hessian->print("HessianFactor: "); converted->print("JacobianFactor: "); + if (!assert_equal(*hessian, HessianFactor(*converted), 1e-3)) throw runtime_error( + "convertToJacobians: Conversion between Jacobian and Hessian incorrect"); } jacobians.push_back(converted); }