fixed orphans bug
parent
9da2f16f4d
commit
952798e751
|
@ -402,10 +402,11 @@ namespace gtsam {
|
|||
// only add if key is not yet in the factor graph
|
||||
if (!factors.involves(key)) {
|
||||
|
||||
// get the clique
|
||||
// get the clique and remove it from orphans (if it exists)
|
||||
sharedClique clique = (*this)[key];
|
||||
orphans.remove(clique);
|
||||
|
||||
// remove path above this clique
|
||||
// remove path from clique to root
|
||||
FactorGraph<Factor> factors1; Cliques orphans1;
|
||||
boost::tie(factors1,orphans1) = removePath<Factor>(clique);
|
||||
|
||||
|
|
|
@ -364,7 +364,7 @@ TEST( BayesTree, removePath2 )
|
|||
{
|
||||
SymbolicBayesTree bayesTree = createAsiaSymbolicBayesTree();
|
||||
|
||||
// Call remove-path with clique S
|
||||
// Call remove-path with clique B
|
||||
FactorGraph<SymbolicFactor> factors;
|
||||
SymbolicBayesTree::Cliques orphans;
|
||||
boost::tie(factors,orphans) = bayesTree.removePath<SymbolicFactor>(bayesTree["B"]);
|
||||
|
@ -427,7 +427,7 @@ TEST( BayesTree, removeTop )
|
|||
CHECK(assert_equal((FactorGraph<SymbolicFactor>)expected, factors));
|
||||
SymbolicBayesTree::Cliques expectedOrphans;
|
||||
expectedOrphans += bayesTree["T"], bayesTree["X"];
|
||||
//CHECK(assert_equal(expectedOrphans, orphans));
|
||||
CHECK(assert_equal(expectedOrphans, orphans));
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
Loading…
Reference in New Issue