diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2022-10-11 14:25:11 +0200 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2022-10-11 14:25:11 +0200 |
commit | 6308773c0b6b745d49d20dc2afd6ab7ec63cb996 (patch) | |
tree | a60fc6397eed84b5286bd22952d7331489e70b15 /excitation.cpp | |
parent | 2083cff9581c3953ebdfa9a9ff951016c0ffc8b5 (diff) | |
download | code-6308773c0b6b745d49d20dc2afd6ab7ec63cb996.tar.gz code-6308773c0b6b745d49d20dc2afd6ab7ec63cb996.tar.bz2 code-6308773c0b6b745d49d20dc2afd6ab7ec63cb996.zip |
Refactoring.
Diffstat (limited to 'excitation.cpp')
-rw-r--r-- | excitation.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/excitation.cpp b/excitation.cpp index be1acc1..d09410b 100644 --- a/excitation.cpp +++ b/excitation.cpp @@ -1,10 +1,6 @@ #include <iostream> -#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; |