#define HELPTEXT \ " The g-th generation ancestor of a graph is the graph obtained by removing\n\
the final g vertices. The 0-th generation ancestor is the graph itself.\n\ For each input graph, write the ancestors whose generation is given by the\n\
g argument. No zero-sized graphs are written.\n\
Output is always in graph6 format.\n\
\n\
The output file has a header ifand only if the input file does.\n\
\n\
-g# -g#:# Specify a generation or range of generations (default: all)\n\
-q Suppress auxiliary information\n"
staticvoid
writegenerations(FILE *f, graph *g, int m, int n, long mingen, long maxgen,
boolean digraph, int outcode) /* write all the specified generations (mingen and maxgen are already sensible */ /* g is destroyed */
{ int i,gen;
set *gi;
for (gen = 0; gen <= maxgen; ++gen)
{ if (gen >= mingen)
{ if (digraph) writed6(f,g,m,n); elseif (outcode == SPARSE6) writes6(f,g,m,n); else writeg6(f,g,m,n);
++nout;
} for (i = 0, gi = g; i < n-1; ++i, gi += m) DELELEMENT(gi,n-1);
--n;
}
}
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 ist noch experimentell.