Clean up comments

This commit is contained in:
eugenefischer
2022-10-14 18:31:32 -05:00
parent b3273855a6
commit 174db66c46

View File

@@ -108,7 +108,6 @@ public class MaximumWeightBipartiteAuctionMatching<V, E> implements MatchingAlgo
} }
for (V item: owners.keySet()) { for (V item: owners.keySet()) {
if (owners.get(item) != null) { 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))); matching.add(graph.getEdge(item, owners.get(item)));
} }
} }
@@ -121,10 +120,6 @@ public class MaximumWeightBipartiteAuctionMatching<V, E> implements MatchingAlgo
return new MatchingImpl<>(graph, matching, matchingWeight.doubleValue()); 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) { private V getItem(V bidder, E edge) {
if (swappedPartitions) { if (swappedPartitions) {
return graph.getEdgeSource(edge); return graph.getEdgeSource(edge);
@@ -132,12 +127,6 @@ public class MaximumWeightBipartiteAuctionMatching<V, E> implements MatchingAlgo
else { else {
return graph.getEdgeTarget(edge); return graph.getEdgeTarget(edge);
} }
// if (graph.getEdgeSource(edge).equals(bidder)) {
// return graph.getEdgeTarget(edge);
// }
// else {
// return graph.getEdgeSource(edge);
// }
} }
public BigDecimal getMatchingWeight() { public BigDecimal getMatchingWeight() {