diff --git a/src/main/java/MaximumWeightBipartiteAuctionMatching.java b/src/main/java/MaximumWeightBipartiteAuctionMatching.java index 9f21515..b9ba8aa 100644 --- a/src/main/java/MaximumWeightBipartiteAuctionMatching.java +++ b/src/main/java/MaximumWeightBipartiteAuctionMatching.java @@ -7,7 +7,7 @@ import java.util.*; /* Maximum weight matching in bipartite graphs with strictly integer edge weights, found using the - +unscaled forward auction algorithm */ public class MaximumWeightBipartiteAuctionMatching implements MatchingAlgorithm { @@ -49,7 +49,7 @@ public class MaximumWeightBipartiteAuctionMatching implements MatchingAlgo } /* - If the two partitions are different sizes, the bidders mus be the smaller of the two paritions. + If the two partitions are different sizes, the bidders must be the smaller of the two partitions. */ Set items; Set bidders; @@ -130,6 +130,15 @@ public class MaximumWeightBipartiteAuctionMatching implements MatchingAlgo } } + private V getBidder(V item, E edge) { + if (swappedPartitions) { + return graph.getEdgeTarget(edge); + } + else { + return graph.getEdgeSource(edge); + } + } + public BigDecimal getMatchingWeight() { return matchingWeight; }