unblock is the UNBLOCK sub-procedure in the paper.
(u int)
| 105 | |
| 106 | // unblock is the UNBLOCK sub-procedure in the paper. |
| 107 | func (j *johnson) unblock(u int) { |
| 108 | j.blocked[u] = false |
| 109 | for w := range j.b[u] { |
| 110 | delete(j.b[u], w) |
| 111 | if j.blocked[w] { |
| 112 | j.unblock(w) |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // tarjan implements Tarjan's strongly connected component finding |
| 118 | // algorithm. The implementation is from the pseudocode at |