14
Apr 10Today
public Graph reverseGraph(){
Graph revGraph = new Graph();
for(Node node: nodes.values()){
revGraph.addNode(node);
}
for(Node node: nodes.values()){
if(getAdjList().get(node.getLabel()) != null){
for(int i=0; i < getAdjList().get(node.getLabel()).size(); i++){
revGraph.addEdge(getAdjList().get(node.getLabel()).get(i), node);
}
}
}
return revGraph;
}
Today is the day that I officially stopped liking programming. I’ve been working on this assignment for a week, and it is going to be late, because it is due in 3 minutes. That bit of code counts for 1/5 of the assignment. It took me forever.