Skip to content

Commit

Permalink
Matching: support min/max regular/perfect matching in all impls
Browse files Browse the repository at this point in the history
  • Loading branch information
barakugav committed Jul 18, 2023
1 parent 05128d4 commit 1342cb4
Show file tree
Hide file tree
Showing 37 changed files with 1,340 additions and 1,156 deletions.
1 change: 1 addition & 0 deletions algorithm-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
| Maximum matching bipartite weighted using SSSP | $O(m n + n^2 \log n)$ | |
| Maximum matching bipartite weighted Hungarian method with heaps | $O(m n + n^2 \log n)$ | |
| Maximum matching general weighted Gabow1990 implementation with dynamic LCA | $O(m n + n^2 \log n)$ | |
| Minimum perfect matching general weighted Blossom V | $O(m n^3)$ | best in practice |
| Traveling Salesman Problem (TSP) $2$-appx using MST | $O(n^2)$ | |
| Traveling Salesman Problem (TSP) $3/2$-appx using maximum matching | $O(n^3)$ | |
| Vertex Coloring Greedy (random vertices order) | $O(n + m)$ | assuming the number of colors is constant |
Expand Down
5 changes: 5 additions & 0 deletions jgalgo-bench/src/main/java/com/jgalgo/GraphsTestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,9 @@ static Graph randGraph(int n, int m, long seed) {
.connected(false).build();
}

static Graph randGraphBipartite(int sn, int tn, int m, long seed) {
return new RandomGraphBuilder(seed).sn(sn).tn(tn).m(m).directed(false).bipartite(true).parallelEdges(false)
.selfEdges(false).cycles(true).connected(false).build();
}

}
Loading

0 comments on commit 1342cb4

Please sign in to comment.