1
.TH gv 3perl "26 January 2010"
5
gv_perl - graph manipulation in perl
20
is a dynamically loaded extension for
22
that provides access to the graph facilities of
33
\fIgraph_handle\fR \fBgv::graph\fR \fI(name);\fR
35
\fIgraph_handle\fR \fBgv::digraph\fR \fI(name);\fR
37
\fIgraph_handle\fR \fBgv::strictgraph\fR \fI(name);\fR
39
\fIgraph_handle\fR \fBgv::strictdigraph\fR \fI(name);\fR
42
New graph from a dot-syntax string or file
44
\fIgraph_handle\fR \fBgv::readstring\fR \fI(string);\fR
46
\fIgraph_handle\fR \fBgv::read\fR \fI(string filename);\fR
48
\fIgraph_handle\fR \fBgv::read\fR \fI(channel);\fR
51
Add new subgraph to existing graph
53
\fIgraph_handle\fR \fBgv::graph\fR \fI(graph_handle, name);\fR
59
Add new node to existing graph
61
\fInode_handle\fR \fBgv::node\fR \fI(graph_handle, name);\fR
67
Add new edge between existing nodes
69
\fIedge_handle\fR \fBgv::edge\fR \fI(tail_node_handle, head_node_handle);\fR
72
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
74
\fIedge_handle\fR \fBgv::edge\fR \fI(tail_node_handle, head_name);\fR
77
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
79
\fIedge_handle\fR \fBgv::edge\fR \fI(tail_name, head_node_handle);\fR
82
Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist
84
\fIedge_handle\fR \fBgv::edge\fR \fI(graph_handle, tail_name, head_name);\fR
87
\fBSetting attribute values\fR
90
Set value of named attribute of graph/node/edge - creating attribute if necessary
92
\fIstring\fR \fBgv::setv\fR \fI(graph_handle, attr_name, attr_value);\fR
94
\fIstring\fR \fBgv::setv\fR \fI(node_handle, attr_name, attr_value);\fR
96
\fIstring\fR \fBgv::setv\fR \fI(edge_handle, attr_name, attr_value);\fR
99
Set value of existing attribute of graph/node/edge (using attribute handle)
101
\fIstring\fR \fBgv::setv\fR \fI(graph_handle, attr_handle, attr_value);\fR
103
\fIstring\fR \fBgv::setv\fR \fI(node_handle, attr_handle, attr_value);\fR
105
\fIstring\fR \fBgv::setv\fR \fI(edge_handle, attr_handle, attr_value);\fR
108
\fBGetting attribute values\fR
111
Get value of named attribute of graph/node/edge
113
\fIstring\fR \fBgv::getv\fR \fI(graph_handle, attr_name);\fR
115
\fIstring\fR \fBgv::getv\fR \fI(node_handle, attr_name);\fR
117
\fIstring\fR \fBgv::getv\fR \fI(edge_handle, attr_name);\fR
120
Get value of attribute of graph/node/edge (using attribute handle)
122
\fIstring\fR \fBgv::getv\fR \fI(graph_handle, attr_handle);\fR
124
\fIstring\fR \fBgv::getv\fR \fI(node_handle, attr_handle);\fR
126
\fIstring\fR \fBgv::getv\fR \fI(edge_handle, attr_handle);\fR
129
\fBObtain names from handles\fR
131
\fIstring\fR \fBgv::nameof\fR \fI(graph_handle);\fR
133
\fIstring\fR \fBgv::nameof\fR \fI(node_handle);\fR
135
\fIstring\fR \fBgv::nameof\fR \fI(attr_handle);\fR
138
\fBFind handles from names\fR
140
\fIgraph_handle\fR \fBgv::findsubg\fR \fI(graph_handle, name);\fR
142
\fInode_handle\fR \fBgv::findnode\fR \fI(graph_handle, name);\fR
144
\fIedge_handle\fR \fBgv::findedge\fR \fI(tail_node_handle, head_node_handle);\fR
146
\fIattribute_handle\fR \fBgv::findattr\fR \fI(graph_handle, name);\fR
148
\fIattribute_handle\fR \fBgv::findattr\fR \fI(node_handle, name);\fR
150
\fIattribute_handle\fR \fBgv::findattr\fR \fI(edge_handle, name);\fR
153
\fBMisc graph navigators returning handles\fR
155
\fInode_handle\fR \fBgv::headof\fR \fI(edge_handle);\fR
157
\fInode_handle\fR \fBgv::tailof\fR \fI(edge_handle);\fR
159
\fIgraph_handle\fR \fBgv::graphof\fR \fI(graph_handle);\fR
161
\fIgraph_handle\fR \fBgv::graphof\fR \fI(edge_handle);\fR
163
\fIgraph_handle\fR \fBgv::graphof\fR \fI(node_handle);\fR
165
\fIgraph_handle\fR \fBgv::rootof\fR \fI(graph_handle);\fR
168
\fBObtain handles of proto node/edge for setting default attribute values\fR
170
\fInode_handle\fR \fBgv::protonode\fR \fI(graph_handle);\fR
172
\fIedge_handle\fR \fBgv::protoedge\fR \fI(graph_handle);\fR
178
Iteration termination tests
180
\fIbool\fR \fBgv::ok\fR \fI(graph_handle);\fR
182
\fIbool\fR \fBgv::ok\fR \fI(node_handle);\fR
184
\fIbool\fR \fBgv::ok\fR \fI(edge_handle);\fR
186
\fIbool\fR \fBgv::ok\fR \fI(attr_handle);\fR
189
Iterate over subgraphs of a graph
191
\fIgraph_handle\fR \fBgv::firstsubg\fR \fI(graph_handle);\fR
193
\fIgraph_handle\fR \fBgv::nextsubg\fR \fI(graph_handle, subgraph_handle);\fR
196
Iterate over supergraphs of a graph (obscure and rarely useful)
198
\fIgraph_handle\fR \fBgv::firstsupg\fR \fI(graph_handle);\fR
200
\fIgraph_handle\fR \fBgv::nextsupg\fR \fI(graph_handle, subgraph_handle);\fR
203
Iterate over edges of a graph
205
\fIedge_handle\fR \fBgv::firstedge\fR \fI(graph_handle);\fR
207
\fIedge_handle\fR \fBgv::nextedge\fR \fI(graph_handle, edge_handle);\fR
210
Iterate over outedges of a graph
212
\fIedge_handle\fR \fBgv::firstout\fR \fI(graph_handle);\fR
214
\fIedge_handle\fR \fBgv::nextout\fR \fI(graph_handle, edge_handle);\fR
217
Iterate over edges of a node
219
\fIedge_handle\fR \fBgv::firstedge\fR \fI(node_handle);\fR
221
\fIedge_handle\fR \fBgv::nextedge\fR \fI(node_handle, edge_handle);\fR
224
Iterate over out-edges of a node
226
\fIedge_handle\fR \fBgv::firstout\fR \fI(node_handle);\fR
228
\fIedge_handle\fR \fBgv::nextout\fR \fI(node_handle, edge_handle);\fR
231
Iterate over head nodes reachable from out-edges of a node
233
\fInode_handle\fR \fBgv::firsthead\fR \fI(node_handle);\fR
235
\fInode_handle\fR \fBgv::nexthead\fR \fI(node_handle, head_node_handle);\fR
238
Iterate over in-edges of a graph
240
\fIedge_handle\fR \fBgv::firstin\fR \fI(graph_handle);\fR
242
\fIedge_handle\fR \fBgv::nextin\fR \fI(node_handle, edge_handle);\fR
245
Iterate over in-edges of a node
247
\fIedge_handle\fR \fBgv::firstin\fR \fI(node_handle);\fR
249
\fIedge_handle\fR \fBgv::nextin\fR \fI(graph_handle, edge_handle);\fR
252
Iterate over tail nodes reachable from in-edges of a node
254
\fInode_handle\fR \fBgv::firsttail\fR \fI(node_handle);\fR
256
\fInode_handle\fR \fBgv::nexttail\fR \fI(node_handle, tail_node_handle);\fR
259
Iterate over nodes of a graph
261
\fInode_handle\fR \fBgv::firstnode\fR \fI(graph_handle);\fR
263
\fInode_handle\fR \fBgv::nextnode\fR \fI(graph_handle, node_handle);\fR
266
Iterate over nodes of an edge
268
\fInode_handle\fR \fBgv::firstnode\fR \fI(edge_handle);\fR
270
\fInode_handle\fR \fBgv::nextnode\fR \fI(edge_handle, node_handle);\fR
273
Iterate over attributes of a graph
275
\fIattribute_handle\fR \fBgv::firstattr\fR \fI(graph_handle);\fR
277
\fIattribute_handle\fR \fBgv::nextattr\fR \fI(graph_handle, attr_handle);\fR
280
Iterate over attributes of an edge
282
\fIattribute_handle\fR \fBgv::firstattr\fR \fI(edge_handle);\fR
284
\fIattribute_handle\fR \fBgv::nextattr\fR \fI(edge_handle, attr_handle);\fR
287
Iterate over attributes of a node
289
\fIattribute_handle\fR \fBgv::firstattr\fR \fI(node_handle);\fR
291
\fIattribute_handle\fR \fBgv::nextattr\fR \fI(node_handle, attr_handle);\fR
294
\fBRemove graph objects\fR
296
\fIbool\fR \fBgv::rm\fR \fI(graph_handle);\fR
298
\fIbool\fR \fBgv::rm\fR \fI(node_handle);\fR
300
\fIbool\fR \fBgv::rm\fR \fI(edge_handle);\fR
306
Annotate a graph with layout attributes and values using a specific layout engine
308
\fIbool\fR \fBgv::layout\fR \fI(graph_handle, string engine);\fR
314
Render a layout into attributes of the graph
316
\fIbool\fR \fBgv::render\fR \fI(graph_handle);\fR
319
Render a layout to stdout
321
\fIbool\fR \fBgv::render\fR \fI(graph_handle, string format);\fR
324
Render to an open file
326
\fIbool\fR \fBgv::render\fR \fI(graph_handle, string format, channel fout);\fR
329
Render a layout to an unopened file by name
331
\fIbool\fR \fBgv::render\fR \fI(graph_handle, string format, string filename);\fR
334
Render to an open channel
336
\fIbool\fR \fBgv::renderchannel\fR \fI(graph_handle, string format, string channelname);\fR
339
Render to a string result
341
\fBgv::renderresult\fR \fI(graph_handle, string format, string outdata);\fR
344
Render a layout to a malloc'ed string, to be free'd by the caller
347
(deprecated - too easy to leak memory)
350
(still needed for "eval [gv::renderdata $G tk]" )
352
\fIstring\fR \fBgv::renderdata\fR \fI(graph_handle, string format);\fR
355
Writing graph back to file
357
\fIbool\fR \fBgv::write\fR \fI(graph_handle, string filename);\fR
359
\fIbool\fR \fBgv::write\fR \fI(graph_handle, channel);\fR
364
graph, dot, neato, fdp, circo, twopi, perl.