28 using namespace gtsam;
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);
72 et.
roots_.assign(roots.begin(), roots.end());
81 node->factors.assign(factors.
begin(), factors.
end());
87 const ChildNodes::Result& children) {
89 node->children.assign(children.begin(), children.end());
138 binary(
X(1),
X(2)))))))))(
145 X(4),
X(5)))(binary(
L(2),
X(5))),
FastVector< sharedNode > roots_
const gtsam::Symbol key('X', 0)
SymbolicEliminationTree::sharedNode sharedNode
Provides additional testing facilities for common data structures.
static SymbolicEliminationTree MakeTree(const ChildNodes::Result &roots)
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
static int runAllTests(TestResult &result)
ChainedVector< sharedNode > ChildNodes
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
const GaussianFactorGraph factors
static SymbolicEliminationTree buildHardcodedTree(const SymbolicFactorGraph &fg)
NonlinearFactorGraph graph
const_iterator begin() const
#define EXPECT(condition)
static sharedNode Node(Key key, const SymbolicFactorGraph &factors, const ChildNodes::Result &children)
static sharedNode Leaf(Key key, const SymbolicFactorGraph &factors)
const_iterator end() const
TEST(SmartFactorBase, Pinhole)
std::shared_ptr< Node > sharedNode
Shared pointer to Node.
std::uint64_t Key
Integer nonlinear key type.