From 6308773c0b6b745d49d20dc2afd6ab7ec63cb996 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 11 Oct 2022 14:25:11 +0200 Subject: Refactoring. --- excitation.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'excitation.cpp') diff --git a/excitation.cpp b/excitation.cpp index be1acc1..d09410b 100644 --- a/excitation.cpp +++ b/excitation.cpp @@ -1,10 +1,6 @@ #include -#include "rbmp.hpp" - -bool edgeMatched(PerfectMatching& pm, const AztecDiamond::Edge& e) { - return e.tail->index == pm.GetMatch(e.head->index); -} +#include "aztec.hpp" int main(int argc, char* argv[]) { unsigned n = 100; @@ -25,14 +21,7 @@ int main(int argc, char* argv[]) { AztecDiamond G(n); G.setWeights(r); - PerfectMatching pm(G.vertices.size(), G.edges.size()); - - for (const AztecDiamond::Edge& e : G.edges) { - pm.AddEdge(e.head->index, e.tail->index, e.weight); - } - - pm.options.verbose = false; - pm.Solve(); + PerfectMatching pm = findGroundState(G); std::cout << n << std::endl; -- cgit v1.2.3-70-g09d2