Clean up comments
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user