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 /sml/trunk/src/MLRISC/visualization/graphLayout.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/visualization/graphLayout.sml

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

revision 411, Fri Sep 3 00:25:03 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 7  Line 7 
7  structure GraphLayout =  structure GraphLayout =
8  struct  struct
9    
10     exception LABEL of string     datatype format =
11     exception COLOR of string       LABEL of string
12     exception NODE_COLOR of string     | COLOR of string
13     exception EDGE_COLOR of string     | NODE_COLOR of string
14     exception TEXT_COLOR of string     | EDGE_COLOR of string
15     exception ARROW_COLOR of string     | TEXT_COLOR of string
16     exception BACKARROW_COLOR of string     | ARROW_COLOR of string
17     exception BORDER_COLOR of string     | BACKARROW_COLOR of string
18     exception BORDERLESS     | BORDER_COLOR of string
19     exception SHAPE of string     | BORDERLESS
20     exception ALGORITHM of string     | SHAPE of string
21     exception EDGEPATTERN of string     | ALGORITHM of string
22       | EDGEPATTERN of string
23       | DIR (* for internal use only! *)
24    
25     type annotations = Annotations.annotations     val STYLE = Annotations.new(SOME(fn _ => "STYLE")) :
26             format list Annotations.property
27    
28     type ('n,'e,'g) style =     type ('n,'e,'g) style =
29        { edge  : 'e Graph.edge -> annotations,        { edge  : 'e Graph.edge -> format list,
30          node  : 'n Graph.node -> annotations,          node  : 'n Graph.node -> format list,
31          graph : 'g -> annotations          graph : 'g -> format list
32        }        }
33    
34     type layout = (annotations, annotations, annotations) Graph.graph     type layout = (format list, format list, format list) Graph.graph
35    
36     fun makeLayout {node,edge,graph} G =     fun makeLayout {node,edge,graph} G =
37         IsomorphicGraphView.map node edge graph G         IsomorphicGraphView.map node edge graph G
38    
39       fun makeLayout' G =
40       let val edgeColor = [COLOR "red"]
41       in  makeLayout {node=fn (i,_) => [LABEL(Int.toString i)],
42                       edge=fn _ => edgeColor,
43                       graph=fn _ => []} G
44       end
45    
46  end  end
47    

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

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