Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

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

Diff of /MLRISC/trunk/graphs/dijkstra.sml

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

sml/branches/SMLNJ/src/MLRISC/graphs/dijkstra.sml revision 411, Fri Sep 3 00:25:03 1999 UTC sml/trunk/src/MLRISC/graphs/dijkstra.sml revision 1599, Mon Aug 9 16:22:40 2004 UTC
# Line 5  Line 5 
5   * -- Allen   * -- Allen
6   *)   *)
7    
8  functor DijkstraFn(Num : ABELIAN_GROUP_WITH_INF)  functor Dijkstra(Num : ABELIAN_GROUP_WITH_INF)
9       : SINGLE_SOURCE_SHORTEST_PATHS =       : SINGLE_SOURCE_SHORTEST_PATHS =
10  struct  struct
11    
12     structure Num = Num     structure Num = Num
13     structure Q   = NodePriorityQueueFn(Array)     structure Q   = NodePriorityQueue(Array)
14     structure G   = Graph     structure G   = Graph
15     structure A   = Array     structure A   = Array
16    
# Line 27  Line 27 
27             else ()             else ()
28         end         end
29     in  A.update(dist,s,Num.zero);     in  A.update(dist,s,Num.zero);
30           Q.decreaseWeight(Q,s);
31         (while true do         (while true do
32            app relax (#out_edges G (Q.deleteMin Q))            app relax (#out_edges G (Q.deleteMin Q))
33         ) handle Q.EmptyPriorityQueue => ();         ) handle Q.EmptyPriorityQueue => ();

Legend:
Removed from v.411  
changed lines
  Added in v.1599

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