| 1 |
(* |
| 2 |
* This module computes strongly connected components (SCC) of |
| 3 |
* a graph. Each SCC is represented as a list of nodes. All nodes |
| 4 |
* are folded together with a user supplied function. |
| 5 |
* |
| 6 |
* -- Allen |
| 7 |
*) |
| 8 |
|
| 9 |
signature GRAPH_STRONGLY_CONNECTED_COMPONENTS = |
| 10 |
sig |
| 11 |
|
| 12 |
(* strongly connected components *) |
| 13 |
|
| 14 |
val scc : ('n,'e,'g) Graph.graph -> |
| 15 |
(Graph.node_id list * 'a -> 'a) -> 'a -> 'a |
| 16 |
|
| 17 |
val scc' : {N : int, |
| 18 |
nodes : Graph.node_id list, |
| 19 |
out_edges : Graph.node_id -> 'e Graph.edge list |
| 20 |
} -> (Graph.node_id list * 'a -> 'a) -> 'a -> 'a |
| 21 |
|
| 22 |
end |
| 23 |
|