Skip to content

Commit

Permalink
BlossomV: use as default maximum matching algo
Browse files Browse the repository at this point in the history
  • Loading branch information
barakugav committed Jul 18, 2023
1 parent cf6eaad commit 05128d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ public void MaximumMatchingWeightedGabow1990(Blackhole blackhole) {
benchMaximumMatchingWeighted(getAlgo("Gabow1990"), blackhole);
}

@Benchmark
public void MaximumMatchingWeightedBlossomV(Blackhole blackhole) {
benchMaximumMatchingWeighted(getAlgo("BlossomV"), blackhole);
}

@Benchmark
public void MaximumMatchingWeightedGabow1990SimplerPerfect(Blackhole blackhole) {
benchMaximumMatchingWeightedPerfect(getAlgo("Gabow1990Simpler"), blackhole);
Expand Down
4 changes: 3 additions & 1 deletion jgalgo-core/src/main/java/com/jgalgo/MaximumMatching.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ public MaximumMatching build() {
return new MaximumMatchingWeightedGabow1990();
if ("Gabow1990Simpler".equals(impl))
return new MaximumMatchingWeightedGabow1990Simpler();
if ("BlossomV".equals(impl))
return new MaximumMatchingWeightedBlossomV();
throw new IllegalArgumentException("unknown 'impl' value: " + impl);
}
if (cardinality) {
return isBipartite ? new MaximumMatchingCardinalityBipartiteHopcroftKarp()
: new MaximumMatchingCardinalityGabow1976();
} else {
return isBipartite ? new MaximumMatchingWeightedBipartiteHungarianMethod()
: new MaximumMatchingWeightedGabow1990Simpler();
: new MaximumMatchingWeightedBlossomV();
}
}

Expand Down

0 comments on commit 05128d4

Please sign in to comment.