Conditions | 5 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | from abc import ABCMeta, abstractmethod |
||
95 | def visit(self, G, v): |
||
96 | self.marked[v] = True |
||
97 | for e in G.adj(v): |
||
98 | w = e.other(v) |
||
99 | if not self.marked[w]: |
||
100 | if self.pq.contains_index(w): |
||
101 | old_e = self.pq.get(w) |
||
102 | if less(e, old_e): |
||
103 | self.pq.decrease_key(w, e) |
||
104 | else: |
||
105 | self.pq.insert(w, e) |
||
106 | |||
109 |