.BI -S n
]
[
+.BI -S n,d
+]
+[
.BI -t n
]
[
.TP
.BI \-S " n"
Generate a Sierpinski graph of order \fIn\fP.
-This will have \fI3*(3^(n-1) - 1)/2\fP vertices and
+This will have \fI3*(3^(n-1) + 1)/2\fP vertices and
\fI3^n\fP edges.
.TP
+.BI \-S " n,d"
+Generate a \fId\fP-dimensional Sierpinski graph of order \fIn\fP.
+At present, \fId\fP must be 2 or 3.
+For d equal to 3, there will be \fI4*(4^(n-1) + 1)/2\fP vertices and
+\fI6 * 4^(n-1)\fP edges.
+.TP
.BI \-t " n"
Generate a binary tree of height \fIn\fP.
This will have \fI2^n-1\fP vertices and
typedef enum { unknown, grid, circle, complete, completeb,
path, tree, torus, cylinder, mobius, randomg, randomt, ball,
- sierpinski, tetrix, hypercube, star, wheel, trimesh
+ sierpinski, hypercube, star, wheel, trimesh
} GraphType;
typedef struct {
-r<x>,<n> : random graph\n\
-R<n> : random rooted tree on <n> vertices\n\
-s<x> : star\n\
- -S<x> : sierpinski\n\
- -X<x> : tetrix (3d sierpinski)\n\
+ -S<x> : 2D sierpinski\n\
+ -S<x>,<d> : <d>D sierpinski (<d> = 2,3)\n\
-t<x> : binary tree \n\
-t<x>,<n> : n-ary tree \n\
-T<x,y> : torus \n\
break;
case 'S':
graphType = sierpinski;
- if (setOne(optarg, opts))
+ if (setTwoOpt(optarg, opts, 2))
errexit(c);
- break;
- case 'X':
- graphType = tetrix;
- if (setOne(optarg, opts))
+ if (opts->graphSize2 > 3) {
+ fprintf(stderr, "%dD Sierpinski not implemented - use 2 or 3 ", opts->graphSize2);
errexit(c);
- break;
+ }
+ break;
case 's':
graphType = star;
if (setOne(optarg, opts))
makeMobius(opts.graphSize1, opts.graphSize2, ef);
break;
case sierpinski:
- makeSierpinski(opts.graphSize1, ef);
- break;
- case tetrix:
- makeTetrix(opts.graphSize1, ef);
+ if (opts.graphSize2 == 2)
+ makeSierpinski(opts.graphSize1, ef);
+ else
+ makeTetrix(opts.graphSize1, ef);
break;
case complete:
makeComplete(opts.graphSize1, ef);