gvgen.1 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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 \-w n
  74. ]
  75. [
  76. .BI \-n prefix
  77. ]
  78. [
  79. .BI \-N name
  80. ]
  81. [
  82. .BI \-o outfile
  83. ]
  84. .SH DESCRIPTION
  85. .B gvgen
  86. generates a variety of simple, regularly-structured abstract
  87. graphs.
  88. .SH OPTIONS
  89. The following options are supported:
  90. .TP
  91. .BI \-c " n"
  92. Generate a cycle with \fIn\fP vertices and edges.
  93. .TP
  94. .BI \-C " x,y"
  95. Generate an \fIx\fP by \fIy\fP cylinder.
  96. This will have \fIx*y\fP vertices and
  97. \fI2*x*y - y\fP edges.
  98. .TP
  99. .BI \-g " [\fBf\fP]x,y"
  100. Generate an \fIx\fP by \fIy\fP grid.
  101. If \fBf\fP is given, the grid is folded, with an edge
  102. attaching each pair of opposing corner vertices.
  103. This will have \fIx*y\fP vertices and
  104. \fI2*x*y - y - x\fP edges if unfolded and
  105. \fI2*x*y - y - x + 2\fP edges if folded.
  106. .TP
  107. .BI \-G " [\fBf\fP]x,y"
  108. Generate an \fIx\fP by \fIy\fP partial grid.
  109. If \fBf\fP is given, the grid is folded, with an edge
  110. attaching each pair of opposing corner vertices.
  111. This will have \fIx*y\fP vertices.
  112. .TP
  113. .BI \-h " n"
  114. Generate a hypercube of degree \fIn\fP.
  115. This will have \fI2^n\fP vertices and \fIn*2^(n-1)\fP edges.
  116. .TP
  117. .BI \-k " n"
  118. Generate a complete graph on \fIn\fP vertices with
  119. \fIn*(n-1)/2\fP edges.
  120. .TP
  121. .BI \-b " x,y"
  122. Generate a complete \fIx\fP by \fIy\fP bipartite graph.
  123. This will have \fIx+y\fP vertices and
  124. \fIx*y\fP edges.
  125. .TP
  126. .BI \-B " x,y"
  127. Generate an \fIx\fP by \fIy\fP ball, i.e., an \fIx\fP by \fIy\fP cylinder
  128. with two "cap" nodes closing the ends.
  129. This will have \fIx*y + 2\fP vertices
  130. and \fI2*x*y + y\fP edges.
  131. .TP
  132. .BI \-m " n"
  133. Generate a triangular mesh with \fIn\fP vertices on a side.
  134. This will have \fI(n+1)*n/2\fP vertices
  135. and \fI3*(n-1)*n/2\fP edges.
  136. .TP
  137. .BI \-M " x,y"
  138. Generate an x by y Moebius strip.
  139. This will have \fIx*y\fP vertices
  140. and \fI2*x*y - y\fP edges.
  141. .TP
  142. .BI \-p " n"
  143. Generate a path on \fIn\fP vertices.
  144. This will have \fIn-1\fP edges.
  145. .TP
  146. .BI \-r " x,y"
  147. Generate a random graph.
  148. The number of vertices will be the largest value of the form \fI2^n-1\fP less than or
  149. equal to \fIx\fP. Larger values of \fIy\fP increase the density of the graph.
  150. .TP
  151. .BI \-R " x"
  152. Generate a random rooted tree on \fIx\fP vertices.
  153. .TP
  154. .BI \-s " n"
  155. Generate a star on \fIn\fP vertices.
  156. This will have \fIn-1\fP edges.
  157. .TP
  158. .BI \-S " n"
  159. Generate a Sierpinski graph of order \fIn\fP.
  160. This will have \fI3*(3^(n-1) + 1)/2\fP vertices and
  161. \fI3^n\fP edges.
  162. .TP
  163. .BI \-S " n,d"
  164. Generate a \fId\fP-dimensional Sierpinski graph of order \fIn\fP.
  165. At present, \fId\fP must be 2 or 3.
  166. For d equal to 3, there will be \fI4*(4^(n-1) + 1)/2\fP vertices and
  167. \fI6 * 4^(n-1)\fP edges.
  168. .TP
  169. .BI \-t " n"
  170. Generate a binary tree of height \fIn\fP.
  171. This will have \fI2^n-1\fP vertices and
  172. \fI2^n-2\fP edges.
  173. .TP
  174. .BI \-t " h,n"
  175. Generate a n-ary tree of height \fIh\fP.
  176. .TP
  177. .BI \-T " x,y"
  178. .TP
  179. .BI \-T " x,y,u,v"
  180. Generate an \fIx\fP by \fIy\fP torus.
  181. This will have \fIx*y\fP vertices and
  182. \fI2*x*y\fP edges.
  183. If \fIu\fP and \fIv\fP are given, they specify twists of that amount in
  184. the horizontal and vertical directions, respectively.
  185. .TP
  186. .BI \-w " n"
  187. Generate a path on \fIn\fP vertices.
  188. This will have \fIn-1\fP edges.
  189. .TP
  190. .BI \-i " n"
  191. Generate \fIn\fP graphs of the requested type. At present, only available if
  192. the \fB\-R\fP flag is used.
  193. .TP
  194. .BI \-n " prefix"
  195. Normally, integers are used as node names. If \fIprefix\fP is specified,
  196. this will be prepended to the integer to create the name.
  197. .TP
  198. .BI \-N " name"
  199. Use \fIname\fP as the name of the graph.
  200. By default, the graph is anonymous.
  201. .TP
  202. .BI \-o " outfile"
  203. If specified, the generated graph is written into the file
  204. .I outfile.
  205. Otherwise, the graph is written to standard out.
  206. .TP
  207. .B \-d
  208. Make the generated graph directed.
  209. .TP
  210. .B \-v
  211. Verbose output.
  212. .TP
  213. .B \-?
  214. Print usage information.
  215. .SH "EXIT STATUS"
  216. .B gvgen
  217. exits with 0 on successful completion,
  218. and exits with 1 if given an ill-formed or incorrect flag,
  219. or if the specified output file could not be opened.
  220. .SH AUTHOR
  221. Emden R. Gansner <[email protected]>
  222. .SH "SEE ALSO"
  223. gc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3)