diff --git a/cpp/BayesTree-inl.h b/cpp/BayesTree-inl.h index e2eb425b9..86da54fd9 100644 --- a/cpp/BayesTree-inl.h +++ b/cpp/BayesTree-inl.h @@ -434,11 +434,10 @@ namespace gtsam { /* ************************************************************************* */ template template - void BayesTree::update(const FactorGraph& newFactors) { + void BayesTree::update_internal(const FactorGraph& newFactors, Cliques& orphans) { // Remove the contaminated part of the Bayes tree FactorGraph factors; - Cliques orphans; boost::tie(factors, orphans) = removeTop(newFactors); // add the factors themselves @@ -467,7 +466,15 @@ namespace gtsam { } } - /* ************************************************************************* */ + + template + template + void BayesTree::update(const FactorGraph& newFactors) { + Cliques orphans; + update_internal(newFactors, orphans); + } + +/* ************************************************************************* */ } /// namespace gtsam diff --git a/cpp/BayesTree.h b/cpp/BayesTree.h index 618026cef..03765a23f 100644 --- a/cpp/BayesTree.h +++ b/cpp/BayesTree.h @@ -188,9 +188,11 @@ namespace gtsam { removeTop(const FactorGraph& newFactors); /** - * iSAM. + * iSAM. (_internal provides access to list of orphans for drawing purposes) */ template + void update_internal(const FactorGraph& newFactors, Cliques& orphans); + template void update(const FactorGraph& newFactors); }; // BayesTree