From efc5ea8dcefe7d0f018aeddf3e8a9113abdb5bb2 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Tue, 12 Nov 2013 17:02:46 +0000 Subject: [PATCH] Small cleanup --- gtsam/nonlinear/ISAM2.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gtsam/nonlinear/ISAM2.cpp b/gtsam/nonlinear/ISAM2.cpp index 3bb54d802..a789b96fb 100644 --- a/gtsam/nonlinear/ISAM2.cpp +++ b/gtsam/nonlinear/ISAM2.cpp @@ -710,16 +710,14 @@ ISAM2Result ISAM2::update( linearFactors_.push_back(*linearFactors); assert(nonlinearFactors_.size() == linearFactors_.size()); gttoc(linearize); - - gttic(augment_VI); - // Augment the variable index with the new factors - variableIndex_.augment(*linearFactors); // TODO: move this to a better place now - gttoc(augment_VI); - } else { - variableIndex_.augment(newFactors); } gttoc(linearize_new); + gttic(augment_VI); + // Augment the variable index with the new factors + variableIndex_.augment(newFactors); + gttoc(augment_VI); + gttic(recalculate); // 8. Redo top of Bayes tree boost::shared_ptr > replacedKeys;