summaryrefslogtreecommitdiff
path: root/sched/graph.ml
diff options
context:
space:
mode:
Diffstat (limited to 'sched/graph.ml')
-rw-r--r--sched/graph.ml24
1 files changed, 0 insertions, 24 deletions
diff --git a/sched/graph.ml b/sched/graph.ml
index ad4fded..08762a1 100644
--- a/sched/graph.ml
+++ b/sched/graph.ml
@@ -58,27 +58,3 @@ let topological g =
in
let ret = List.fold_left (fun x n -> aux x n) [] g.g_nodes
in clear_marks g; List.rev ret
-
-let topological_from_roots g roots =
- clear_marks g;
- let rec aux acc n =
- if n.n_mark = Visited
- then acc
- else begin
- n.n_mark <- Visited;
- n.n_label :: (List.fold_left (fun x n -> aux x n) acc n.n_linked_by)
- end
- in
- let ret = List.fold_left
- (fun x n -> aux x (node_for_label g n)) [] roots
- in
- let used = List.fold_left
- (fun s n ->
- if n.n_mark = Visited then
- n.n_label::s
- else
- s)
- []
- g.g_nodes in
- clear_marks g;
- List.rev ret, used