22TEST(MatchingTest, PerfectMatchingIsFoundIfOneExists) {
24 std::vector<std::vector<uint64_t>>
const adjacency{{0, 1}, {1, 2}, {2, 0}};
26 ASSERT_TRUE(matching.has_value());
27 ASSERT_EQ(3ull, matching->size());
28 EXPECT_EQ(std::set<uint64_t>({0, 1, 2}), std::set<uint64_t>(matching->begin(), matching->end())) <<
"not a bijection";
29 for (uint64_t v = 0; v < 3; ++v) {
30 EXPECT_TRUE(edges(adjacency)(v, (*matching)[v])) <<
"domain vertex " << v <<
" is not adjacent to the image vertex " << (*matching)[v];
34TEST(MatchingTest, NoPerfectMatchingIfTwoVerticesShareTheirOnlyOption) {
36 std::vector<std::vector<uint64_t>>
const adjacency{{0}, {0}, {1, 2}};