When erasing cached shortcut conditionals in the Bayes Tree, only erase the chains of shortcuts that exist instead of the whole tree.
parent
b211c1070d
commit
f39bad0d13
|
@ -268,12 +268,19 @@ namespace gtsam {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
template<class DERIVED, class CONDITIONAL>
|
template<class DERIVED, class CONDITIONAL>
|
||||||
void BayesTreeCliqueBase<DERIVED, CONDITIONAL>::deleteCachedShorcuts() {
|
void BayesTreeCliqueBase<DERIVED, CONDITIONAL>::deleteCachedShorcuts() {
|
||||||
//Delete CachedShortcut for this clique
|
|
||||||
this->resetCachedShortcut();
|
// When a shortcut is requested, all of the shortcuts between it and the
|
||||||
// Recursive call over all child cliques
|
// root are also generated. So, if this clique's cached shortcut is set,
|
||||||
BOOST_FOREACH(derived_ptr& child, children_) {
|
// recursively call over all child cliques. Otherwise, it is unnecessary.
|
||||||
child->deleteCachedShorcuts();
|
if(cachedShortcut_) {
|
||||||
}
|
BOOST_FOREACH(derived_ptr& child, children_) {
|
||||||
|
child->deleteCachedShorcuts();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Delete CachedShortcut for this clique
|
||||||
|
this->resetCachedShortcut();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue