From 812f441d790439e066989a39d7e7afffbff76652 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Tue, 5 Mar 2013 05:47:23 +0000 Subject: [PATCH] Bug fix in BayesTree::removeClique - only frontal variables should be cleared from the nodes_ index. --- gtsam/inference/BayesTree-inl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtsam/inference/BayesTree-inl.h b/gtsam/inference/BayesTree-inl.h index e4ca4a9c1..3398b0803 100644 --- a/gtsam/inference/BayesTree-inl.h +++ b/gtsam/inference/BayesTree-inl.h @@ -260,8 +260,7 @@ namespace gtsam { BOOST_FOREACH(sharedClique child, clique->children_) child->parent_ = typename Clique::weak_ptr(); - BOOST_FOREACH(Index j, (*clique->conditional())) { - assert(j < nodes_.size()); // Don't want to overrun nodes list + BOOST_FOREACH(Index j, clique->conditional()->frontals()) { nodes_[j].reset(); } }