32 using namespace gtsam;
66 typedef pair<size_t,size_t> Match;
67 const vector<Match>
matches{Match(1, 2), Match(2, 3), Match(4, 5),
76 size_t rep1 = 1, rep2 = 4;
87 std::shared_ptr<DSFBase::V>
v = std::make_shared<DSFBase::V>(5);
88 const std::vector<size_t>
keys {1, 3};
98 map<size_t, std::set<size_t> > sets = dsf.
sets();
101 const std::set<size_t>
expected{0, 1};
109 map<size_t, vector<size_t> > arrays = dsf.
arrays();
112 const vector<size_t>
expected{0, 1};
121 map<size_t, std::set<size_t> > sets = dsf.
sets();
124 const std::set<size_t>
expected{0, 1, 2};
133 map<size_t, vector<size_t> > arrays = dsf.
arrays();
136 const vector<size_t>
expected{0, 1, 2};
144 map<size_t, std::set<size_t> > sets = dsf.
sets();
147 const std::set<size_t>
expected{0, 1};
155 map<size_t, vector<size_t> > arrays = dsf.
arrays();
158 const vector<size_t>
expected{0, 1};
166 std::set<size_t>
set = dsf.
set(0);
169 const std::set<size_t>
expected{0, 1};
178 std::set<size_t>
set = dsf.
set(0);
181 const std::set<size_t>
expected{0, 1, 2};
198 const vector<size_t>
keys{1, 2, 3, 4, 5, 6};
201 typedef pair<size_t,size_t> Match;
202 const vector<Match>
matches{Match(1, 2), Match(2, 3), Match(4, 5),
211 map<size_t, std::set<size_t> > sets = dsf.
sets();
213 const std::set<size_t> expected1{1, 2, 3};
214 std::set<size_t> actual1 = sets[dsf.
find(2)];
215 EXPECT(expected1 == actual1);
216 const std::set<size_t> expected2{4, 5, 6};
217 std::set<size_t> actual2 = sets[dsf.
find(5)];
218 EXPECT(expected2 == actual2);