27 using namespace gtsam;
65 typedef std::pair<size_t, size_t> Match;
66 const std::list<Match>
matches{{1, 2}, {2, 3}, {4, 5}, {4, 6}};
74 size_t rep1 = dsf.
find(1), rep2 = dsf.
find(4);
86 Measurement m11(1,1),m12(1,2),m14(1,4);
87 Measurement m22(2,2),m23(2,3),m25(2,5),m26(2,6);
90 const std::list<Measurement> measurements{m11, m12, m14, m22, m23, m25, m26};
93 typedef std::pair<Measurement, Measurement> Match;
95 {m11, m22}, {m12, m23}, {m14, m25}, {m14, m26}};
112 using Match = std::pair<size_t,size_t>;
113 const std::list<Match>
matches{{1, 2}, {2, 3}, {4, 5}, {4, 6}};
120 std::map<size_t, std::set<size_t> > sets = dsf.
sets();
121 const std::set<size_t> s1{1, 2, 3}, s2{4, 5, 6};
static int runAllTests(TestResult &result)
void merge(const KEY &x, const KEY &y)
Merge two sets.
GenericMeasurement< Point2, Point2 > Measurement
#define EXPECT(condition)
Small utility class for representing a wrappable pairs of ints.
std::pair< Index, Index > IndexPair
#define EXPECT_LONGS_EQUAL(expected, actual)
std::map< KEY, Set > sets() const
return all sets, i.e. a partition of all elements
Allow for arbitrary type in DSF.
TEST(SmartFactorBase, Pinhole)
KEY find(const KEY &key) const
Given key, find the representative key for the set in which it lives.