adding orphans assuming that the first separator key refers to the parent; GTSAM_PRINT define

release/4.3a0
Michael Kaess 2009-11-22 21:18:31 +00:00
parent 198f73a05f
commit a3de1df5a4
2 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,8 @@
#include <boost/shared_ptr.hpp>
#include <stdio.h>
#define GTSAM_PRINT(x)(x.print(#x))
namespace gtsam {
/**

View File

@ -47,6 +47,12 @@ void update(SymbolicBayesTree& bayesTree, const boost::shared_ptr<SymbolicFactor
// add orphans to the bottom of the new tree
BOOST_FOREACH(SymbolicBayesTree::sharedClique orphan, orphans) {
string key = *(orphan->separator_.begin()); // todo: assumes there is a separator...
SymbolicBayesTree::sharedClique parent = bayesTree[key];
parent->children_ += orphan;
}
#if 0
BOOST_FOREACH(string key1, orphan->separator_) {
// get clique from new tree to attach to
SymbolicBayesTree::sharedClique candidateParent = bayesTree[key1];
@ -71,6 +77,7 @@ void update(SymbolicBayesTree& bayesTree, const boost::shared_ptr<SymbolicFactor
}
}
}
#endif
}
/* ************************************************************************* */