diff options
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/endomorph/DependencyGraph.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/endomorph/DependencyGraph.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/endomorph/DependencyGraph.java b/src/uk/ac/ox/cs/pagoda/endomorph/DependencyGraph.java index e7f1c96..8514808 100644 --- a/src/uk/ac/ox/cs/pagoda/endomorph/DependencyGraph.java +++ b/src/uk/ac/ox/cs/pagoda/endomorph/DependencyGraph.java | |||
| @@ -114,23 +114,23 @@ public class DependencyGraph { | |||
| 114 | 114 | ||
| 115 | // print(); | 115 | // print(); |
| 116 | 116 | ||
| 117 | topolocialOrder = null; | 117 | topologicalOrder = null; |
| 118 | Utility.logDebug("link: " + link); | 118 | Utility.logDebug("link: " + link); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | LinkedList<Clique> topolocialOrder = null; | 121 | LinkedList<Clique> topologicalOrder = null; |
| 122 | 122 | ||
| 123 | public LinkedList<Clique> getTopologicalOrder() { | 123 | public LinkedList<Clique> getTopologicalOrder() { |
| 124 | if (topolocialOrder != null) return topolocialOrder; | 124 | if (topologicalOrder != null) return topologicalOrder; |
| 125 | 125 | ||
| 126 | topolocialOrder = new LinkedList<Clique>(); | 126 | topologicalOrder = new LinkedList<Clique>(); |
| 127 | Queue<Clique> toVisit = new LinkedList<Clique>(entrances); | 127 | Queue<Clique> toVisit = new LinkedList<Clique>(entrances); |
| 128 | Map<Clique, Integer> toVisitedInComingDegree = new HashMap<Clique, Integer>(); | 128 | Map<Clique, Integer> toVisitedInComingDegree = new HashMap<Clique, Integer>(); |
| 129 | 129 | ||
| 130 | int count; | 130 | int count; |
| 131 | while (!toVisit.isEmpty()) { | 131 | while (!toVisit.isEmpty()) { |
| 132 | Clique cu = toVisit.remove(); | 132 | Clique cu = toVisit.remove(); |
| 133 | topolocialOrder.add(cu); | 133 | topologicalOrder.add(cu); |
| 134 | if (outGoingEdges.containsKey(cu)) | 134 | if (outGoingEdges.containsKey(cu)) |
| 135 | for (Clique cv: outGoingEdges.get(cu)) { | 135 | for (Clique cv: outGoingEdges.get(cu)) { |
| 136 | if (toVisitedInComingDegree.containsKey(cv)) { | 136 | if (toVisitedInComingDegree.containsKey(cv)) { |
| @@ -144,7 +144,7 @@ public class DependencyGraph { | |||
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | return topolocialOrder; | 147 | return topologicalOrder; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | private void addNodeTuple(NodeTuple u) { | 150 | private void addNodeTuple(NodeTuple u) { |
