/* Copyright (c) 2003-2015 Tommi Junttila Released under the GNU Lesser General Public License version 3.
This file is part of bliss.
bliss is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License.
bliss is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with bliss. If not, see <http://www.gnu.org/licenses/>.
*/
// fprintf(fp, "bliss version %s (compiled "__DATE__")\n", bliss_digraphs::version);
fprintf(fp, "Copyright 2003-2015 Tommi Junttila\n");
fprintf(fp, "\n" "Usage: %s [options] []\n" "\n" " -directed the input graph is directed\n" " -can compute canonical form\n" " -ocan=f compute canonical form and output it in file f\n" " -v=N set verbose level to N [N >= 0, default: 1]\n" " -sh=X select splitting heuristics, where X is\n" " f first non-singleton cell\n" " fl first largest non-singleton cell\n" " fs first smallest non-singleton cell\n" " fm first maximally non-trivially connected\n" " non-singleton cell\n" " flm first largest maximally non-trivially connected\n" " non-singleton cell\n" " fsm first smallest maximally non-trivially connected\n" " non-singleton cell [default]\n" " -fr=X use failure recording? [X=y/n, default: y]\n" " -cr=X use component recursion? [X=y/n, default: y]\n" " -version print the version number and exit\n" " -help print this help and exit\n"
,program_name
);
}
/** * The hook function that prints the found automorphisms. * \a param must be a file descriptor (FILE *).
*/ staticvoid
report_aut(void* param, constunsignedint n, constunsignedint* aut)
{
assert(param);
fprintf((FILE*)param, "Generator: ");
bliss_digraphs::print_permutation((FILE*)param, n, aut, 1);
fprintf((FILE*)param, "\n");
}
/* Output an error message and exit the whole program */ staticvoid
_fatal(constchar* fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap); fprintf(stderr, "\n");
va_end(ap); exit(1);
}
int
main(constint argc, constchar** argv)
{
bliss_digraphs::Timer timer;
bliss_digraphs::AbstractGraph* g = 0;
/* Open the input file */
FILE* infile = stdin; if(infilename)
{
infile = fopen(infilename, "r"); if(!infile)
_fatal("Cannot not open `%s' for input, aborting", infilename);
}
/* Read the graph from the file */ if(opt_directed)
{ /* Read directed graph in the DIMACS format */
g = bliss_digraphs::Digraph::read_dimacs(infile);
} else
{ /* Read undirected graph in the DIMACS format */
g = bliss_digraphs::Graph::read_dimacs(infile);
}
if(infile != stdin)
fclose(infile);
if(!g)
_fatal("Failed to read the graph, aborting");
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.