bugfixes
This commit is contained in:
@@ -4,6 +4,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class GraphModificationFunctions {
|
||||
|
||||
@@ -18,9 +19,11 @@ public abstract class GraphModificationFunctions {
|
||||
Integer weight = (int) graph.getEdgeWeight(e);
|
||||
Integer[] edge = {source, target, weight};
|
||||
removedEdges.add(edge);
|
||||
graph.removeEdge(e);
|
||||
}
|
||||
}
|
||||
for (Integer[] edge : removedEdges) {
|
||||
graph.removeEdge(edge[0], edge[1]);
|
||||
}
|
||||
return removedEdges;
|
||||
}
|
||||
|
||||
@@ -41,9 +44,11 @@ public abstract class GraphModificationFunctions {
|
||||
Integer weight = (int) graph.getEdgeWeight(e);
|
||||
Integer[] edge = {source, target, weight};
|
||||
removedEdges.add(edge);
|
||||
graph.removeEdge(e);
|
||||
}
|
||||
}
|
||||
for (Integer[] edge : removedEdges) {
|
||||
graph.removeEdge(edge[0], edge[1]);
|
||||
}
|
||||
return removedEdges;
|
||||
}
|
||||
|
||||
@@ -66,9 +71,11 @@ public abstract class GraphModificationFunctions {
|
||||
Integer intWeight = (int) graph.getEdgeWeight(e);
|
||||
Integer[] edge = {source, target, intWeight};
|
||||
removedEdges.add(edge);
|
||||
graph.removeEdge(e);
|
||||
}
|
||||
}
|
||||
for (Integer[] edge : removedEdges) {
|
||||
graph.removeEdge(edge[0], edge[1]);
|
||||
}
|
||||
return removedEdges;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user