"Correct" way of checking for non-existent items in SymbolMap
parent
3d9ac5094b
commit
3736d73413
|
@ -600,16 +600,15 @@ namespace gtsam {
|
||||||
BayesNet<Conditional>& bn, typename BayesTree<Conditional>::Cliques& orphans) {
|
BayesNet<Conditional>& bn, typename BayesTree<Conditional>::Cliques& orphans) {
|
||||||
|
|
||||||
// process each key of the new factor
|
// process each key of the new factor
|
||||||
BOOST_FOREACH(const Symbol& key, keys)
|
BOOST_FOREACH(const Symbol& key, keys) {
|
||||||
try {
|
|
||||||
// get the clique
|
|
||||||
sharedClique clique = (*this)[key];
|
|
||||||
|
|
||||||
// remove path from clique to root
|
// get the clique
|
||||||
this->removePath(clique, bn, orphans);
|
typename Nodes::iterator clique(nodes_.find(key));
|
||||||
|
if(clique != nodes_.end()) {
|
||||||
} catch (std::invalid_argument e) {
|
// remove path from clique to root
|
||||||
}
|
this->removePath(clique->second, bn, orphans);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
Loading…
Reference in New Issue