22 #include <boost/make_shared.hpp> 23 #include <boost/assign/list_of.hpp> 31 using namespace gtsam;
34 using boost::assign::list_of;
43 leaf0->factors.push_back(fg[0]);
44 leaf0->factors.push_back(fg[1]);
48 node1->factors.push_back(fg[2]);
49 node1->children.push_back(leaf0);
53 node2->factors.push_back(fg[3]);
54 node2->children.push_back(node1);
58 leaf3->factors.push_back(fg[4]);
62 root->children.push_back(leaf3);
63 root->children.push_back(node2);
66 tree.
roots_.push_back(root);
70 template<
typename ROOTS>
74 et.
roots_.assign(roots.begin(), roots.end());
79 template<
typename FACTORS>
85 node->factors.assign(factorsAsGraph.
begin(), factorsAsGraph.
end());
89 template<
typename FACTORS,
typename CHILDREN>
95 node->factors.assign(factorsAsGraph.
begin(), factorsAsGraph.
end());
96 node->children.assign(children.begin(), children.end());
145 Ordering order = list_of(
X(1)) (
L(3)) (
L(1)) (
X(5)) (
X(2)) (
L(2)) (
X(4)) (
X(3));
FastVector< sharedNode > roots_
Provides additional testing facilities for common data structures.
static SymbolicEliminationTree MakeTree(const ROOTS &roots)
static int runAllTests(TestResult &result)
static SymbolicEliminationTree buildHardcodedTree(const SymbolicFactorGraph &fg)
GaussianFactorGraph factors(list_of(factor1)(factor2)(factor3))
const mpreal root(const mpreal &x, unsigned long int k, mp_rnd_t r=mpreal::get_default_rnd())
const_iterator begin() const
NonlinearFactorGraph graph
boost::shared_ptr< Node > sharedNode
Shared pointer to Node.
#define EXPECT(condition)
const_iterator end() const
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
TEST(LPInitSolver, InfiniteLoopSingleVar)
static SymbolicEliminationTree::sharedNode MakeNode(Key key, const FACTORS &factors)
std::uint64_t Key
Integer nonlinear key type.