Fix typos

This commit is contained in:
eugenefischer
2022-10-21 13:46:10 -05:00
parent ef349ea5f6
commit 910de0ce9d

View File

@@ -7,7 +7,7 @@ import java.util.*;
/* /*
Maximum weight matching in bipartite graphs with strictly integer edge weights, found using the Maximum weight matching in bipartite graphs with strictly integer edge weights, found using the
unscaled forward auction algorithm
*/ */
public class MaximumWeightBipartiteAuctionMatching<V, E> implements MatchingAlgorithm<V, E> { public class MaximumWeightBipartiteAuctionMatching<V, E> implements MatchingAlgorithm<V, E> {
@@ -49,7 +49,7 @@ public class MaximumWeightBipartiteAuctionMatching<V, E> 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<V> items; Set<V> items;
Set<V> bidders; Set<V> bidders;
@@ -130,6 +130,15 @@ public class MaximumWeightBipartiteAuctionMatching<V, E> implements MatchingAlgo
} }
} }
private V getBidder(V item, E edge) {
if (swappedPartitions) {
return graph.getEdgeTarget(edge);
}
else {
return graph.getEdgeSource(edge);
}
}
public BigDecimal getMatchingWeight() { public BigDecimal getMatchingWeight() {
return matchingWeight; return matchingWeight;
} }