diff --git a/src/main/java/MaximumWeightBipartiteAuctionMatching.java b/src/main/java/MaximumWeightBipartiteAuctionMatching.java index b517ee3..0bad61a 100644 --- a/src/main/java/MaximumWeightBipartiteAuctionMatching.java +++ b/src/main/java/MaximumWeightBipartiteAuctionMatching.java @@ -108,7 +108,6 @@ public class MaximumWeightBipartiteAuctionMatching implements MatchingAlgo } for (V item: owners.keySet()) { if (owners.get(item) != null) { - //hopefully which vertex is "source" and which is "target" will be irrelevant here matching.add(graph.getEdge(item, owners.get(item))); } } @@ -121,10 +120,6 @@ public class MaximumWeightBipartiteAuctionMatching implements MatchingAlgo return new MatchingImpl<>(graph, matching, matchingWeight.doubleValue()); } - /* - There may be a better way to do this, I just don't know which vertex will be the "source" and - which will be the "target", so I'm using this function to make sure I get the right one. - */ private V getItem(V bidder, E edge) { if (swappedPartitions) { return graph.getEdgeSource(edge); @@ -132,12 +127,6 @@ public class MaximumWeightBipartiteAuctionMatching implements MatchingAlgo else { return graph.getEdgeTarget(edge); } -// if (graph.getEdgeSource(edge).equals(bidder)) { -// return graph.getEdgeTarget(edge); -// } -// else { -// return graph.getEdgeSource(edge); -// } } public BigDecimal getMatchingWeight() {