BayesTree animation

release/4.3a0
Michael Kaess 2009-12-14 06:01:15 +00:00
parent c4b60bfd65
commit 2270c7d787
2 changed files with 13 additions and 4 deletions

View File

@ -434,11 +434,10 @@ namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
template<class Conditional> template<class Conditional>
template<class Factor> template<class Factor>
void BayesTree<Conditional>::update(const FactorGraph<Factor>& newFactors) { void BayesTree<Conditional>::update_internal(const FactorGraph<Factor>& newFactors, Cliques& orphans) {
// Remove the contaminated part of the Bayes tree // Remove the contaminated part of the Bayes tree
FactorGraph<Factor> factors; FactorGraph<Factor> factors;
Cliques orphans;
boost::tie(factors, orphans) = removeTop<Factor>(newFactors); boost::tie(factors, orphans) = removeTop<Factor>(newFactors);
// add the factors themselves // add the factors themselves
@ -467,7 +466,15 @@ namespace gtsam {
} }
} }
/* ************************************************************************* */
template<class Conditional>
template<class Factor>
void BayesTree<Conditional>::update(const FactorGraph<Factor>& newFactors) {
Cliques orphans;
update_internal(newFactors, orphans);
}
/* ************************************************************************* */
} }
/// namespace gtsam /// namespace gtsam

View File

@ -188,9 +188,11 @@ namespace gtsam {
removeTop(const FactorGraph<Factor>& newFactors); removeTop(const FactorGraph<Factor>& newFactors);
/** /**
* iSAM. * iSAM. (_internal provides access to list of orphans for drawing purposes)
*/ */
template<class Factor> template<class Factor>
void update_internal(const FactorGraph<Factor>& newFactors, Cliques& orphans);
template<class Factor>
void update(const FactorGraph<Factor>& newFactors); void update(const FactorGraph<Factor>& newFactors);
}; // BayesTree }; // BayesTree