1
.TH GV_OCAML N "25 June 2008"
5
gv_ocaml - graph manipulation in ocaml
18
is a dynamically loaded extension for
20
that provides access to the graph facilities of
31
\fIgraph_handle\fR \fBgv.graph\fR \fI(name);\fR
33
\fIgraph_handle\fR \fBgv.digraph\fR \fI(name);\fR
35
\fIgraph_handle\fR \fBgv.strictgraph\fR \fI(name);\fR
37
\fIgraph_handle\fR \fBgv.strictdigraph\fR \fI(name);\fR
40
New graph from a dot-syntax string or file
42
\fIgraph_handle\fR \fBgv.readstring\fR \fI(string);\fR
44
\fIgraph_handle\fR \fBgv.read\fR \fI(filename);\fR
46
\fIgraph_handle\fR \fBgv.read\fR \fI(channel);\fR
49
Add new subgraph to existing graph
51
\fIgraph_handle\fR \fBgv.graph\fR \fI(graph_handle, name);\fR
57
Add new node to existing graph
59
\fInode_handle\fR \fBgv.node\fR \fI(graph_handle, name);\fR
65
Add new edge between existing nodes
67
\fIedge_handle\fR \fBgv.edge\fR \fI(tail_node_handle, head_node_handle);\fR
70
Add a new edge between an existing tail node, and a named head node which will be induced in the graph if it doesn't already exist
72
\fIedge_handle\fR \fBgv.edge\fR \fI(tail_node_handle, head_name);\fR
75
Add a new edge between an existing head node, and a named tail node which will be induced in the graph if it doesn't already exist
77
\fIedge_handle\fR \fBgv.edge\fR \fI(tail_name, head_node_handle);\fR
80
Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist
82
\fIedge_handle\fR \fBgv.edge\fR \fI(graph_handle, tail_name, head_name);\fR
85
\fBSetting attribute values\fR
88
Set value of named attribute of graph/node/edge - creating attribute if necessary
90
\fIstring\fR \fBgv.setv\fR \fI(graph_handle, attr_name, attr_value);\fR
92
\fIstring\fR \fBgv.setv\fR \fI(node_handle, attr_name, attr_value);\fR
94
\fIstring\fR \fBgv.setv\fR \fI(edge_handle, attr_name, attr_value);\fR
97
Set value of existing attribute of graph/node/edge (using attribute handle)
99
\fIstring\fR \fBgv.setv\fR \fI(graph_handle, attr_handle, attr_value);\fR
101
\fIstring\fR \fBgv.setv\fR \fI(node_handle, attr_handle, attr_value);\fR
103
\fIstring\fR \fBgv.setv\fR \fI(edge_handle, attr_handle, attr_value);\fR
106
\fBGetting attribute values\fR
109
Get value of named attribute of graph/node/edge
111
\fIstring\fR \fBgv.getv\fR \fI(graph_handle, attr_name);\fR
113
\fIstring\fR \fBgv.getv\fR \fI(node_handle, attr_name);\fR
115
\fIstring\fR \fBgv.getv\fR \fI(edge_handle, attr_name);\fR
118
Get value of attribute of graph/node/edge (using attribute handle)
120
\fIstring\fR \fBgv.getv\fR \fI(graph_handle, attr_handle);\fR
122
\fIstring\fR \fBgv.getv\fR \fI(node_handle, attr_handle);\fR
124
\fIstring\fR \fBgv.getv\fR \fI(edge_handle, attr_handle);\fR
127
\fBObtain names from handles\fR
129
\fIstring\fR \fBgv.nameof\fR \fI(graph_handle);\fR
131
\fIstring\fR \fBgv.nameof\fR \fI(node_handle);\fR
133
\fIstring\fR \fBgv.nameof\fR \fI(attr_handle);\fR
136
\fBFind handles from names\fR
138
\fIgraph_handle\fR \fBgv.findsubg\fR \fI(graph_handle, name);\fR
140
\fInode_handle\fR \fBgv.findnode\fR \fI(graph_handle, name);\fR
142
\fIedge_handle\fR \fBgv.findedge\fR \fI(tail_node_handle, head_node_handle);\fR
144
\fIattribute_handle\fR \fBgv.findattr\fR \fI(graph_handle, name);\fR
146
\fIattribute_handle\fR \fBgv.findattr\fR \fI(node_handle, name);\fR
148
\fIattribute_handle\fR \fBgv.findattr\fR \fI(edge_handle, name);\fR
151
\fBMisc graph navigators returning handles\fR
153
\fInode_handle\fR \fBgv.headof\fR \fI(edge_handle);\fR
155
\fInode_handle\fR \fBgv.tailof\fR \fI(edge_handle);\fR
157
\fIgraph_handle\fR \fBgv.graphof\fR \fI(graph_handle);\fR
159
\fIgraph_handle\fR \fBgv.graphof\fR \fI(edge_handle);\fR
161
\fIgraph_handle\fR \fBgv.graphof\fR \fI(node_handle);\fR
163
\fIgraph_handle\fR \fBgv.rootof\fR \fI(graph_handle);\fR
166
\fBObtain handles of proto node/edge for setting default attribute values\fR
168
\fInode_handle\fR \fBgv.protonode\fR \fI(graph_handle);\fR
170
\fIedge_handle\fR \fBgv.protoedge\fR \fI(graph_handle);\fR
176
Iteration termination tests
178
\fIbool\fR \fBgv.ok\fR \fI(graph_handle);\fR
180
\fIbool\fR \fBgv.ok\fR \fI(node_handle);\fR
182
\fIbool\fR \fBgv.ok\fR \fI(edge_handle);\fR
184
\fIbool\fR \fBgv.ok\fR \fI(attr_handle);\fR
187
Iterate over subgraphs of a graph
189
\fIgraph_handle\fR \fBgv.firstsubg\fR \fI(graph_handle);\fR
191
\fIgraph_handle\fR \fBgv.nextsubg\fR \fI(graph_handle, subgraph_handle);\fR
194
Iterate over supergraphs of a graph (obscure and rarely useful)
196
\fIgraph_handle\fR \fBgv.firstsupg\fR \fI(graph_handle);\fR
198
\fIgraph_handle\fR \fBgv.nextsupg\fR \fI(graph_handle, subgraph_handle);\fR
201
Iterate over edges of a graph
203
\fIedge_handle\fR \fBgv.firstedge\fR \fI(graph_handle);\fR
205
\fIedge_handle\fR \fBgv.nextedge\fR \fI(graph_handle, edge_handle);\fR
208
Iterate over outedges of a graph
210
\fIedge_handle\fR \fBgv.firstout\fR \fI(graph_handle);\fR
212
\fIedge_handle\fR \fBgv.nextout\fR \fI(graph_handle, edge_handle);\fR
215
Iterate over edges of a node
217
\fIedge_handle\fR \fBgv.firstedge\fR \fI(node_handle);\fR
219
\fIedge_handle\fR \fBgv.nextedge\fR \fI(node_handle, edge_handle);\fR
222
Iterate over out-edges of a node
224
\fIedge_handle\fR \fBgv.firstout\fR \fI(node_handle);\fR
226
\fIedge_handle\fR \fBgv.nextout\fR \fI(node_handle, edge_handle);\fR
229
Iterate over head nodes reachable from out-edges of a node
231
\fInode_handle\fR \fBgv.firsthead\fR \fI(node_handle);\fR
233
\fInode_handle\fR \fBgv.nexthead\fR \fI(node_handle, head_node_handle);\fR
236
Iterate over in-edges of a graph
238
\fIedge_handle\fR \fBgv.firstin\fR \fI(graph_handle);\fR
240
\fIedge_handle\fR \fBgv.nextin\fR \fI(node_handle, edge_handle);\fR
243
Iterate over in-edges of a node
245
\fIedge_handle\fR \fBgv.firstin\fR \fI(node_handle);\fR
247
\fIedge_handle\fR \fBgv.nextin\fR \fI(graph_handle, edge_handle);\fR
250
Iterate over tail nodes reachable from in-edges of a node
252
\fInode_handle\fR \fBgv.firsttail\fR \fI(node_handle);\fR
254
\fInode_handle\fR \fBgv.nexttail\fR \fI(node_handle, tail_node_handle);\fR
257
Iterate over nodes of a graph
259
\fInode_handle\fR \fBgv.firstnode\fR \fI(graph_handle);\fR
261
\fInode_handle\fR \fBgv.nextnode\fR \fI(graph_handle, node_handle);\fR
264
Iterate over nodes of an edge
266
\fInode_handle\fR \fBgv.firstnode\fR \fI(edge_handle);\fR
268
\fInode_handle\fR \fBgv.nextnode\fR \fI(edge_handle, node_handle);\fR
271
Iterate over attributes of a graph
273
\fIattribute_handle\fR \fBgv.firstattr\fR \fI(graph_handle);\fR
275
\fIattribute_handle\fR \fBgv.nextattr\fR \fI(graph_handle, attr_handle);\fR
278
Iterate over attributes of an edge
280
\fIattribute_handle\fR \fBgv.firstattr\fR \fI(edge_handle);\fR
282
\fIattribute_handle\fR \fBgv.nextattr\fR \fI(edge_handle, attr_handle);\fR
285
Iterate over attributes of a node
287
\fIattribute_handle\fR \fBgv.firstattr\fR \fI(node_handle);\fR
289
\fIattribute_handle\fR \fBgv.nextattr\fR \fI(node_handle, attr_handle);\fR
292
\fBRemove graph objects\fR
294
\fIbool\fR \fBgv.rm\fR \fI(graph_handle);\fR
296
\fIbool\fR \fBgv.rm\fR \fI(node_handle);\fR
298
\fIbool\fR \fBgv.rm\fR \fI(edge_handle);\fR
304
Annotate a graph with layout attributes and values using a specific layout engine
306
\fIbool\fR \fBgv.layout\fR \fI(graph_handle, engine);\fR
312
Render a layout into attributes of the graph
314
\fIbool\fR \fBgv.render\fR \fI(graph_handle);\fR
317
Render a layout in a specific format
319
\fIbool\fR \fBgv.render\fR \fI(graph_handle, format);\fR
321
\fIbool\fR \fBgv.render\fR \fI(graph_handle, format, filename);\fR
323
\fIbool\fR \fBgv.render\fR \fI(graph_handle, format, channel);\fR
325
\fIstring\fR \fBgv.renderdata\fR \fI(graph_handle, format);\fR
328
Writing graph back to file
330
\fIbool\fR \fBgv.write\fR \fI(graph_handle, filename);\fR
332
\fIbool\fR \fBgv.write\fR \fI(graph_handle, channel);\fR
337
graph, dot, neato, fdp, circo, twopi, ocaml.