17 using namespace gtsam;
42 std::vector<size_t>
keys{1, 2, 3, 4, 5, 6, 7, 8, 9};
47 vector<size_t> island1{1, 2, 3, 7, 8};
48 vector<size_t> island2{4, 5, 6, 9};
49 CHECK(island1 == islands.front());
50 CHECK(island2 == islands.back());
59 TEST( GenerciGraph, findIslands2 )
75 std::vector<size_t>
keys{1, 2, 3, 4, 5, 6, 7, 8};
80 vector<size_t> island1{1, 2, 3, 4, 5, 6, 7, 8};
81 CHECK(island1 == islands.front());
89 TEST ( GenerciGraph, findIslands3 )
97 std::vector<size_t>
keys{1, 2, 3, 4, 5, 6};
102 vector<size_t> island1{1, 5};
103 vector<size_t> island2{2, 3, 4, 6};
104 CHECK(island1 == islands.front());
105 CHECK(island2 == islands.back());
112 TEST ( GenerciGraph, findIslands4 )
117 std::vector<size_t>
keys{3, 4, 7};
122 vector<size_t> island1{3, 4};
123 vector<size_t> island2{7};
124 CHECK(island1 == islands.front());
125 CHECK(island2 == islands.back());
134 TEST ( GenerciGraph, findIslands5 )
145 std::vector<size_t>
keys{1, 2, 3, 4, 5};
150 vector<size_t> island1{1, 3, 5};
151 vector<size_t> island2{2, 4};
152 CHECK(island1 == islands.front());
153 CHECK(island2 == islands.back());
171 std::vector<size_t> cameraKeys, landmarkKeys;
172 cameraKeys.push_back(1);
173 cameraKeys.push_back(2);
174 landmarkKeys.push_back(3);
175 landmarkKeys.push_back(4);
176 landmarkKeys.push_back(5);
177 landmarkKeys.push_back(6);
179 std::vector<int> dictionary;
180 dictionary.resize(7, -1);
185 std::map<size_t, vector<size_t> > cameraToLandmarks;
197 TEST ( GenericGraph, reduceGenericGraph2 )
207 std::vector<size_t> cameraKeys, landmarkKeys;
208 cameraKeys.push_back(1);
209 cameraKeys.push_back(2);
210 cameraKeys.push_back(7);
211 landmarkKeys.push_back(3);
212 landmarkKeys.push_back(4);
213 landmarkKeys.push_back(5);
214 landmarkKeys.push_back(6);
216 std::vector<int> dictionary;
217 dictionary.resize(8, -1);
223 std::map<size_t, vector<size_t> > cameraToLandmarks;
233 std::set<size_t> cameras1{1, 2, 3, 4, 5};
234 std::set<size_t> cameras2{8, 7, 6, 5};
240 TEST ( GenerciGraph, hasCommonCamera2 )
242 std::set<size_t> cameras1{1, 3, 5, 7};
243 std::set<size_t> cameras2{2, 4, 6, 8, 10};