#define HELPTEXT \ " Generate all graphs of a specified class.\n\
\n\
n : the number of vertices\n\
mine:maxe : a range for the number of edges\n\ #:0 means '# or more' except in the case0:0\n\
res/mod : only generate subset res out of subsets 0..mod-1\n\
\n\
-c : only write connected graphs\n\
-C : only write biconnected graphs\n\
-t : only generate triangle-free graphs\n\
-f : only generate 4-cycle-free graphs\n\
-k : only generate K4-free graphs\n\
-T : only generate chordal graphs\n\
-S : only generate split graphs\n\
-P : only generate perfect graphs\n\
-F : only generate claw-free graphs\n\
-b : only generate bipartite graphs\n\
(-t, -f and -b can be used in any combination)\n\
-m : save memory at the expense of time (only makes a\n\
difference in the absence of -b, -t, -f and n <= 28).\n\
-d# : a lower bound for the minimum degree\n\
-D# : an upper bound for the maximum degree\n\
-v : display counts by number of edges\n\
-l : canonically label output graphs\n\
\n\
-u : donot output any graphs, just generate and count them\n\
-g : use graph6 output (default)\n\
-s : use sparse6 output\n\
-h : for graph6 or sparse6 format, write a header too\n\
\n\
-q : suppress auxiliary output (except from -v)\n\
\n\
See program text for much more information.\n"
typedefstruct
{ int ne,dmax; /* values used for xlb,xub calculation */ int xlb,xub; /* saved bounds on extension degree */
xword lo,hi; /* work purposes for orbit calculation */
xword xstart[MAXN+1]; /* index into xset[] for each cardinality */
xword *xset; /* array of all x-sets in card order */
xword *xcard; /* cardinalities of all x-sets */
xword *xinv; /* map from x-set to index in xset */
xword *xorb; /* min orbit representative */
xword *xx; /* (-b, -t, -s, -m) candidate x-sets */ /* note: can be the same as xcard */
xword xlim; /* number of x-sets in xx[] */
} leveldata;
static TLS_ATTR leveldata data[MAXN]; /* data[n] is data for n -> n+1 */ static TLS_ATTR nauty_counter ecount[1+MAXN*(MAXN-1)/2]; /* counts by number of edges */ static TLS_ATTR nauty_counter nodes[MAXN]; /* nodes at each level */
/* The numbers below are actual maximum edge counts. gengworkscorrectlywithanyupperbounds. Toextendknownupperboundsupwards: (n-1,E)->(n,E+floor(2*E/(n-2))), whichisdonebytheprocedurefindmaxe().
*/
static TLS_ATTR int maxeb[65] = /* max edges for -b */
{0,0,1,2,4, -1}; static TLS_ATTR int maxet[65] = /* max edges for -t */
{0,0,1,2,4, -1}; static TLS_ATTR int maxef[65] = /* max edges for -f */
{0,0,1,3,4, 6,7,9,11,13, 16,18,21,24,27, 30,33,36,39,42, 46,50,52,56,59, 63,67,71,76,80, 85,90,92,96,102, 106,110,113,117,122, 127, -1}; static TLS_ATTR int maxeft[65] = /* max edges for -ft */
{0,0,1,2,3, 5,6,8,10,12, 15,16,18,21,23, 26,28,31,34,38, 41,44,47,50,54, 57,61,65,68,72, 76,80,85,87,90, 95,99,104,109,114, 120,124,129,134,139, 145,150,156,162,168, 175,176,178, -1}; static TLS_ATTR int maxebf[65] = /* max edges for -bf */
{0,0,1,2,3, 4,6,7,9,10, 12,14,16,18,21, 22,24,26,29,31, 34,36,39,42,45, 48,52,53,56,58, 61,64,67,70,74, 77,81,84,88,92, 96,100,105,106,108, 110,115,118,122,126, 130,134,138,142,147, 151,156,160,165,170, 175,180,186,187, -1};
void
writenauty(FILE *f, graph *g, int n) /* write graph g (n vertices) to file f in nauty format.
Each graph is preceded by the number of vertices. */
{ int nn;
nn = n;
if (fwrite((char *)&nn,sizeof(int),(size_t)1,f) != 1 ||
fwrite((char*)g,sizeof(graph),(size_t)n,f) != n)
{
fprintf(stderr,">E writenauty : error on writing file\n"); exit(2);
}
}
static boolean
isconnected(graph *g, int n) /* test if g is connected */
{
setword seen,expanded,toexpand,allbits; int i;
allbits = ALLMASK(n);
expanded = bit[n-1];
seen = expanded | g[n-1];
while (seen != allbits && (toexpand = (seen & ~expanded))) /* not == */
{
i = FIRSTBITNZ(toexpand);
expanded |= bit[i];
seen |= g[i];
}
return seen == allbits;
}
static boolean
connpreprune(graph *g, int n, int maxn) /* This function speeds up the generation of connected graphs
with not many edges. */
{
setword notvisited,queue; int ne,nc,i;
if (n == maxn || maxe - maxn >= 5) return0;
ne = 0; for (i = 0; i < n; ++i) ne += POPCOUNT(g[i]);
ne /= 2;
static boolean
isbiconnected(graph *g, int n) /* test if g is biconnected */
{ int sp,v,w;
setword sw;
setword visited; int numvis,num[MAXN],lp[MAXN],stack[MAXN];
static boolean
distinvar(graph *g, int *invar, int n) /* make distance invariant
return FALSE if n-1 not maximal else return TRUE */
{ int w;
setword workset,frontier;
setword sofar; int inv,d,v;
for (v = n-1; v >= 0; --v)
{
inv = 0;
sofar = frontier = bit[v]; for (d = 1; frontier != 0; ++d)
{
workset = 0;
inv += POPCOUNT(frontier) ^ (0x57 + d); while (frontier)
{
w = FIRSTBITNZ(frontier);
frontier ^= bit[w];
workset |= g[w];
}
frontier = workset & ~sofar;
sofar |= frontier;
}
invar[v] = inv; if (v < n-1 && inv > invar[n-1]) returnFALSE;
} returnTRUE;
}
staticvoid
makebgraph(graph *g, xword *h, int n) /* make x-format graph of different colour graph */
{
setword seen1,seen2,expanded,w;
setword restv;
xword xseen1,xseen2; int i;
restv = 0; for (i = 0; i < n; ++i) restv |= bit[i];
seen1 = seen2 = 0;
expanded = 0;
while (TRUE)
{ if ((w = ((seen1 | seen2) & ~expanded)) == 0)
{
xseen1 = 0;
w = seen1; while (w)
{
i = FIRSTBITNZ(w);
w ^= bit[i];
xseen1 |= XBIT(i);
}
xseen2 = 0;
w = seen2; while (w)
{
i = FIRSTBITNZ(w);
w ^= bit[i];
xseen2 |= XBIT(i);
}
w = seen1; while (w)
{
i = FIRSTBITNZ(w);
w ^= bit[i];
h[i] = xseen2;
}
w = seen2; while (w)
{
i = FIRSTBITNZ(w);
w ^= bit[i];
h[i] = xseen1;
}
restv &= ~(seen1 | seen2); if (restv == 0) return;
i = FIRSTBITNZ(restv);
seen1 = bit[i];
seen2 = 0;
} else
i = FIRSTBITNZ(w);
staticvoid
makeb6graph(graph *g, xword *h, int n) /* make x-format bipartite girth 6 graph */
{
setword w,x;
xword hi; int i,j;
makebgraph(g,h,n);
for (i = 0; i < n; ++i)
{
w = g[i];
x = 0; while (w)
{
j = FIRSTBITNZ(w);
w ^= bit[j];
x |= g[j];
}
x &= ~bit[i];
hi = h[i]; while (x)
{
j = FIRSTBITNZ(x);
x ^= bit[j];
hi |= XBIT(j);
}
h[i] = hi;
}
}
staticvoid
makesgraph(graph *g, xword *h, int n) /* make x-format square graph */
{
setword w,x;
xword hi; int i,j;
for (i = 0; i < n; ++i)
{
w = g[i];
x = 0; while (w)
{
j = FIRSTBITNZ(w);
w ^= bit[j];
x |= g[j];
}
x &= ~bit[i];
hi = 0; while (x)
{
j = FIRSTBITNZ(x);
x ^= bit[j];
hi |= XBIT(j);
}
h[i] = hi;
}
}
staticvoid
makeg5graph(graph *g, xword *h, int n) /* make x-format girth-5 graph */
{
setword w,x;
xword hi; int i,j;
for (i = 0; i < n; ++i)
{
w = g[i];
x = g[i]; while (w)
{
j = FIRSTBITNZ(w);
w ^= bit[j];
x |= g[j];
}
x &= ~bit[i];
hi = 0; while (x)
{
j = FIRSTBITNZ(x);
x ^= bit[j];
hi |= XBIT(j);
}
h[i] = hi;
}
}
staticvoid
makeleveldata(boolean restricted) /* make the level data for each level */
{ long h; int n,nn;
xword ncj;
leveldata *d;
xword *xcard,*xinv;
xword *xset,xw,nxsets;
xword cw;
xword i,ilast,j;
size_t tttn;
for (n = 1; n < maxn; ++n)
{
nn = maxdeg <= n ? maxdeg : n;
ncj = nxsets = 1; for (j = 1; j <= nn; ++j)
{
ncj = arith(ncj,n-j+1,j);
nxsets += ncj;
}
staticvoid
userautomproc(int count, int *p, int *orbits, int numorbits, int stabvertex, int n) /* form orbits on powerset of VG
called by nauty; operates on data[n] */
{
xword i,j1,j2,moved,pi,pxi;
xword lo,hi;
xword *xorb,*xinv,*xset,w;
xorb = data[n].xorb;
xset = data[n].xset;
xinv = data[n].xinv;
lo = data[n].lo;
hi = data[n].hi;
if (count == 1) /* first automorphism */ for (i = lo; i < hi; ++i) xorb[i] = i;
moved = 0; for (i = 0; i < n; ++i) if (p[i] != i) moved |= XBIT(i);
for (i = lo; i < hi; ++i)
{ if ((w = xset[i] & moved) == 0) continue;
pxi = xset[i] & ~moved; while (w)
{
j1 = XNEXTBIT(w);
w ^= XBIT(j1);
pxi |= XBIT(p[j1]);
}
pi = xinv[pxi];
j1 = xorb[i]; while (xorb[j1] != j1) j1 = xorb[j1];
j2 = xorb[pi]; while (xorb[j2] != j2) j2 = xorb[j2];
staticvoid
userautomprocb(int count, int *p, int *orbits, int numorbits, int stabvertex, int n) /* form orbits on powerset of VG
called by nauty; operates on data[n] */
{
xword j1,j2,moved,pi,pxi,lo,hi,x;
xword i,*xorb,*xx,w,xlim,xlb;
xorb = data[n].xorb;
xx = data[n].xx;
xlim = data[n].xlim;
if (count == 1) /* first automorphism */
{
j1 = 0;
xlb = data[n].xlb;
for (i = 0; i < xlim; ++i)
{
x = xx[i]; if (XPOPCOUNT(x) >= xlb)
{
xx[j1] = x;
xorb[j1] = j1;
++j1;
}
}
data[n].xlim = xlim = j1;
}
moved = 0; for (i = 0; i < n; ++i) if (p[i] != i) moved |= XBIT(i);
for (i = 0; i < xlim; ++i)
{ if ((w = xx[i] & moved) == 0) continue;
pxi = xx[i] & ~moved; while (w)
{
j1 = XNEXTBIT(w);
w ^= XBIT(j1);
pxi |= XBIT(p[j1]);
} /* pi = position of pxi */
lo = 0;
hi = xlim - 1;
for (;;)
{
pi = (lo + hi) >> 1; if (xx[pi] == pxi) break; elseif (xx[pi] < pxi) lo = pi + 1; else hi = pi - 1;
}
j1 = xorb[i]; while (xorb[j1] != j1) j1 = xorb[j1];
j2 = xorb[pi]; while (xorb[j2] != j2) j2 = xorb[j2];
staticvoid
refinex(graph *g, int *lab, int *ptn, int level, int *numcells, int *count, set *active, boolean goodret, int *code, int m, int n)
{ int i,c1,c2,labc1;
setword x,lact; int split1,split2,cell1,cell2; int cnt,bmin,bmax;
set *gptr;
setword workset; int workperm[MAXN]; int bucket[MAXN+2];
if (n == 1)
{
*code = 1; return;
}
*code = 0;
lact = *active;
while (*numcells < n && lact)
{
TAKEBIT(split1,lact);
for (split2 = split1; ptn[split2] > 0; ++split2) {} if (split1 == split2) /* trivial splitting cell */
{
gptr = GRAPHROW(g,lab[split1],1); for (cell1 = 0; cell1 < n; cell1 = cell2 + 1)
{ for (cell2 = cell1; ptn[cell2] > 0; ++cell2) {} if (cell1 == cell2) continue;
static boolean
hasclaw(graph *g, int n, int maxn) /* Return TRUE if there is a claw (induced K(1,3)) involving the last vertex */
{ int i,j,k;
setword x,y;
x = g[n-1]; while (x)
{
TAKEBIT(j,x);
y = x & ~g[j]; while (y)
{
TAKEBIT(k,y); if (y & ~g[k]) returnTRUE;
}
}
x = g[n-1]; while (x)
{
TAKEBIT(i,x);
y = g[i] & ~(bit[n-1]|g[n-1]); while (y)
{
TAKEBIT(k,y); if (y & ~g[k]) returnTRUE;
}
}
returnFALSE;
}
static boolean
hasinducedpath(graph *g, int start, setword body, setword last) /* return TRUE if there is an induced path in g starting at start, extraverticeswithinbodyandendinginlast.
* {start}, body and last should be disjoint. */
{
setword gs,w; int i;
gs = g[start]; if ((gs & last)) returnTRUE;
w = gs & body; while (w)
{
TAKEBIT(i,w); if (hasinducedpath(g,i,body&~gs,last&~bit[i]&~gs)) returnTRUE;
}
returnFALSE;
}
static boolean
notchordal(graph *g, int n, int maxn) /* g is a graph of order n. Return TRUE if there is a chordlesscycleoflengthatleast4thatincludes
the last vertex. */
{
setword all,gn,w,gs; int v,s;
all = ALLMASK(n);
gn = g[n-1];
while (gn)
{
TAKEBIT(v,gn);
gs = g[v] & ~(bit[n-1]|g[n-1]); while (gs)
{
TAKEBIT(s,gs); if (hasinducedpath(g,s,all&~(g[n-1]|g[v]),gn&~g[v])) returnTRUE;
}
}
returnFALSE;
}
static boolean
notsplit(graph *g, int n, int maxn) /* g is a graph of order n. Return TRUE if either g or its complementhasachordlesscycleoflengthatleast4that
includes the last vertex. */
{
graph gc[MAXN];
setword w; int i;
if (notchordal(g,n,maxn)) returnTRUE;
w = ALLMASK(n); for (i = 0; i < n; ++i) gc[i] = g[i] ^ w ^ bit[i]; return notchordal(gc,n,maxn);
}
static boolean
hasinducedoddpath(graph *g, int start, setword body, setword last, boolean parity) /* return TRUE if there is an induced path of odd length >= 3 in g startingatstart,extraverticeswithinbodyandendinginlast.
{start}, body and last should be disjoint. */
{
setword gs,w; int i;
gs = g[start]; if ((gs & last) && parity) returnTRUE;
w = gs & body; while (w)
{
TAKEBIT(i,w); if (hasinducedoddpath(g,i,body&~gs,last&~bit[i]&~gs,!parity)) returnTRUE;
}
returnFALSE;
}
static boolean
oddchordless(graph *g, int n, int maxn) /* g is a graph of order n. Return TRUE if there is a chordlesscycleofoddlengthatleast5thatincludes
the last vertex. */
{
setword all,gn,w,gs; int v,s;
all = ALLMASK(n);
gn = g[n-1];
while (gn)
{
TAKEBIT(v,gn);
gs = g[v] & ~(bit[n-1]|g[n-1]); while (gs)
{
TAKEBIT(s,gs); if (hasinducedoddpath(g,s,all&~(g[n-1]|g[v]),gn&~g[v],FALSE)) returnTRUE;
}
}
returnFALSE;
}
static boolean
notperfect(graph *g, int n, int maxn) /* g is a graph of order n. Return TRUE if either g or its complementhasachordlesscycleofoddlengthatleast5that
includes the last vertex. I.e., if it is not perfect. */
{
graph gc[MAXN];
setword w; int i;
if (oddchordless(g,n,maxn)) returnTRUE;
w = ALLMASK(n); for (i = 0; i < n; ++i) gc[i] = g[i] ^ w ^ bit[i]; return oddchordless(gc,n,maxn);
}
static boolean
accept1(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid) /* decide if n in theta(g+x) - version for n+1 < maxn */
{ int i; int lab[MAXN],ptn[MAXN],orbits[MAXN]; int count[MAXN];
graph h[MAXN];
xword xw; int nx,numcells,code; int i0,i1,degn;
set active[MAXM];
statsblk stats; static TLS_ATTR DEFAULTOPTIONS_GRAPH(options);
setword workspace[50];
#ifdef INSTRUMENT
++a1calls; #endif
nx = n + 1; for (i = 0; i < n; ++i) gx[i] = g[i];
gx[n] = 0;
deg[n] = degn = XPOPCOUNT(x);
xw = x; while (xw)
{
i = XNEXTBIT(xw);
xw ^= XBIT(i);
gx[i] |= bit[n];
gx[n] |= bit[i];
++deg[i];
}
if (k4free && hask4(gx,n+1,maxn)) returnFALSE; if (clawfree && hasclaw(gx,n+1,maxn)) returnFALSE; #ifdef PREPRUNE if (PREPRUNE(gx,n+1,maxn)) returnFALSE; #endif if (connec == 2 && n+2 == maxn && !isconnected(gx,n+1)) returnFALSE; if (((connec ==2 && n+2 < maxn) || (connec == 1 && n+2 <= maxn))
&& connpreprune(gx,n+1,maxn)) returnFALSE;
static boolean
accept1b(graph *g, int n, xword x, graph *gx, int *deg, boolean *rigid, void (*makeh)(graph*,xword*,int)) /* decide if n in theta(g+x) -- version for n+1 < maxn */
{ int i,v;
xword z,hv,bitv,ixx; int lab[MAXN],ptn[MAXN],orbits[MAXN]; int count[MAXN];
graph gc[MAXN];
xword h[MAXN],xw,jxx,kxx,*xx; int nx,numcells,code; int i0,i1,degn,xubx;
set active[MAXM];
statsblk stats; static TLS_ATTR DEFAULTOPTIONS_GRAPH(options);
setword workspace[50];
#ifdef INSTRUMENT
++a1calls; #endif
nx = n + 1; for (i = 0; i < n; ++i) gx[i] = g[i];
gx[n] = 0;
deg[n] = degn = XPOPCOUNT(x);
xw = x; while (xw)
{
i = XNEXTBIT(xw);
xw ^= XBIT(i);
gx[i] |= bit[n];
gx[n] |= bit[i];
++deg[i];
}
if (k4free && hask4(gx,n+1,maxn)) returnFALSE; if (clawfree && hasclaw(gx,n+1,maxn)) returnFALSE; #ifdef PREPRUNE if (PREPRUNE(gx,n+1,maxn)) returnFALSE; #endif if (connec == 2 && n+2 == maxn && !isconnected(gx,n+1)) returnFALSE; if (((connec ==2 && n+2 < maxn) || (connec == 1 && n+2 <= maxe))
&& connpreprune(gx,n+1,maxn)) returnFALSE;
static boolean
accept2(graph *g, int n, xword x, graph *gx, int *deg, boolean nuniq) /* decide if n in theta(g+x) -- version for n+1 == maxn */
{ int i; int lab[MAXN],ptn[MAXN],orbits[MAXN]; int degx[MAXN],invar[MAXN];
setword vmax,gv; int qn,qv; int count[MAXN];
xword xw; int nx,numcells,code; int degn,i0,i1,j,j0,j1;
set active[MAXM];
statsblk stats; static TLS_ATTR DEFAULTOPTIONS_GRAPH(options);
setword workspace[50];
boolean cheapacc;
#ifdef INSTRUMENT
++a2calls; if (nuniq) ++a2uniq; #endif
nx = n + 1; for (i = 0; i < n; ++i)
{
gx[i] = g[i];
degx[i] = deg[i];
}
gx[n] = 0;
degx[n] = degn = XPOPCOUNT(x);
xw = x; while (xw)
{
i = XNEXTBIT(xw);
xw ^= XBIT(i);
gx[i] |= bit[n];
gx[n] |= bit[i];
++degx[i];
}
if (k4free && hask4(gx,n+1,maxn)) returnFALSE; if (clawfree && hasclaw(gx,n+1,maxn)) returnFALSE; #ifdef PREPRUNE if (PREPRUNE(gx,n+1,maxn)) returnFALSE; #endif if (connec == 2 && n+2 == maxn && !isconnected(gx,n+1)) returnFALSE; if (((connec ==2 && n+2 < maxn) || (connec == 1 && n+2 <= maxe))
&& connpreprune(gx,n+1,maxn)) returnFALSE;
if (nuniq)
{ #ifdef INSTRUMENT
++a2succs; #endif if (canonise) makecanon(gx,gcan,nx); returnTRUE;
}
i0 = 0;
i1 = n; for (i = 0; i < nx; ++i)
{ if (degx[i] == degn) lab[i1--] = i; else lab[i0++] = i;
ptn[i] = 1;
}
ptn[n] = 0; if (i0 == 0)
{
numcells = 1;
active[0] = bit[0];
staticvoid
xbnds(int n, int ne, int dmax) /* find bounds on extension degree; store answer in data[*].* */
{ int xlb,xub,d,nn,m,xc;
xlb = n == 1 ? 0 : (dmax > (2*ne + n - 2)/(n - 1) ?
dmax : (2*ne + n - 2)/(n - 1));
xub = n < maxdeg ? n : maxdeg;
for (xc = xub; xc >= xlb; --xc)
{
d = xc;
m = ne + d; for (nn = n+1; nn < maxn; ++nn)
{ if (d < (2*m + nn - 2)/(nn - 1)) d = (2*m + nn - 2)/(nn - 1);
m += d;
} if (d > maxdeg || m > maxe) xub = xc - 1; elsebreak;
}
if (ne + xlb < mine) for (xc = xlb; xc <= xub; ++xc)
{
m = ne + xc; for (nn = n + 1; nn < maxn; ++nn)
m += maxdeg < nn ? maxdeg : nn; if (m < mine) xlb = xc + 1; elsebreak;
}
staticvoid
spaextend(graph *g, int n, int *deg, int ne, boolean rigid, int xlb, int xub, void (*makeh)(graph*,xword*,int)) /* extend from n to n+1 -- version for restricted graphs */
{
xword x,d,dlow;
xword xlim,*xorb; int xc,nx,i,j,dmax,dcrit,xlbx,xubx;
graph gx[MAXN];
xword *xx,ixx; int degx[MAXN];
boolean rigidx;
#ifdef INSTRUMENT
boolean haschild;
haschild = FALSE; if (rigid) ++rigidnodes[n]; #endif
++nodes[n];
nx = n + 1;
dmax = deg[n-1];
dcrit = mindeg - maxn + n;
d = dlow = 0; for (i = 0; i < n; ++i)
{ if (deg[i] == dmax) d |= XBIT(i); if (deg[i] == dcrit) dlow |= XBIT(i);
}
if (xlb == dmax && XPOPCOUNT(d) + dmax > n) ++xlb; if (nx == maxn && xlb < mindeg) xlb = mindeg; if (xlb > xub) return;
if (splitgraph && notsplit(g,n,maxn)) return; if (chordal && notchordal(g,n,maxn)) return; if (perfect && notperfect(g,n,maxn)) return; #ifdef PRUNE if (PRUNE(g,n,maxn)) return; #endif
xorb = data[n].xorb;
xx = data[n].xx;
xlim = data[n].xlim;
staticvoid
genextend(graph *g, int n, int *deg, int ne, boolean rigid, int xlb, int xub) /* extend from n to n+1 -- version for general graphs */
{
xword x,d,dlow;
xword *xset,*xcard,*xorb;
xword i,imin,imax; int nx,xc,j,dmax,dcrit; int xlbx,xubx;
graph gx[MAXN]; int degx[MAXN];
boolean rigidx;
#ifdef INSTRUMENT
boolean haschild;
haschild = FALSE; if (rigid) ++rigidnodes[n]; #endif
++nodes[n];
nx = n + 1;
dmax = deg[n-1];
dcrit = mindeg - maxn + n;
d = dlow = 0; for (i = 0; i < n; ++i)
{ if (deg[i] == dmax) d |= XBIT(i); if (deg[i] == dcrit) dlow |= XBIT(i);
}
if (xlb == dmax && XPOPCOUNT(d) + dmax > n) ++xlb; if (nx == maxn && xlb < mindeg) xlb = mindeg; if (xlb > xub) return;
if (splitgraph && notsplit(g,n,maxn)) return; if (chordal && notchordal(g,n,maxn)) return; if (perfect && notperfect(g,n,maxn)) return; #ifdef PRUNE if (PRUNE(g,n,maxn)) return; #endif
if (argnum == 0)
badargs = TRUE; elseif (maxn < 1 || maxn > MAXN || maxn > 64)
{
fprintf(stderr,">E geng: n must be in the range 1..%d\n",MAXN);
badargs = TRUE;
}
if (gotx)
{ if (multiplicity < 3 * mod || multiplicity > 999999999)
gt_abort(">E geng: -x value must be in [3*mod,10^9-1]\n");
} else
{
multiplicity = PRUNEMULT * mod; if (multiplicity / PRUNEMULT != mod)
gt_abort(">E geng: mod value is too large\n");
}
if (!gotX) splitlevinc = 0;
if (!quiet)
{
msg[0] = '\0'; if (strlen(argv[0]) > 75)
fprintf(stderr,">A %s",argv[0]); else
CATMSG1(">A %s",argv[0]);
if (!quiet)
{
fprintf(stderr,">Z " COUNTER_FMT " graphs generated in %3.2f sec\n",
nout,t2-t1);
}
#ifdef GENG_MAIN for (i = 1; i < maxn; ++i) if (sparse)
{
free(data[i].xorb);
free(data[i].xx);
} else
{
free(data[i].xorb);
free(data[i].xset);
free(data[i].xinv);
free(data[i].xcard);
} return0; #else exit(0); #endif
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.94Bemerkung:
(vorverarbeitet am 2026-06-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.