From 9d704bb977550eefb06d9ea0734025cbfa6bdf7b Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Thu, 25 Feb 2010 21:07:35 +0000 Subject: [PATCH] Added flag to default Factorization for old or new elimination, defaulting to old code. --- cpp/GaussianFactorGraph.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/GaussianFactorGraph.h b/cpp/GaussianFactorGraph.h index 389066ead..18591a9e3 100644 --- a/cpp/GaussianFactorGraph.h +++ b/cpp/GaussianFactorGraph.h @@ -262,16 +262,18 @@ namespace gtsam { class Factorization { private: boost::shared_ptr ordering_; + bool useOldEliminate_; public: - Factorization(boost::shared_ptr ordering) : ordering_(ordering) {} + Factorization(boost::shared_ptr ordering, bool old=true) + : ordering_(ordering), useOldEliminate_(old) {} /** * solve for the optimal displacement in the tangent space, and then solve * the resulted linear system */ VectorConfig optimize(GaussianFactorGraph& fg) const { - return fg.optimize(*ordering_); + return fg.optimize(*ordering_, useOldEliminate_); } /**