#include "aztec.hpp" PerfectMatching findGroundState(const AztecDiamond& a) { PerfectMatching pm(a.vertices.size(), a.edges.size()); for (const AztecDiamond::Edge& e : a.edges) { pm.AddEdge(e.head->index, e.tail->index, e.weight); } pm.options.verbose = false; pm.Solve(); return pm; } bool edgeMatched(PerfectMatching& pm, const AztecDiamond::Edge& e) { return e.tail->index == pm.GetMatch(e.head->index); }