diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2025-06-07 19:42:50 +0200 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2025-06-07 19:42:50 +0200 |
| commit | f8f53c2f9e63f0ac89b67dc4d413ec9a76415a73 (patch) | |
| tree | 7210642adde99db427b3da70c0f3f41355eb71f4 /test/graph/blossom.cpp | |
| parent | e65975ec92509abbf0078673b7a8495bfc47a245 (diff) | |
adapt Tutte matching to new Gauss, and remove some global variables
Diffstat (limited to 'test/graph/blossom.cpp')
| -rw-r--r-- | test/graph/blossom.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/graph/blossom.cpp b/test/graph/blossom.cpp index 714b029..0add7e1 100644 --- a/test/graph/blossom.cpp +++ b/test/graph/blossom.cpp @@ -1,6 +1,6 @@ #include "../util.h" namespace tutte { -void gauss(int n, ll mod); +vector<int> gauss(vector<vector<ll>> &mat); #include <graph/matching.cpp> #include <math/shortModInv.cpp> #include <math/lgsFp.cpp> @@ -15,20 +15,20 @@ void stress_test() { GM blossom(n); srand(Random::rng()); - tutte::adj.assign(n, {}); + vector<vector<int>> adj(n); Graph<NoData> g(n); g.erdosRenyi(m); g.forEdges([&](int a, int b){ - tutte::adj[a].push_back(b); - tutte::adj[b].push_back(a); + adj[a].push_back(b); + adj[b].push_back(a); blossom.adj[a].push_back(b); blossom.adj[b].push_back(a); }); ll got = blossom.match(); - ll expected = tutte::max_matching(); + ll expected = tutte::max_matching(adj); vector<bool> seen(n); ll got2 = 0; |
