Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/graphs/digraph.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/graphs/digraph.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1349, Wed Sep 3 22:22:18 2003 UTC revision 1350, Fri Sep 5 21:34:27 2003 UTC
# Line 42  Line 42 
42         fun garbage_collect () =         fun garbage_collect () =
43            (new_nodes := (!new_nodes) @ (!garbage_nodes); garbage_nodes := [])            (new_nodes := (!new_nodes) @ (!garbage_nodes); garbage_nodes := [])
44         fun get_nodes() =         fun get_nodes() =
45            A.foldri(fn(i,SOME n,l) =>(i,n)::l|(_,_,l) => l) [] (nodes,0,NONE)            A.foldri(fn(i,SOME n,l) =>(i,n)::l|(_,_,l) => l) [] nodes
46         fun get_edges() = List.concat(A.foldr op:: [] succ)         fun get_edges() = List.concat(A.foldr op:: [] succ)
47         fun order() = !node_count         fun order() = !node_count
48         fun size()  = !edge_count         fun size()  = !edge_count
# Line 113  Line 113 
113                              SOME x => x                              SOME x => x
114                            | NONE => raise G.NotFound                            | NONE => raise G.NotFound
115         fun forall_nodes f =         fun forall_nodes f =
116             A.appi (fn (i,SOME x) => f(i,x) | _ => ()) (nodes,0,NONE)             A.appi (fn (i,SOME x) => f(i,x) | _ => ()) nodes
117         fun forall_edges f = A.app (List.app f) succ         fun forall_edges f = A.app (List.app f) succ
118    
119     in  G.GRAPH {     in  G.GRAPH {

Legend:
Removed from v.1349  
changed lines
  Added in v.1350

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0