26 using namespace gtsam;
46 Ordering actual = Ordering::Colamd(symbolicGraph);
53 Ordering actual = Ordering::ColamdConstrainedLast(symbolicGraph, {2, 4});
60 Ordering actual = Ordering::ColamdConstrainedFirst(symbolicGraph, {2, 4});
67 Ordering actual = Ordering::ColamdConstrainedLast(symbolicGraph, {});
72 Ordering actual = Ordering::ColamdConstrainedFirst(symbolicGraph, {});
81 Ordering actual = Ordering::ColamdConstrainedLast(emptyGraph, {2, 4});
85 Ordering actual = Ordering::ColamdConstrainedFirst(emptyGraph, {2, 4});
104 Ordering actual = Ordering::ColamdConstrained(symbolicGraph, constraints);
139 const vector<int> xadjExpected{0, 2, 5, 8, 11, 13, 16, 20,
140 24, 28, 31, 33, 36, 39, 42, 44},
141 adjExpected{1, 5, 0, 2, 6, 1, 3, 7, 2, 4, 8, 3, 9, 0, 6,
142 10, 1, 5, 7, 11, 2, 6, 8, 12, 3, 7, 9, 13, 4, 8,
143 14, 5, 11, 6, 10, 12, 7, 11, 13, 8, 12, 14, 9, 13};
146 EXPECT(adjExpected.size() == mi.
adj().size());
163 const std::vector<int> xadjExpected{0, 1, 4, 6, 8, 10},
164 adjExpected{1, 0, 2, 4, 1, 3, 2, 4, 1, 3};
167 EXPECT(adjExpected.size() == mi.
adj().size());
184 const std::vector<int> xadjExpected{0, 1, 4, 6, 8, 10},
185 adjExpected{1, 0, 2, 4, 1, 3, 2, 4, 1, 3};
188 vector<int> adjAcutal = mi.
adj();
195 EXPECT(adjExpected.size() == mi.
adj().size());
196 EXPECT(adjExpected == adjAcutal);
208 actual +=
X(1),
X(2),
X(3);
239 #ifdef GTSAM_SUPPORT_NESTED_DISSECTION
252 const vector<int> xadjExpected{0, 1, 3, 5, 7, 9, 10},
253 adjExpected{1, 0, 2, 1, 3, 2, 4, 3, 5, 4};
255 vector<int> adjAcutal = mi.adj();
256 vector<int> xadjActual = mi.xadj();
258 EXPECT(xadjExpected == mi.xadj());
259 EXPECT(adjExpected.size() == mi.adj().size());
260 EXPECT(adjExpected == adjAcutal);
262 Ordering metOrder = Ordering::Metis(symbolicGraph);
271 Ordering metOrder2 = Ordering::Metis(symbolicGraph);
275 #ifdef GTSAM_SUPPORT_NESTED_DISSECTION
286 const vector<int> xadjExpected{0, 1, 3, 4}, adjExpected{1, 0, 2, 1};
288 EXPECT(xadjExpected == mi.xadj());
289 EXPECT(adjExpected.size() == mi.adj().size());
290 EXPECT(adjExpected == mi.adj());
292 Ordering metis = Ordering::Metis(symbolicGraph);
296 #ifdef GTSAM_SUPPORT_NESTED_DISSECTION
306 #if defined(__APPLE__)
308 Ordering actual = Ordering::Create(Ordering::METIS, symbolicGraph);
316 #elif defined(_WIN32)
318 Ordering actual = Ordering::Create(Ordering::METIS, symbolicGraph);
328 Ordering actual = Ordering::Create(Ordering::METIS, symbolicGraph);
340 #ifdef GTSAM_SUPPORT_NESTED_DISSECTION
344 Ordering actual = Ordering::Create(Ordering::METIS, symbolicGraph);
350 #ifdef GTSAM_SUPPORT_NESTED_DISSECTION
356 Ordering actual = Ordering::Create(Ordering::METIS, symbolicGraph);
374 Ordering actual = Ordering::Create(Ordering::COLAMD, symbolicGraph);
379 #ifdef GTSAM_SUPPORT_NESTED_DISSECTION
382 Ordering actual = Ordering::Create(Ordering::METIS, symbolicGraph);
392 CHECK_EXCEPTION(Ordering::Create(Ordering::CUSTOM, symbolicGraph), runtime_error);