From e2a3d1cb8f5a7d43520e6c4d0ebdfb6987e3ee6c Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Thu, 19 Nov 2009 04:52:46 +0000 Subject: [PATCH] Fixed test --- cpp/BayesTree-inl.h | 5 ----- cpp/testIncremental.cpp | 11 ++++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/cpp/BayesTree-inl.h b/cpp/BayesTree-inl.h index 5374c48bb..2c2e9f208 100644 --- a/cpp/BayesTree-inl.h +++ b/cpp/BayesTree-inl.h @@ -199,11 +199,6 @@ namespace gtsam { const pair::sharedClique >& v1, const pair::sharedClique >& v2 ) { -// cout << v1.first << " =? " << v2.first << endl; -// cout << (v1.first == v2.first) << endl; -// cout << v1.second->equals(*(v2.second)) << endl; -// v1.second->print("v1"); -// v2.second->print("v2"); return v1.first == v2.first && v1.second->equals(*(v2.second)); } diff --git a/cpp/testIncremental.cpp b/cpp/testIncremental.cpp index 31db87cab..d17da95d9 100644 --- a/cpp/testIncremental.cpp +++ b/cpp/testIncremental.cpp @@ -25,8 +25,9 @@ typedef BayesTree GaussianBayesTree; // Conditionals for ASIA example from the tutorial with A and D evidence SymbolicConditional::shared_ptr B(new SymbolicConditional("B")), L( new SymbolicConditional("L", "B")), E( - new SymbolicConditional("E", "B", "L")), S(new SymbolicConditional("S", - "L", "B")), T(new SymbolicConditional("T", "E", "L")), X( + new SymbolicConditional("E", "B", "L")), S1(new SymbolicConditional("S", + "B", "L")), S2(new SymbolicConditional("S", "L", "B")), T( + new SymbolicConditional("T", "E", "L")), X( new SymbolicConditional("X", "E")); /* ************************************************************************* */ @@ -85,7 +86,7 @@ TEST( BayesTree, iSAM ) bayesTree.insert(B); bayesTree.insert(L); bayesTree.insert(E); - bayesTree.insert(S); + bayesTree.insert(S2); bayesTree.insert(T); bayesTree.insert(X); @@ -93,7 +94,7 @@ TEST( BayesTree, iSAM ) SymbolicBayesTree expected; expected.insert(B); expected.insert(L); - expected.insert(S); + expected.insert(S1); expected.insert(E); expected.insert(T); expected.insert(X); @@ -107,7 +108,7 @@ TEST( BayesTree, iSAM ) SymbolicBayesTree actual = update(bayesTree, newFactor); // Check whether the same - //CHECK(assert_equal(expected,actual)); + CHECK(assert_equal(expected,actual)); } /* ************************************************************************* */