1gv(3sharp)                                                          gv(3sharp)
2
3
4

NAME

6       gv_sharp - graph manipulation in sharp
7
8

SYNOPSIS

USAGE

INTRODUCTION

12       gv_sharp  is  a  dynamically  loaded  extension for sharp that provides
13       access to the graph facilities of graphviz.
14
15

COMMANDS

17       New graphs
18
19       New empty graph
20              SWIGTYPE_p_Agraph_t gv.graph (string name);
21              SWIGTYPE_p_Agraph_t gv.digraph (string name);
22              SWIGTYPE_p_Agraph_t gv.strictgraph (string name);
23              SWIGTYPE_p_Agraph_t gv.strictdigraph (string name);
24
25       New graph from a dot-syntax string or file
26              SWIGTYPE_p_Agraph_t gv.readstring (string string);
27              SWIGTYPE_p_Agraph_t gv.read (string filename);
28              SWIGTYPE_p_Agraph_t gv.read (SWIGTYPE_p_FILE f);
29
30       Add new subgraph to existing graph
31              SWIGTYPE_p_Agraph_t  gv.graph  (SWIGTYPE_p_Agraph_t  g,   string
32              name);
33
34       New nodes
35
36       Add new node to existing graph
37              SWIGTYPE_p_Agnode_t   gv.node   (SWIGTYPE_p_Agraph_t  g,  string
38              name);
39
40       New edges
41
42       Add new edge between existing nodes
43              SWIGTYPE_p_Agedge_t  gv.edge   (SWIGTYPE_p_Agnode_t   t,   SWIG‐
44              TYPE_p_Agnode_t h);
45
46       Add  a  new  edge  between an existing tail node, and a named head node
47       which will be induced in the graph if it doesn't already exist
48              SWIGTYPE_p_Agedge_t  gv.edge  (SWIGTYPE_p_Agnode_t   t,   string
49              hname);
50
51       Add  a  new  edge  between an existing head node, and a named tail node
52       which will be induced in the graph if it doesn't already exist
53              SWIGTYPE_p_Agedge_t gv.edge (string  tname,  SWIGTYPE_p_Agnode_t
54              h);
55
56       Add a new edge between named tail  and head nodes which will be induced
57       in the graph if they don't already exist
58              SWIGTYPE_p_Agedge_t  gv.edge  (SWIGTYPE_p_Agraph_t   g,   string
59              tname, string hname);
60
61       Setting attribute values
62
63       Set value of named attribute of graph/node/edge - creating attribute if
64       necessary
65              string gv.setv (SWIGTYPE_p_Agraph_t g, string attr, string val);
66              string gv.setv (SWIGTYPE_p_Agnode_t n, string attr, string val);
67              string gv.setv (SWIGTYPE_p_Agedge_t e, string attr, string val);
68
69       Set value of existing attribute  of  graph/node/edge  (using  attribute
70       handle)
71              string  gv.setv  (SWIGTYPE_p_Agraph_t  g,  SWIGTYPE_p_Agsym_t a,
72              string val);
73              string gv.setv  (SWIGTYPE_p_Agnode_t  n,  SWIGTYPE_p_Agsym_t  a,
74              string val);
75              string  gv.setv  (SWIGTYPE_p_Agedge_t  e,  SWIGTYPE_p_Agsym_t a,
76              string val);
77
78       Getting attribute values
79
80       Get value of named attribute of graph/node/edge
81              string gv.getv (SWIGTYPE_p_Agraph_t g, string attr);
82              string gv.getv (SWIGTYPE_p_Agnode_t n, string attr);
83              string gv.getv (SWIGTYPE_p_Agedge_t e, string attr);
84
85       Get value of attribute of graph/node/edge (using attribute handle)
86              string gv.getv (SWIGTYPE_p_Agraph_t g, SWIGTYPE_p_Agsym_t a);
87              string gv.getv (SWIGTYPE_p_Agnode_t n, SWIGTYPE_p_Agsym_t a);
88              string gv.getv (SWIGTYPE_p_Agedge_t e, SWIGTYPE_p_Agsym_t a);
89
90       Obtain names from handles
91              string gv.nameof (SWIGTYPE_p_Agraph_t g);
92              string gv.nameof (SWIGTYPE_p_Agnode_t n);
93              string gv.nameof (SWIGTYPE_p_Agsym_t a);
94
95       Find handles from names
96              SWIGTYPE_p_Agraph_t gv.findsubg (SWIGTYPE_p_Agraph_t  g,  string
97              name);
98              SWIGTYPE_p_Agnode_t  gv.findnode  (SWIGTYPE_p_Agraph_t g, string
99              name);
100              SWIGTYPE_p_Agedge_t gv.findedge  (SWIGTYPE_p_Agnode_t  t,  SWIG‐
101              TYPE_p_Agnode_t h);
102              SWIGTYPE_p_Agsym_t  gv.findattr  (SWIGTYPE_p_Agraph_t  g, string
103              name);
104              SWIGTYPE_p_Agsym_t gv.findattr  (SWIGTYPE_p_Agnode_t  n,  string
105              name);
106              SWIGTYPE_p_Agsym_t  gv.findattr  (SWIGTYPE_p_Agedge_t  e, string
107              name);
108
109       Misc graph navigators returning handles
110              SWIGTYPE_p_Agnode_t gv.headof (SWIGTYPE_p_Agedge_t e);
111              SWIGTYPE_p_Agnode_t gv.tailof (SWIGTYPE_p_Agedge_t e);
112              SWIGTYPE_p_Agraph_t gv.graphof (SWIGTYPE_p_Agraph_t g);
113              SWIGTYPE_p_Agraph_t gv.graphof (SWIGTYPE_p_Agedge_t e);
114              SWIGTYPE_p_Agraph_t gv.graphof (SWIGTYPE_p_Agnode_t n);
115              SWIGTYPE_p_Agraph_t gv.rootof (SWIGTYPE_p_Agraph_t g);
116
117       Obtain handles of proto node/edge for setting default attribute values
118              SWIGTYPE_p_Agnode_t gv.protonode (SWIGTYPE_p_Agraph_t g);
119              SWIGTYPE_p_Agedge_t gv.protoedge (SWIGTYPE_p_Agraph_t g);
120
121       Iterators
122
123       Iteration termination tests
124              bool gv.ok (SWIGTYPE_p_Agraph_t g);
125              bool gv.ok (SWIGTYPE_p_Agnode_t n);
126              bool gv.ok (SWIGTYPE_p_Agedge_t e);
127              bool gv.ok (SWIGTYPE_p_Agsym_t a);
128
129       Iterate over subgraphs of a graph
130              SWIGTYPE_p_Agraph_t gv.firstsubg (SWIGTYPE_p_Agraph_t g);
131              SWIGTYPE_p_Agraph_t gv.nextsubg  (SWIGTYPE_p_Agraph_t  g,  SWIG‐
132              TYPE_p_Agraph_t sg);
133
134       Iterate over supergraphs of a graph (obscure and rarely useful)
135              SWIGTYPE_p_Agraph_t gv.firstsupg (SWIGTYPE_p_Agraph_t g);
136              SWIGTYPE_p_Agraph_t  gv.nextsupg  (SWIGTYPE_p_Agraph_t  g, SWIG‐
137              TYPE_p_Agraph_t sg);
138
139       Iterate over edges of a graph
140              SWIGTYPE_p_Agedge_t gv.firstedge (SWIGTYPE_p_Agraph_t g);
141              SWIGTYPE_p_Agedge_t gv.nextedge  (SWIGTYPE_p_Agraph_t  g,  SWIG‐
142              TYPE_p_Agedge_t e);
143
144       Iterate over outedges of a graph
145              SWIGTYPE_p_Agedge_t gv.firstout (SWIGTYPE_p_Agraph_t g);
146              SWIGTYPE_p_Agedge_t  gv.nextout  (SWIGTYPE_p_Agraph_t  g,  SWIG‐
147              TYPE_p_Agedge_t e);
148
149       Iterate over edges of a node
150              SWIGTYPE_p_Agedge_t gv.firstedge (SWIGTYPE_p_Agnode_t n);
151              SWIGTYPE_p_Agedge_t gv.nextedge  (SWIGTYPE_p_Agnode_t  n,  SWIG‐
152              TYPE_p_Agedge_t e);
153
154       Iterate over out-edges of a node
155              SWIGTYPE_p_Agedge_t gv.firstout (SWIGTYPE_p_Agnode_t n);
156              SWIGTYPE_p_Agedge_t  gv.nextout  (SWIGTYPE_p_Agnode_t  n,  SWIG‐
157              TYPE_p_Agedge_t e);
158
159       Iterate over head nodes reachable from out-edges of a node
160              SWIGTYPE_p_Agnode_t gv.firsthead (SWIGTYPE_p_Agnode_t n);
161              SWIGTYPE_p_Agnode_t gv.nexthead  (SWIGTYPE_p_Agnode_t  n,  SWIG‐
162              TYPE_p_Agnode_t h);
163
164       Iterate over in-edges of a graph
165              SWIGTYPE_p_Agedge_t gv.firstin (SWIGTYPE_p_Agraph_t g);
166              SWIGTYPE_p_Agedge_t   gv.nextin  (SWIGTYPE_p_Agnode_t  n,  SWIG‐
167              TYPE_p_Agedge_t e);
168
169       Iterate over in-edges of a node
170              SWIGTYPE_p_Agedge_t gv.firstin (SWIGTYPE_p_Agnode_t n);
171              SWIGTYPE_p_Agedge_t  gv.nextin  (SWIGTYPE_p_Agraph_t  g,   SWIG‐
172              TYPE_p_Agedge_t e);
173
174       Iterate over tail nodes reachable from in-edges of a node
175              SWIGTYPE_p_Agnode_t gv.firsttail (SWIGTYPE_p_Agnode_t n);
176              SWIGTYPE_p_Agnode_t  gv.nexttail  (SWIGTYPE_p_Agnode_t  n, SWIG‐
177              TYPE_p_Agnode_t t);
178
179       Iterate over nodes of a graph
180              SWIGTYPE_p_Agnode_t gv.firstnode (SWIGTYPE_p_Agraph_t g);
181              SWIGTYPE_p_Agnode_t gv.nextnode  (SWIGTYPE_p_Agraph_t  g,  SWIG‐
182              TYPE_p_Agnode_t n);
183
184       Iterate over nodes of an edge
185              SWIGTYPE_p_Agnode_t gv.firstnode (SWIGTYPE_p_Agedge_t e);
186              SWIGTYPE_p_Agnode_t  gv.nextnode  (SWIGTYPE_p_Agedge_t  e, SWIG‐
187              TYPE_p_Agnode_t n);
188
189       Iterate over attributes of a graph
190              SWIGTYPE_p_Agsym_t gv.firstattr (SWIGTYPE_p_Agraph_t g);
191              SWIGTYPE_p_Agsym_t  gv.nextattr  (SWIGTYPE_p_Agraph_t  g,  SWIG‐
192              TYPE_p_Agsym_t a);
193
194       Iterate over attributes of an edge
195              SWIGTYPE_p_Agsym_t gv.firstattr (SWIGTYPE_p_Agedge_t e);
196              SWIGTYPE_p_Agsym_t  gv.nextattr  (SWIGTYPE_p_Agedge_t  e,  SWIG‐
197              TYPE_p_Agsym_t a);
198
199       Iterate over attributes of a node
200              SWIGTYPE_p_Agsym_t gv.firstattr (SWIGTYPE_p_Agnode_t n);
201              SWIGTYPE_p_Agsym_t  gv.nextattr  (SWIGTYPE_p_Agnode_t  n,  SWIG‐
202              TYPE_p_Agsym_t a);
203
204       Remove graph objects
205              bool gv.rm (SWIGTYPE_p_Agraph_t g);
206              bool gv.rm (SWIGTYPE_p_Agnode_t n);
207              bool gv.rm (SWIGTYPE_p_Agedge_t e);
208
209       Layout
210
211       Annotate  a  graph  with  layout attributes and values using a specific
212       layout engine
213              bool gv.layout (SWIGTYPE_p_Agraph_t g, string engine);
214
215       Render
216
217       Render a layout into attributes of the graph
218              bool gv.render (SWIGTYPE_p_Agraph_t g);
219
220       Render a layout to stdout
221              bool gv.render (SWIGTYPE_p_Agraph_t g, string format);
222
223       Render to an open file
224              bool gv.render  (SWIGTYPE_p_Agraph_t  g,  string  format,  SWIG‐
225              TYPE_p_FILE fout);
226
227       Render a layout to an unopened file by name
228              bool  gv.render  (SWIGTYPE_p_Agraph_t  g,  string format, string
229              filename);
230
231       Render to a string result
232              string gv.renderresult (SWIGTYPE_p_Agraph_t ing, string format);
233              gv.renderresult (SWIGTYPE_p_Agraph_t g,  string  format,  string
234              outdata);
235
236       Render to an open channel
237              bool  gv.renderchannel  (SWIGTYPE_p_Agraph_t  g,  string format,
238              string channelname);
239
240       Render a layout to a malloc'ed string, to be free'd by the caller
241
242       (deprecated - too easy to leak memory)
243
244       (still needed for "eval [gv::renderdata $G tk]" )
245              string gv.renderdata (SWIGTYPE_p_Agraph_t g, string format);
246
247       Writing graph back to file
248              bool gv.write (SWIGTYPE_p_Agraph_t g, string filename);
249              bool gv.write (SWIGTYPE_p_Agraph_t g, SWIGTYPE_p_FILE f);
250
251       Graph transformation tools
252              bool gv.tred (SWIGTYPE_p_Agraph_t g);
253
254

KEYWORDS

256       graph, dot, neato, fdp, circo, twopi, sharp.
257
258
259
260
261                               02 September 2020                    gv(3sharp)
Impressum