#define HELPTEXT \ " Take the underlying undirected graphs of a file of graphs.\n\
\n\
The output file has no header.\n\
Undirected graphs are passed through without change, while\n\
Underlying graphs of digraphs are written in sparse6 format.\n\
\n\
-q Suppress auxiliary information.\n"
staticvoid
underlying(graph *g, int m, int n) /* Replace g by its underlying graph */
{ int i,j;
graph *gi,*gj;
for (i = 0, gi = g; i < n; ++i, gi += m) for (j = i+1, gj = gi+m; j < n; ++j, gj += m) if (ISELEMENT(gi,j) || ISELEMENT(gj,i))
{
ADDELEMENT(gi,j);
ADDELEMENT(gj,i);
}
}
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.