#define HELPTEXT \ " For each edge nonedge e, output G+e if it satisfies certain conditions\n\
\n\
The output file has a header ifand only if the input file does.\n\
\n\
-l Canonically label outputs\n\
-D# Specify an upper bound on the maximum degree of the output\n\
-b Output has no new cycles of odd length\n\
-t Output has no new 3-cycle if input doesn't\n\
-f Output has no new 4-cycle if input doesn't\n\
-F Output has no new 5-cycle if input doesn't\n\
-z# Output has no new cycles of length less than #\n\
-btfFz can be used in arbitrary combinations\n\
-q Suppress auxiliary information\n"
staticvoid
no3path(graph *g, int m, int n, int v, int *dist) /* For each i, set dist[i]=0 if there is a 3-path from v to i */
{
set *gv,*gv1,*gv2; int v1,v2,v3;
gv = GRAPHROW(g,v,m); for (v1 = -1; (v1 = nextelement(gv,m,v1)) >= 0; )
{
gv1 = GRAPHROW(g,v1,m); for (v2 = -1; (v2 = nextelement(gv1,m,v2)) >= 0; )
{ if (v2 == v) continue;
gv2 = GRAPHROW(g,v2,m); for (v3 = -1; (v3 = nextelement(gv2,m,v3)) >= 0; ) if (v3 != v && v3 != v1) dist[v3] = 0;
}
}
}
staticvoid
no4path(graph *g, int m, int n, int v, int *dist) /* For each i, set dist[i]=0 if there is a 4-path from v to i */
{
set *gv,*gv1,*gv2,*gv3; int v1,v2,v3,v4;
gv = GRAPHROW(g,v,m); for (v1 = -1; (v1 = nextelement(gv,m,v1)) >= 0; )
{
gv1 = GRAPHROW(g,v1,m); for (v2 = -1; (v2 = nextelement(gv1,m,v2)) >= 0; )
{ if (v2 == v) continue;
gv2 = GRAPHROW(g,v2,m); for (v3 = -1; (v3 = nextelement(gv2,m,v3)) >= 0; )
{ if (v3 == v || v3 == v1) continue;
gv3 = GRAPHROW(g,v3,m); for (v4 = -1; (v4 = nextelement(gv3,m,v4)) >= 0; ) if (v4 != v && v4 != v1 && v4 != v2) dist[v4] = 0;
}
}
}
}
actmaxdeg = n; for (v = 0, gv = g; v < n; ++v, gv += m)
{
degv = 0; for (i = 0; i < m; ++i)
degv += POPCOUNT(gv[i]); if (degv < actmaxdeg) actmaxdeg = degv;
deg[v] = degv;
}
if (actmaxdeg > maxdeg) continue;
okdist[0] = okdist[1] = FALSE; for (i = 2; i <= n; ++i) okdist[i] = TRUE;
if (bswitch) for (i = 2; i < n; i += 2) okdist[i] = FALSE;
if (tswitch && n >= 3) okdist[2] = FALSE; if (fswitch && n >= 4) okdist[3] = FALSE; if (Fswitch && n >= 5) okdist[4] = FALSE; if (zswitch) for (i = 2; i < mincycle-1 && i < n; ++i) okdist[i] = FALSE;
for (v = 0, gv = g; v < n-1; ++v, gv += m)
{ if (deg[v] >= maxdeg) continue;
find_dist(g,m,n,v,dist);
for (w = v+1; w < n; ++w)
dist[w] = okdist[dist[w]] && (deg[w] < maxdeg);
if (fswitch) no3path(g,m,n,v,dist); if (Fswitch) no4path(g,m,n,v,dist);
for (w = v+1; w < n; ++w)
{ if (!dist[w]) continue;
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.