#define HELPTEXT \ " Read graphs in matrix format.\n\
\n\
-n# Set the initial graph order to # (no default).\n\ This can be overridden in the input.\n\
-g Write the output in graph6 format (default).\n\
-s Write the output in sparse6 format.\n\
-z Write the output in digraph6 format.\n\
-h Write a header (according to -g or -s).\n\
-w Don't warn about loops (which are suppressed for -g)\n\
-q Suppress auxiliary information.\n\
-o# Treat digit # as 1 and other digits as 0.\n\
\n\
Input consists of a sequence of commands restricted to:\n\
\n\
n=# set number of vertices (no default)\n\
The = is optional.\n\
m Matrix to follow\n\
An 'm' is also assumed if a digit is encountered.\n\
M Complement of matrix to follow (as m)\n\
t Upper triangle of matrix to follow, row by row\n\
excluding the diagonal.\n\
T Complement of upper trangle to follow (as t)\n\
s Upper triangle of matrix to follow, row by row\n\
excluding the diagonal; lower triangle is complement.\n\
q exit (optional)\n"
if (hswitch)
{ if (outcode == SPARSE6) writeline(outfile,SPARSE6_HEADER); elseif (outcode == DIGRAPH6) writeline(outfile,DIGRAPH6_HEADER); else writeline(outfile,GRAPH6_HEADER);
}
#if MAXN if (nswitch && n > MAXN)
{
gt_abort(">E amtog: value of -n too large\n"); exit(2);
} #else if (nswitch)
{
m = (n + WORDSIZE - 1) / WORDSIZE;
DYNALLOC2(graph,g,g_sz,n,m,"amtog");
} #endif
/* perform scanning required */
warn = FALSE;
nin = 0; while (fscanf(infile,"%1s",s) == 1)
{ if (s[0] == 'n')
{ if (fscanf(infile,"=%d",&n) != 1)
{
gt_abort(">E amtog: invalid n=# command\n"); exit(2);
}
m = (n + WORDSIZE - 1) / WORDSIZE; #if MAXN if (n < 1 || n > MAXN || m > MAXM)
gt_abort(">E amtog: n<0 or n,m too big\n"); #else
DYNALLOC2(graph,g,g_sz,n,m,"amtog"); #endif
} elseif (s[0] == 'm' || s[0] == 'M' || s[0] == 't' ||
s[0] == 'T' || s[0] == 's' || s[0] == '0' ||
s[0] == '1' || (oswitch && isdigit(s[0])))
{ if (n < 0)
{
fprintf(stderr, ">E amtog: matrix found before n is defined\n"); exit(2);
} if (isdigit(s[0])) ungetc(s[0],infile);
m = (n + WORDSIZE - 1) / WORDSIZE;
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.