/** * @file testIncremental.cpp * @brief Unit tests for graph-based iSAM * @author Michael Kaess */ #include // for operator += using namespace boost::assign; #include #include "SymbolicBayesNet.h" #include "GaussianBayesNet.h" #include "Ordering.h" #include "BayesTree-inl.h" #include "smallExample.h" using namespace gtsam; typedef BayesTree SymbolicBayesTree; typedef BayesTree GaussianBayesTree; // todo: copied from testBayesTree // 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", "L", "B")), S(new SymbolicConditional("S", "L", "B")), T(new SymbolicConditional("T", "E", "L")), X( new SymbolicConditional("X", "E")); /* ************************************************************************* */ TEST( BayesTree, Front ) { SymbolicBayesNet f1; f1.push_back(B); f1.push_back(L); SymbolicBayesNet f2; f2.push_back(L); f2.push_back(B); CHECK(f1.equals(f1)); CHECK(!f1.equals(f2)); } /* ************************************************************************* */ int main() { TestResult tr; return TestRegistry::runAllTests(tr); } /* ************************************************************************* */