From 192962d96f8a0ab46582cb45ccd2ad323525e80e Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Fri, 16 Aug 2013 21:16:06 +0000 Subject: [PATCH] Fixed a couple problems in converted ConcurrentIncrementalFilter and ConcurrentIncrementalSmoother --- gtsam_unstable/nonlinear/ConcurrentIncrementalFilter.cpp | 6 +++--- gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gtsam_unstable/nonlinear/ConcurrentIncrementalFilter.cpp b/gtsam_unstable/nonlinear/ConcurrentIncrementalFilter.cpp index d83e08c09..7963d0e00 100644 --- a/gtsam_unstable/nonlinear/ConcurrentIncrementalFilter.cpp +++ b/gtsam_unstable/nonlinear/ConcurrentIncrementalFilter.cpp @@ -204,7 +204,7 @@ void ConcurrentIncrementalFilter::synchronize(const NonlinearFactorGraph& smooth // Calculate the summarized factor on just the new separator keys NonlinearFactorGraph currentSmootherSummarization = internal::calculateMarginalFactors(graph, values, newSeparatorKeys, - isam2_.params().factorization == ISAM2Params::CHOLESKY ? EliminateCholesky : EliminateQR); + isam2_.params().getEliminationFunction()); // Remove the old factors on the separator and insert the new ones FastVector removeFactors(currentSmootherSummarizationSlots_.begin(), currentSmootherSummarizationSlots_.end()); @@ -329,7 +329,7 @@ void ConcurrentIncrementalFilter::updateShortcut(const NonlinearFactorGraph& rem values.insert(isam2_.getLinearizationPoint()); // Calculate the summarized factor on the shortcut keys smootherShortcut_ = internal::calculateMarginalFactors(graph, values, shortcutKeys, - isam2_.params().factorization == ISAM2Params::CHOLESKY ? EliminateCholesky : EliminateQR); + isam2_.params().getEliminationFunction()); } /* ************************************************************************* */ @@ -402,7 +402,7 @@ NonlinearFactorGraph ConcurrentIncrementalFilter::calculateFilterSummarization() // Calculate the marginal factors on the separator NonlinearFactorGraph filterSummarization = internal::calculateMarginalFactors(graph, isam2_.getLinearizationPoint(), separatorKeys, - isam2_.params().factorization == ISAM2Params::CHOLESKY ? EliminateCholesky : EliminateQR); + isam2_.params().getEliminationFunction()); return filterSummarization; } diff --git a/gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.cpp b/gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.cpp index 266f3a8cd..0e68461a3 100644 --- a/gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.cpp +++ b/gtsam_unstable/nonlinear/ConcurrentIncrementalSmoother.cpp @@ -177,7 +177,7 @@ void ConcurrentIncrementalSmoother::updateSmootherSummarization() { // Find all cliques that contain any separator variables std::set separatorCliques; - BOOST_FOREACH(Key key, separatorKeys) { + BOOST_FOREACH(Key key, separatorValues_.keys()) { ISAM2Clique::shared_ptr clique = isam2_[key]; separatorCliques.insert( clique ); } @@ -241,7 +241,7 @@ void ConcurrentIncrementalSmoother::updateSmootherSummarization() { // Calculate the marginal factors on the separator smootherSummarization_ = internal::calculateMarginalFactors(graph, isam2_.getLinearizationPoint(), separatorKeys, - isam2_.params().factorization == ISAM2Params::CHOLESKY ? EliminateCholesky : EliminateQR); + isam2_.params().getEliminationFunction()); } /* ************************************************************************* */