#define HELPTEXT \ " For each input, write to output if planar.\n\
\n\
The output file has a header if and only if the input file does.\n\
\n\
-v Write non-planar graphs instead of planar graphs\n\
-V Write report on every input\n\
-u Don't write anything, just count\n\
-p Write in planar_code if planar (without -p, same format as input)\n\
-k Follow each non-planar output with an obstruction in sparse6\n\
format (implies -v, incompatible with -p)\n\
-n Suppress checking of the result\n\
-q Suppress auxiliary information\n\
\n\ This program permits multiple edges and loops\n"
if (bytes == 1)
{
j = 0;
PUT1(n);
for (i = 0; i < n; ++i)
{
k = k0 = VR[i].first_edge;
if (k != NIL) do
{
PUT1(A[ER[k].in_adjl].end_vertex+1);
k = ER[k].next;
} while (k != k0);
PUT1(0);
}
} else if (bytes == 2)
{
j = 0;
PUT1(0);
PUT2(n);
for (i = 0; i < n; ++i)
{
k = k0 = VR[i].first_edge;
if (k != NIL) do
{
PUT2(A[ER[k].in_adjl].end_vertex+1);
k = ER[k].next;
} while (k != k0);
PUT2(0);
}
} else
{
j = 0;
PUT1(0);
PUT2(0);
PUT4(n);
for (i = 0; i < n; ++i)
{
k = k0 = VR[i].first_edge;
if (k != NIL) do
{
PUT4(A[ER[k].in_adjl].end_vertex+1);
k = ER[k].next;
} while (k != k0);
PUT4(0);
}
}
if (fwrite((void*)buff,1,len,f) != len)
{
fprintf(stderr,">E write_planarcode : error on writing\n");
ABORT(">E write_planarcode");
}
}
ans = sparseg_adjl_is_planar(V, n, A, c,
&dfs_tree, &back_edges, &mult_edges,
&embed_graph, &edge_pos, &v, &w);
if (!ans && nonplanarcheck)
{
embedg_obstruction(V, A, dfs_tree, back_edges,
embed_graph, n, &edge_pos,
v, w, VR, AR, nbr_e_obs);
} else if (planarcheck)
{
embedg_embedding(V, A, embed_graph, n, e, *c, edge_pos, mult_edges,
VR, ER);
}
if (badargs)
{
fprintf(stderr,">E Usage: %s\n",USAGE);
exit(1);
}
if (planarcode && nonplanar)
{
fprintf(stderr,">E planarg: -p and -v are incompatible\n");
exit(1);
}
if (!quiet)
{
fprintf(stderr,">A planarg");
if (nonplanar||planarcode||nowrite||nocheck)
fprintf(stderr," -");
if (nonplanar) fprintf(stderr,"v");
if (nowrite) fprintf(stderr,"u");
if (planarcode) fprintf(stderr,"p");
if (nocheck) fprintf(stderr,"n");
if (argnum > 0) fprintf(stderr," %s",infilename);
if (argnum > 1) fprintf(stderr," %s",outfilename);
fprintf(stderr,"\n");
fflush(stderr);
}
if (infilename && infilename[0] == '-') infilename = NULL;
infile = opengraphfile(infilename,&codetype,FALSE,1);
if (!infile) exit(1);
if (!infilename) infilename = "stdin";
NODIGRAPHSYET(codetype);
if (!nowrite)
{
if (!outfilename || outfilename[0] == '-')
{
outfilename = "stdout";
outfile = stdout;
} else if ((outfile = fopen(outfilename,"w")) == NULL)
{
fprintf(stderr,"Can't open output file %s\n",outfilename);
gt_abort(NULL);
}
if (planarcode) outcode = PLANARCODE; else if (codetype&SPARSE6) outcode = SPARSE6; else outcode = GRAPH6;
if (outcode == PLANARCODE)
writeline(outfile,PLANARCODE_HEADER); else if (codetype&HAS_HEADER)
{
if (outcode == SPARSE6) writeline(outfile,SPARSE6_HEADER); else writeline(outfile,GRAPH6_HEADER);
}
}
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.