Debian Codegraph @

cmd/tools/gvgen.1

raw
1 .TH GVGEN 1 "5 June 2012"
2 .SH NAME
3 gvgen \- generate graphs
4 .SH SYNOPSIS
5 .B gvgen
6 [
7 .B \-dv?
8 ]
9 [
10 .BI \-i n
11 ]
12 [
13 .BI \-c n
14 ]
15 [
16 .BI \-C x,y
17 ]
18 [
19 .BI \-g [\fBf\fP]x,y
20 ]
21 [
22 .BI \-G [\fBf\fP]x,y
23 ]
24 [
25 .BI \-h n
26 ]
27 [
28 .BI \-k n
29 ]
30 [
31 .BI \-b x,y
32 ]
33 [
34 .BI \-B x,y
35 ]
36 [
37 .BI \-m n
38 ]
39 [
40 .BI \-M x,y
41 ]
42 [
43 .BI \-p n
44 ]
45 [
46 .BI \-r x,y
47 ]
48 [
49 .BI \-R x
50 ]
51 [
52 .BI \-s n
53 ]
54 [
55 .BI \-S n
56 ]
57 [
58 .BI \-S n,d
59 ]
60 [
61 .BI \-t n
62 ]
63 [
64 .BI \-t d,n
65 ]
66 [
67 .BI \-T x,y
68 ]
69 [
70 .BI \-T x,y,u,v
71 ]
72 [
73 .BI \-u seed
74 ]
75 [
76 .BI \-w n
77 ]
78 [
79 .BI \-n prefix
80 ]
81 [
82 .BI \-N name
83 ]
84 [
85 .BI \-o outfile
86 ]
87 .SH DESCRIPTION
88 .B gvgen
89 generates a variety of simple, regularly-structured abstract
90 graphs.
91 .SH OPTIONS
92 The following options are supported:
93 .TP
94 .BI \-c " n"
95 Generate a cycle with \fIn\fP vertices and edges.
96 .TP
97 .BI \-C " x,y"
98 Generate an \fIx\fP by \fIy\fP cylinder.
99 This will have \fIx*y\fP vertices and
100 \fI2*x*y - y\fP edges.
101 .TP
102 .BI \-g " [\fBf\fP]x,y"
103 Generate an \fIx\fP by \fIy\fP grid.
104 If \fBf\fP is given, the grid is folded, with an edge
105 attaching each pair of opposing corner vertices.
106 This will have \fIx*y\fP vertices and
107 \fI2*x*y - y - x\fP edges if unfolded and
108 \fI2*x*y - y - x + 2\fP edges if folded.
109 .TP
110 .BI \-G " [\fBf\fP]x,y"
111 Generate an \fIx\fP by \fIy\fP partial grid.
112 If \fBf\fP is given, the grid is folded, with an edge
113 attaching each pair of opposing corner vertices.
114 This will have \fIx*y\fP vertices.
115 .TP
116 .BI \-h " n"
117 Generate a hypercube of degree \fIn\fP.
118 This will have \fI2^n\fP vertices and \fIn*2^(n-1)\fP edges.
119 .TP
120 .BI \-k " n"
121 Generate a complete graph on \fIn\fP vertices with
122 \fIn*(n-1)/2\fP edges.
123 .TP
124 .BI \-b " x,y"
125 Generate a complete \fIx\fP by \fIy\fP bipartite graph.
126 This will have \fIx+y\fP vertices and
127 \fIx*y\fP edges.
128 .TP
129 .BI \-B " x,y"
130 Generate an \fIx\fP by \fIy\fP ball, i.e., an \fIx\fP by \fIy\fP cylinder
131 with two "cap" nodes closing the ends.
132 This will have \fIx*y + 2\fP vertices
133 and \fI2*x*y + y\fP edges.
134 .TP
135 .BI \-m " n"
136 Generate a triangular mesh with \fIn\fP vertices on a side.
137 This will have \fI(n+1)*n/2\fP vertices
138 and \fI3*(n-1)*n/2\fP edges.
139 .TP
140 .BI \-M " x,y"
141 Generate an x by y Moebius strip.
142 This will have \fIx*y\fP vertices
143 and \fI2*x*y - y\fP edges.
144 .TP
145 .BI \-p " n"
146 Generate a path on \fIn\fP vertices.
147 This will have \fIn-1\fP edges.
148 .TP
149 .BI \-r " x,y"
150 Generate a random graph.
151 The number of vertices will be the largest value of the form \fI2^n-1\fP less than or
152 equal to \fIx\fP. Larger values of \fIy\fP increase the density of the graph.
153 .TP
154 .BI \-R " x"
155 Generate a random rooted tree on \fIx\fP vertices.
156 .TP
157 .BI \-s " n"
158 Generate a star on \fIn\fP vertices.
159 This will have \fIn-1\fP edges.
160 .TP
161 .BI \-S " n"
162 Generate a Sierpinski graph of order \fIn\fP.
163 This will have \fI3*(3^(n-1) + 1)/2\fP vertices and
164 \fI3^n\fP edges.
165 .TP
166 .BI \-S " n,d"
167 Generate a \fId\fP-dimensional Sierpinski graph of order \fIn\fP.
168 At present, \fId\fP must be 2 or 3.
169 For d equal to 3, there will be \fI4*(4^(n-1) + 1)/2\fP vertices and
170 \fI6 * 4^(n-1)\fP edges.
171 .TP
172 .BI \-t " n"
173 Generate a binary tree of height \fIn\fP.
174 This will have \fI2^n-1\fP vertices and
175 \fI2^n-2\fP edges.
176 .TP
177 .BI \-t " h,n"
178 Generate a n-ary tree of height \fIh\fP.
179 .TP
180 .BI \-T " x,y"
181 .TP
182 .BI \-T " x,y,u,v"
183 Generate an \fIx\fP by \fIy\fP torus.
184 This will have \fIx*y\fP vertices and
185 \fI2*x*y\fP edges.
186 If \fIu\fP and \fIv\fP are given, they specify twists of that amount in
187 the horizontal and vertical directions, respectively.
188 .TP
189 .BI \-u " seed"
190 Specify the initial state for the random number generator. If this option is not
191 given, the current time is used to derive a seed.
192 .TP
193 .BI \-w " n"
194 Generate a path on \fIn\fP vertices.
195 This will have \fIn-1\fP edges.
196 .TP
197 .BI \-i " n"
198 Generate \fIn\fP graphs of the requested type. At present, only available if
199 the \fB\-R\fP flag is used.
200 .TP
201 .BI \-n " prefix"
202 Normally, integers are used as node names. If \fIprefix\fP is specified,
203 this will be prepended to the integer to create the name.
204 .TP
205 .BI \-N " name"
206 Use \fIname\fP as the name of the graph.
207 By default, the graph is anonymous.
208 .TP
209 .BI \-o " outfile"
210 If specified, the generated graph is written into the file
211 .I outfile.
212 Otherwise, the graph is written to standard out.
213 .TP
214 .B \-d
215 Make the generated graph directed.
216 .TP
217 .B \-v
218 Verbose output.
219 .TP
220 .B \-?
221 Print usage information.
222 .SH "EXIT STATUS"
223 .B gvgen
224 exits with 0 on successful completion,
225 and exits with 1 if given an ill-formed or incorrect flag,
226 or if the specified output file could not be opened.
227 .SH AUTHOR
228 Emden R. Gansner <[email protected]>
229 .SH "SEE ALSO"
230 gc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3)