Initial import.
This commit is contained in:
parent
7774d0076b
commit
e308704525
|
@ -0,0 +1 @@
|
||||||
|
/nauty26r5.tar.gz
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,36 @@
|
||||||
|
Description: explicit extern declaration for gt_numorbits
|
||||||
|
Origin: debian
|
||||||
|
Author: Jerome Benoit <calculus@rezozer.net>
|
||||||
|
Last-Update: 2013-11-22
|
||||||
|
|
||||||
|
--- a/labelg.c
|
||||||
|
+++ b/labelg.c
|
||||||
|
@@ -88,7 +88,6 @@
|
||||||
|
|
||||||
|
static nauty_counter orbtotal;
|
||||||
|
static double unorbtotal;
|
||||||
|
-extern int gt_numorbits;
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
--- a/gtools-h.in
|
||||||
|
+++ b/gtools-h.in
|
||||||
|
@@ -273,6 +273,7 @@
|
||||||
|
extern TLS_ATTR char *readg_line;
|
||||||
|
extern TLS_ATTR size_t ogf_linelen;
|
||||||
|
extern TLS_ATTR boolean is_pipe;
|
||||||
|
+extern TLS_ATTR int gt_numorbits;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
--- a/gtnauty.c
|
||||||
|
+++ b/gtnauty.c
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
static int fuzz2[] = {006532,070236,035523,062437};
|
||||||
|
#define FUZZ2(x) ((x) ^ fuzz2[(x)&3])
|
||||||
|
|
||||||
|
-int gt_numorbits;
|
||||||
|
+TLS_ATTR int gt_numorbits;
|
||||||
|
|
||||||
|
#ifdef REFINE
|
||||||
|
void REFINE(graph*,int*,int*,int,int*,int*,set*,int*,int,int);
|
|
@ -0,0 +1,18 @@
|
||||||
|
Description: explicit extern declaration in naurng.h
|
||||||
|
Origin: debian
|
||||||
|
Author: Jerome Benoit <calculus@rezozer.net>
|
||||||
|
Last-Update: 2013-11-22
|
||||||
|
|
||||||
|
--- a/naurng.h
|
||||||
|
+++ b/naurng.h
|
||||||
|
@@ -18,8 +18,8 @@
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-void ran_init(long seed);
|
||||||
|
-long ran_nextran(void);
|
||||||
|
+extern void ran_init(long seed);
|
||||||
|
+extern long ran_nextran(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
|
@ -0,0 +1,389 @@
|
||||||
|
Description: format usages and helps
|
||||||
|
Attempt to format usages and helps of the invited
|
||||||
|
programs wrt to the original gtools.
|
||||||
|
Origin: debian
|
||||||
|
Author: Jerome Benoit <calculus@rezozer.net>
|
||||||
|
Last-Update: 2016-03-19
|
||||||
|
|
||||||
|
--- a/watercluster2.c
|
||||||
|
+++ b/watercluster2.c
|
||||||
|
@@ -1,54 +1,58 @@
|
||||||
|
// cc -O4 -o water2 -DWORDSIZE=32 -DMAXN=WORDSIZE nauty.c naugraph.c nautil.c gtools.c schreier.c naurng.c watercluster2.c
|
||||||
|
|
||||||
|
-/*
|
||||||
|
-Reads graphs in g6 code or multicode (optional) from stdin and directs them
|
||||||
|
-
|
||||||
|
-options:
|
||||||
|
-
|
||||||
|
-ix means: the indegree of every vertex may be at most x.
|
||||||
|
-
|
||||||
|
-oy means: the outdegree of every vertex may be at most y.
|
||||||
|
-
|
||||||
|
- S means: allow that for every pair of vertices x,y at most one of the edges x-->y
|
||||||
|
- and y-->x may be present. By default both of them may be present in the same graph.
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- T means: Output directed graphs in T-code. This is a simple ASCII output format. Every line
|
||||||
|
- contains one graph. First the number of vertices, then the number of
|
||||||
|
- directed edges and then the list of directed edges with the start first
|
||||||
|
- and the end then. E.g.: 3 2 0 1 2 1 means 3 vertices, 2 directed edges:
|
||||||
|
- 0-->1 and 2-->1
|
||||||
|
-
|
||||||
|
- B means: Output the directed graphs in a binary code. Every item of the code is an unsigned
|
||||||
|
- char. The first unsigned char is the number nv of vertices. The vertices are numbered 1..nv
|
||||||
|
- Then the list of vertices x for which there is a directed edge 1->x follow. This list is
|
||||||
|
- ended by a 0. Then the list of outgoing neighbours of 2 follows -- again ended with a 0, etc.
|
||||||
|
- The code is complete with the 0 ending the list of outgoing neighbours of nv.
|
||||||
|
-
|
||||||
|
- C means: Do really construct all the directed graphs in memory, but don't output them. This is not
|
||||||
|
- a big difference in case of restricted in- and outdegrees, because all that is done extra is that
|
||||||
|
- edges are directed instead of just keeping track of in- and out-degrees. This option is intended only
|
||||||
|
- for testing purposes to test also routines that are normally not used when counting. Things that would
|
||||||
|
- speed up the counting also in some cases of restricted in- and out-degrees -- like multiplying the
|
||||||
|
- possibilities of assigning directions to edges that can be assigned directions independent
|
||||||
|
- of each other (depending on the degrees of the endvertices and overlaps) -- are not included.
|
||||||
|
- In case of not restrictive bounds on the in- and out-degree it not really constructing the graphs
|
||||||
|
- can be considerably faster. In cases of restricted in- and out-degrees the only difference is that
|
||||||
|
- the graph isn't modified...
|
||||||
|
- The fact that in case of no output the graph is not modified is mainly to save time for the one
|
||||||
|
- case of waterclusters, where large numbers were determined. If large numbers (without output)
|
||||||
|
- for other cases shall be determined, one should think about adding the multiplication routines.
|
||||||
|
-
|
||||||
|
- m read multicode
|
||||||
|
-
|
||||||
|
-This program uses different labelling routines -- all based on the ideas of
|
||||||
|
-
|
||||||
|
-G. Brinkmann, Generating water clusters and other directed graphs,
|
||||||
|
-Journal of Mathematical Chemistry 46, 1112--1121 (2009)
|
||||||
|
+#define GTOOL_USAGEHELP_COMPATIBILITY
|
||||||
|
|
||||||
|
-October 10, 2011: corrected error caused by overflow of 32bit int used as hashvalue.
|
||||||
|
+#define USAGE "watercluster2 [ix] [oy] [S] [T] [B] [C] [m]"
|
||||||
|
|
||||||
|
-Sep, 2012: PROCESS feature added by BDM.
|
||||||
|
+#define HELPTEXT \
|
||||||
|
+" Reads graphs in g6 code or multicode (optional) from stdin and directs them\n\
|
||||||
|
+\n\
|
||||||
|
+ ix : the indegree of every vertex may be at most x.\n\
|
||||||
|
+ The default maximum indegree is unlimited.\n\
|
||||||
|
+\n\
|
||||||
|
+ oy : the outdegree of every vertex may be at most y.\n\
|
||||||
|
+ The default maximum outdegree is unlimited.\n\
|
||||||
|
+\n\
|
||||||
|
+ S : allow that for every pair of vertices x,y at most one of the edges x-->y\n\
|
||||||
|
+ and y-->x may be present. By default both of them may be present in the same graph.\n\
|
||||||
|
+\n\
|
||||||
|
+\n\
|
||||||
|
+ T : Output directed graphs in T-code. This is a simple ASCII output format. Every line\n\
|
||||||
|
+ contains one graph. First the number of vertices, then the number of\n\
|
||||||
|
+ directed edges and then the list of directed edges with the start first\n\
|
||||||
|
+ and the end then. E.g.: 3 2 0 1 2 1 means 3 vertices, 2 directed edges:\n\
|
||||||
|
+ 0-->1 and 2-->1\n\
|
||||||
|
+\n\
|
||||||
|
+ B : Output the directed graphs in a binary code. Every item of the code is an unsigned\n\
|
||||||
|
+ char. The first unsigned char is the number nv of vertices. The vertices are numbered 1..nv\n\
|
||||||
|
+ Then the list of vertices x for which there is a directed edge 1->x follow. This list is\n\
|
||||||
|
+ ended by a 0. Then the list of outgoing neighbours of 2 follows -- again ended with a 0, etc.\n\
|
||||||
|
+ The code is complete with the 0 ending the list of outgoing neighbours of nv.\n\
|
||||||
|
+\n\
|
||||||
|
+ C : Do really construct all the directed graphs in memory, but don't output them. This is not\n\
|
||||||
|
+ a big difference in case of restricted in- and outdegrees, because all that is done extra is that\n\
|
||||||
|
+ edges are directed instead of just keeping track of in- and out-degrees. This option is intended only\n\
|
||||||
|
+ for testing purposes to test also routines that are normally not used when counting. Things that would\n\
|
||||||
|
+ speed up the counting also in some cases of restricted in- and out-degrees -- like multiplying the\n\
|
||||||
|
+ possibilities of assigning directions to edges that can be assigned directions independent\n\
|
||||||
|
+ of each other (depending on the degrees of the endvertices and overlaps) -- are not included.\n\
|
||||||
|
+ In case of not restrictive bounds on the in- and out-degree it not really constructing the graphs\n\
|
||||||
|
+ can be considerably faster. In cases of restricted in- and out-degrees the only difference is that\n\
|
||||||
|
+ the graph isn't modified...\n\
|
||||||
|
+ The fact that in case of no output the graph is not modified is mainly to save time for the one\n\
|
||||||
|
+ case of waterclusters, where large numbers were determined. If large numbers (without output)\n\
|
||||||
|
+ for other cases shall be determined, one should think about adding the multiplication routines.\n\
|
||||||
|
+\n\
|
||||||
|
+ m : read multicode instead of g6 code\n\
|
||||||
|
+\n\
|
||||||
|
+This program uses different labelling routines -- all based on the ideas of\n\
|
||||||
|
+\n\
|
||||||
|
+G. Brinkmann, Generating water clusters and other directed graphs,\n\
|
||||||
|
+Journal of Mathematical Chemistry 46, 1112--1121 (2009)\n"
|
||||||
|
+/*
|
||||||
|
+ * October 10, 2011: corrected error caused by overflow of 32bit int used as hashvalue.
|
||||||
|
+ *
|
||||||
|
+ * Sep, 2012: PROCESS feature added by BDM.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* PROCESS feature
|
||||||
|
@@ -67,7 +71,7 @@
|
||||||
|
*
|
||||||
|
* If SUMMARY is defined, it must expand as the name of a procedure
|
||||||
|
* with prototype void SUMMARY(void). It is called at the end after
|
||||||
|
- * the normal summary.
|
||||||
|
+ * the normal summary.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//#include<stdio.h>
|
||||||
|
@@ -500,7 +504,7 @@
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
+#ifndef GTOOL_USAGEHELP_COMPATIBILITY
|
||||||
|
void usage(char name[])
|
||||||
|
{
|
||||||
|
|
||||||
|
@@ -518,6 +522,7 @@
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/**********DECODE_TO_NAUTY****************************************************/
|
||||||
|
|
||||||
|
@@ -4013,6 +4018,15 @@
|
||||||
|
int multicode=0, g6code=1;
|
||||||
|
long long int last=0LL;
|
||||||
|
|
||||||
|
+#ifdef GTOOL_USAGEHELP_COMPATIBILITY
|
||||||
|
+ if (argc > 1 && (strcmp(argv[1],"-help") == 0
|
||||||
|
+ || (strcmp(argv[1],"--help") == 0)))
|
||||||
|
+ {
|
||||||
|
+ printf("Usage: %s\n\n%s",USAGE,HELPTEXT);
|
||||||
|
+ exit(0);
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
if (sizeof(long long int)<8)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"This may cause problems with the hashing function for large degree -- exit().\n");
|
||||||
|
@@ -4028,7 +4042,15 @@
|
||||||
|
else if (argv[i][0]=='B') direct_output=3;
|
||||||
|
else if (argv[i][0]=='S') double_allowed=0;
|
||||||
|
else if (argv[i][0]=='m') { g6code=0; multicode=1; }
|
||||||
|
- else usage(argv[0]);
|
||||||
|
+ else {
|
||||||
|
+#ifdef GTOOL_USAGEHELP_COMPATIBILITY
|
||||||
|
+ fprintf(stderr,">E Usage: %s\n",USAGE);
|
||||||
|
+ fprintf(stderr,"Use watercluster2 -help to see a list of the options.\n");
|
||||||
|
+ exit(1);
|
||||||
|
+#else
|
||||||
|
+ usage(argv[0]);
|
||||||
|
+#endif
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef PROCESS
|
||||||
|
--- a/genbg.c
|
||||||
|
+++ b/genbg.c
|
||||||
|
@@ -3,8 +3,7 @@
|
||||||
|
/* TODO: consider colour swaps */
|
||||||
|
|
||||||
|
#define USAGE \
|
||||||
|
-"genbg [-c -ugs -vq -lzF] [-Z#] [-D#] [-A] [-d#|-d#:#] [-D#|-D#:#] n1 n2 \n\
|
||||||
|
- [mine[:maxe]] [res/mod] [file]"
|
||||||
|
+"genbg [-c -ugs -vq -lzF] [-Z#] [-D#] [-A] [-d#|-d#:#] [-D#|-D#:#] n1 n2 [mine[:maxe]] [res/mod] [file]"
|
||||||
|
|
||||||
|
#define HELPTEXT \
|
||||||
|
" Find all bicoloured graphs of a specified class.\n\
|
||||||
|
--- a/geng.c
|
||||||
|
+++ b/geng.c
|
||||||
|
@@ -6,8 +6,7 @@
|
||||||
|
/* geng.c version 2.9; B D McKay, Jan 2016. */
|
||||||
|
|
||||||
|
#define USAGE \
|
||||||
|
-"geng [-cCmtfbd#D#] [-uygsnh] [-lvq] \n\
|
||||||
|
- [-x#X#] n [mine[:maxe]] [res/mod] [file]"
|
||||||
|
+"geng [-cCmtfbd#D#] [-uygsnh] [-lvq] [-x#X#] n [mine[:maxe]] [res/mod] [file]"
|
||||||
|
|
||||||
|
#define HELPTEXT \
|
||||||
|
" Generate all graphs of a specified class.\n\
|
||||||
|
--- a/genrang.c
|
||||||
|
+++ b/genrang.c
|
||||||
|
@@ -2,8 +2,7 @@
|
||||||
|
/* TODO: Check allocs for no edges */
|
||||||
|
|
||||||
|
#define USAGE \
|
||||||
|
-"genrang [-P#|-P#/#|-e#|-r#|-R#|-d#] [-l#] [-m#] [-t] [-T] [-a] \n" \
|
||||||
|
-" [-s|-g|-z] [-S#] [-q] n|n1,n2 num [outfile]"
|
||||||
|
+"genrang [-P#|-P#/#|-e#|-r#|-R#|-d#] [-l#] [-m#] [-t] [-T] [-a] [-s|-g|-z] [-S#] [-q] n|n1,n2 num [outfile]"
|
||||||
|
|
||||||
|
#define HELPTEXT \
|
||||||
|
" Generate random graphs.\n\
|
||||||
|
--- a/vcolg.c
|
||||||
|
+++ b/vcolg.c
|
||||||
|
@@ -1,8 +1,7 @@
|
||||||
|
/* vcolg.c version 1.0; B D McKay, Aug 31, 2013 */
|
||||||
|
|
||||||
|
#define USAGE \
|
||||||
|
-"vcolg [-q] [-u|-T|-G|-A|-B] [-e#|-e#:#] \n" \
|
||||||
|
-" [-m#] [-f#] [-D#|-r#|-l#] [infile [outfile]]"
|
||||||
|
+"vcolg [-q] [-u|-T|-G|-A|-B] [-e#|-e#:#] [-m#] [-f#] [-D#|-r#|-l#] [infile [outfile]]"
|
||||||
|
|
||||||
|
#define HELPTEXT \
|
||||||
|
" Read undirected loop-free graphs and colour their vertices in\n\
|
||||||
|
--- a/genspecialg.c
|
||||||
|
+++ b/genspecialg.c
|
||||||
|
@@ -1,20 +1,22 @@
|
||||||
|
/* genspecialg.c version 1.1; B D McKay, Feb 12, 2016 */
|
||||||
|
|
||||||
|
-#define USAGE "genspecialg \n\
|
||||||
|
-[-s|-g|-z|-d] [-q] \
|
||||||
|
-[-p#|-c#|-e#|-k#|-b#,#|-Q#|-f#|-J#,#|-P#,#|C#,#...|G#,#...|T#,#...] [outfile]"
|
||||||
|
+#define USAGE "genspecialg [-s|-g|-z|-d] [-q] [-p#|-c#|-e#|-k#|-b#,#|-Q#|-f#|-J#,#|-P#,#|C#[,#]|G#[,#]|T#[,#]] [outfile]"
|
||||||
|
|
||||||
|
#define HELPTEXT \
|
||||||
|
" Generate one particular graph.\n\
|
||||||
|
- # : size parameter called n in the descriptions\n\
|
||||||
|
\n\
|
||||||
|
+Options:\n\
|
||||||
|
+General Options:\n\
|
||||||
|
-s : Write in sparse6 format (default)\n\
|
||||||
|
-g : Write in graph6 format\n\
|
||||||
|
-z : Make digraph versions and write in digraph6 format\n\
|
||||||
|
-d : Write in dreadnaut format (can be used with -z)\n\
|
||||||
|
-q : Suppress summary\n\
|
||||||
|
\n\
|
||||||
|
- If defined, the digraph version is shown in parentheses:\n\
|
||||||
|
+Special Options:\n\
|
||||||
|
+ If defined, the digraph version is shown in parentheses;\n\
|
||||||
|
+ # size parameter called n in the descriptions.\n\
|
||||||
|
+\n\
|
||||||
|
-p# : path (directed path) on n vertices.\n\
|
||||||
|
-c# : cycle (directed cycle) on n vertices.\n\
|
||||||
|
-e# : empty graph (digraph with loops only) on n vertices.\n\
|
||||||
|
@@ -24,9 +26,9 @@
|
||||||
|
-P#,# : generalized Petersen graph; usual one is -P5,2\n\
|
||||||
|
-Q# : hypercube on 2^n vertices and degree n.\n\
|
||||||
|
-J#,# : Johnson graph J(n,k), args are n and k.\n\
|
||||||
|
- -C#,#... : circulant (di)graph.\n\
|
||||||
|
- -T#,#... : theta (di)graph Theta(#,#,...), give path lengths.\n\
|
||||||
|
- -G#,#... : (directed) grid, use negative values for open directions\n"
|
||||||
|
+ -C#[,#] : circulant (di)graph.\n\
|
||||||
|
+ -T#[,#] : theta (di)graph Theta(#[,#]), give path lengths.\n\
|
||||||
|
+ -G#[,#] : (directed) grid, use negative values for open directions\n"
|
||||||
|
|
||||||
|
/* Ideas: multipartite, knesser, full trees */
|
||||||
|
|
||||||
|
--- a/cubhamg.c
|
||||||
|
+++ b/cubhamg.c
|
||||||
|
@@ -1,54 +1,53 @@
|
||||||
|
-/* cubhamg.c : pick those inputs that are nonhamiltonian and
|
||||||
|
- have max degree <= 3.
|
||||||
|
+/* cubhamg.c : pick those inputs that are nonhamiltonian and have max degree <= 3. */
|
||||||
|
|
||||||
|
- Usage:
|
||||||
|
-cubhamg [-#] [-v|-V] [-n#-#|-y#-#|-i|-I|-o|-x|-e|-E] [-b|-t] [infile [outfile]]
|
||||||
|
+#define USAGE "cubhamg [-#] [-v|-V] [-n#-#|-y#-#|-i|-I|-o|-x|-e|-E] [-b|-t] [infile [outfile]]"
|
||||||
|
|
||||||
|
- infile is the name of the input file in graph6/sparse6 format
|
||||||
|
- outfile is the name of the output file in the same format
|
||||||
|
+#define HELPTEXT \
|
||||||
|
+" Pick those inputs that are nonhamiltonian and have max degree <= 3.\n\
|
||||||
|
+\n\
|
||||||
|
+ infile is the name of the input file in graph6/sparse6 format (default: stdin)\n\
|
||||||
|
+\n\
|
||||||
|
+ outfile is the name of the output file in the same format (default: stdout)\n\
|
||||||
|
+\n\
|
||||||
|
+ The output file will have a header >>graph6<< or >>sparse6<< if the input file does.\n\
|
||||||
|
+\n\
|
||||||
|
+Options:\n\
|
||||||
|
+ -# A parameter useful for tuning (default 100)\n\
|
||||||
|
+ -v Report nonhamiltonian graphs and noncubic graphs\n\
|
||||||
|
+ -V .. in addition give a cycle for the hamiltonian ones\n\
|
||||||
|
+ -n#-# If the two numbers are v and i, then the i-th edge\n\
|
||||||
|
+ out of vertex v is required to be not in the cycle.\n\
|
||||||
|
+ It must be that i=1..3 and v=0..n-1.\n\
|
||||||
|
+ -y#-# If the two numbers are v and i, then the i-th edge\n\
|
||||||
|
+ out of vertex v is required to be in the cycle.\n\
|
||||||
|
+ It must be that i=1..3 and v=0..n-1.\n\
|
||||||
|
+ You can use any number of -n/-y switches to force\n\
|
||||||
|
+ edges. Out of range first arguments are ignored.\n\
|
||||||
|
+ If -y and -n give same edge, -y wins.\n\
|
||||||
|
+ -i Test + property: for each edge e, there is a hamiltonian cycle using e.\n\
|
||||||
|
+ -I Test ++ property: for each pair of edges e,e', there is\n\
|
||||||
|
+ a hamiltonian cycle which uses both e and e'.\n\
|
||||||
|
+ -o Test - property: for each edge e, there is a hamiltonian cycle avoiding e.\n\
|
||||||
|
+ -x Test +- property: for each pair of edges e,e', there is\n\
|
||||||
|
+ a hamiltonian cycle which uses e but avoids e'.\n\
|
||||||
|
+ -e Test 3/4 property: for each edge e, at least 3 of the 4\n\
|
||||||
|
+ paths of length 3 passing through e lie on hamiltonian cycles.\n\
|
||||||
|
+ -E Test 3/4+ property: for each edge e failing the 3/4 property,\n\
|
||||||
|
+ all three ways of joining e to the rest of the graph are\n\
|
||||||
|
+ hamiltonian avoiding e.\n\
|
||||||
|
+ -T# Specify a timeout, being a limit on how many search tree\n\
|
||||||
|
+ nodes are made. If the timeout occurs, the graph is\n\
|
||||||
|
+ written to the output as if it is nonhamiltonian.\n\
|
||||||
|
+ -R# Specify the number of repeat attempts for each stage.\n\
|
||||||
|
+ -F Analyze covering paths from 2 or 4 vertices of degree 2.\n\
|
||||||
|
+\n\
|
||||||
|
+ -b Require biconnectivity\n\
|
||||||
|
+ -t Require triconnectivity (note: quadratic algorithm)\n\
|
||||||
|
+\n\
|
||||||
|
+Comments:\n\
|
||||||
|
+ -y, -n, -#, -R and -T are ignored for -i, -I, -x, -o, -e, -E, -F\n"
|
||||||
|
|
||||||
|
- stdin and stdout are the defaults for infile and outfile
|
||||||
|
-
|
||||||
|
- The output file will have a header >>graph6<< or >>sparse6<<
|
||||||
|
- if and only if the input file does.
|
||||||
|
-
|
||||||
|
- Optional switches:
|
||||||
|
-
|
||||||
|
- -# A parameter useful for tuning (default 100)
|
||||||
|
- -v Report nonhamiltonian graphs and noncubic graphs
|
||||||
|
- -V .. in addition give a cycle for the hamiltonian ones
|
||||||
|
- -n#-# If the two numbers are v and i, then the i-th edge
|
||||||
|
- out of vertex v is required to be not in the cycle.
|
||||||
|
- It must be that i=1..3 and v=0..n-1.
|
||||||
|
- -y#-# If the two numbers are v and i, then the i-th edge
|
||||||
|
- out of vertex v is required to be in the cycle.
|
||||||
|
- It must be that i=1..3 and v=0..n-1.
|
||||||
|
- You can use any number of -n/-y switches to force
|
||||||
|
- edges. Out of range first arguments are ignored.
|
||||||
|
- If -y and -n give same edge, -y wins.
|
||||||
|
- -i Test + property: for each edge e, there is a hamiltonian
|
||||||
|
- cycle using e.
|
||||||
|
- -I Test ++ property: for each pair of edges e,e', there is
|
||||||
|
- a hamiltonian cycle which uses both e and e'.
|
||||||
|
- -o Test - property: for each edge e, there is a hamiltonian
|
||||||
|
- cycle avoiding e.
|
||||||
|
- -x Test +- property: for each pair of edges e,e', there is
|
||||||
|
- a hamiltonian cycle which uses e but avoids e'.
|
||||||
|
- -e Test 3/4 property: for each edge e, at least 3 of the 4
|
||||||
|
- paths of length 3 passing through e lie on hamiltonian cycles.
|
||||||
|
- -E Test 3/4+ property: for each edge e failing the 3/4 property,
|
||||||
|
- all three ways of joining e to the rest of the graph are
|
||||||
|
- hamiltonian avoiding e.
|
||||||
|
- -T# Specify a timeout, being a limit on how many search tree
|
||||||
|
- nodes are made. If the timeout occurs, the graph is
|
||||||
|
- written to the output as if it is nonhamiltonian.
|
||||||
|
- -R# Specify the number of repeat attempts for each stage.
|
||||||
|
- -F Analyze covering paths from 2 or 4 vertices of degree 2.
|
||||||
|
-
|
||||||
|
- -b Require biconnectivity
|
||||||
|
- -t Require triconnectivity (note: quadratic algorithm)
|
||||||
|
-
|
||||||
|
- -y, -n, -#, -R and -T are ignored for -i, -I, -x, -o, -e, -E, -F
|
||||||
|
+/**************************************************************************
|
||||||
|
|
||||||
|
B. D. McKay, Nov 1995 + Aug 1996 + Feb 2002 + Jul 2008 + Nov 2015
|
||||||
|
|
||||||
|
@@ -1611,6 +1610,8 @@
|
||||||
|
char *arg;
|
||||||
|
int codetype;
|
||||||
|
|
||||||
|
+ HELP;
|
||||||
|
+
|
||||||
|
infilename = outfilename = NULL;
|
||||||
|
badargs = FALSE;
|
||||||
|
e34plus = e34 = in = out = inin = inout = FALSE;
|
||||||
|
@@ -1729,8 +1730,8 @@
|
||||||
|
|
||||||
|
if (badargs)
|
||||||
|
{
|
||||||
|
- fprintf(stderr,
|
||||||
|
- ">E Usage: cubhamg [-#] [-v | -V] [-n#-#] [-y#-#] [infile [outfile]]\n");
|
||||||
|
+ fprintf(stderr, ">E Usage: " USAGE "\n" );
|
||||||
|
+ GETHELP;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
Description: system preprocessing directive #include for examples
|
||||||
|
Origin: debian
|
||||||
|
Author: Jerome Benoit <calculus@rezozer.net>
|
||||||
|
Last-Update: 2013-11-24
|
||||||
|
|
||||||
|
--- a/nautyex1.c
|
||||||
|
+++ b/nautyex1.c
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MAXN 1000 /* Define this before including nauty.h */
|
||||||
|
-#include "nauty.h" /* which includes <stdio.h> and other system files */
|
||||||
|
+#include <nauty/nauty.h> /* which includes <stdio.h> and other system files */
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex10.c
|
||||||
|
+++ b/nautyex10.c
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
those here, it can be faster for some very difficult graphs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "traces.h"
|
||||||
|
+#include <nauty/traces.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex2.c
|
||||||
|
+++ b/nautyex2.c
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
This version uses dynamic allocation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "nauty.h"
|
||||||
|
+#include <nauty/nauty.h>
|
||||||
|
/* MAXN=0 is defined by nauty.h, which implies dynamic allocation */
|
||||||
|
|
||||||
|
int
|
||||||
|
--- a/nautyex3.c
|
||||||
|
+++ b/nautyex3.c
|
||||||
|
@@ -2,8 +2,8 @@
|
||||||
|
polygon, where n is a number supplied by the user.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "nauty.h" /* which includes <stdio.h> */
|
||||||
|
-#include "naugroup.h"
|
||||||
|
+#include <nauty/nauty.h> /* which includes <stdio.h> */
|
||||||
|
+#include <nauty/naugroup.h>
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
--- a/nautyex4.c
|
||||||
|
+++ b/nautyex4.c
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
This version uses sparse form with dynamic allocation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "nausparse.h" /* which includes nauty.h */
|
||||||
|
+#include <nauty/nausparse.h> /* which includes nauty.h */
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex5.c
|
||||||
|
+++ b/nautyex5.c
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
This version uses sparse form with dynamic allocation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "nausparse.h" /* which includes nauty.h */
|
||||||
|
+#include <nauty/nausparse.h> /* which includes nauty.h */
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex6.c
|
||||||
|
+++ b/nautyex6.c
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
This version uses dense form with dynamic allocation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "nauty.h"
|
||||||
|
+#include <nauty/nauty.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex7.c
|
||||||
|
+++ b/nautyex7.c
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
This version uses Traces.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "traces.h"
|
||||||
|
+#include <nauty/traces.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex8.c
|
||||||
|
+++ b/nautyex8.c
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
This version uses dense form with dynamic allocation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "nauty.h"
|
||||||
|
+#include <nauty/nauty.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
--- a/nautyex9.c
|
||||||
|
+++ b/nautyex9.c
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
that p is a prime.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include "traces.h"
|
||||||
|
+#include <nauty/traces.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,568 @@
|
||||||
|
Description: debianization: nauty tools suite prefix
|
||||||
|
Prepend nauty- to the names of the nauty tools, named gtools.
|
||||||
|
Author: Jerome Benoit <calculus@rezozer.net>
|
||||||
|
Last-Update: 2016-03-19
|
||||||
|
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -21,94 +21,94 @@
|
||||||
|
bin_PROGRAMS = \
|
||||||
|
dreadnaut \
|
||||||
|
\
|
||||||
|
- addedgeg \
|
||||||
|
- amtog \
|
||||||
|
- biplabg \
|
||||||
|
- catg \
|
||||||
|
- complg \
|
||||||
|
- converseg \
|
||||||
|
- copyg \
|
||||||
|
- countg \
|
||||||
|
- cubhamg \
|
||||||
|
- deledgeg \
|
||||||
|
- delptg \
|
||||||
|
- directg \
|
||||||
|
- dretodot \
|
||||||
|
- dretog \
|
||||||
|
- genbg \
|
||||||
|
- genbgL \
|
||||||
|
- geng \
|
||||||
|
- genquarticg \
|
||||||
|
- genrang \
|
||||||
|
- genspecialg \
|
||||||
|
- gentourng \
|
||||||
|
- gentreeg \
|
||||||
|
- hamheuristic \
|
||||||
|
- labelg \
|
||||||
|
- linegraphg \
|
||||||
|
- listg \
|
||||||
|
- multig \
|
||||||
|
- newedgeg \
|
||||||
|
- NRswitchg \
|
||||||
|
- pickg \
|
||||||
|
- planarg \
|
||||||
|
- ranlabg \
|
||||||
|
- shortg \
|
||||||
|
- showg \
|
||||||
|
- subdivideg \
|
||||||
|
- twohamg \
|
||||||
|
- vcolg \
|
||||||
|
- watercluster2 \
|
||||||
|
+ nauty-addedgeg \
|
||||||
|
+ nauty-amtog \
|
||||||
|
+ nauty-biplabg \
|
||||||
|
+ nauty-catg \
|
||||||
|
+ nauty-complg \
|
||||||
|
+ nauty-converseg \
|
||||||
|
+ nauty-copyg \
|
||||||
|
+ nauty-countg \
|
||||||
|
+ nauty-cubhamg \
|
||||||
|
+ nauty-deledgeg \
|
||||||
|
+ nauty-delptg \
|
||||||
|
+ nauty-directg \
|
||||||
|
+ nauty-dretodot \
|
||||||
|
+ nauty-dretog \
|
||||||
|
+ nauty-genbg \
|
||||||
|
+ nauty-genbgL \
|
||||||
|
+ nauty-geng \
|
||||||
|
+ nauty-genquarticg \
|
||||||
|
+ nauty-genrang \
|
||||||
|
+ nauty-genspecialg \
|
||||||
|
+ nauty-gentourng \
|
||||||
|
+ nauty-gentreeg \
|
||||||
|
+ nauty-hamheuristic \
|
||||||
|
+ nauty-labelg \
|
||||||
|
+ nauty-linegraphg \
|
||||||
|
+ nauty-listg \
|
||||||
|
+ nauty-multig \
|
||||||
|
+ nauty-newedgeg \
|
||||||
|
+ nauty-NRswitchg \
|
||||||
|
+ nauty-pickg \
|
||||||
|
+ nauty-planarg \
|
||||||
|
+ nauty-ranlabg \
|
||||||
|
+ nauty-shortg \
|
||||||
|
+ nauty-showg \
|
||||||
|
+ nauty-subdivideg \
|
||||||
|
+ nauty-twohamg \
|
||||||
|
+ nauty-vcolg \
|
||||||
|
+ nauty-watercluster2 \
|
||||||
|
\
|
||||||
|
- blisstog \
|
||||||
|
- checks6 \
|
||||||
|
- sumlines
|
||||||
|
+ nauty-blisstog \
|
||||||
|
+ nauty-checks6 \
|
||||||
|
+ nauty-sumlines
|
||||||
|
|
||||||
|
man_MANS = \
|
||||||
|
dreadnaut.1 \
|
||||||
|
\
|
||||||
|
- addedgeg.1 \
|
||||||
|
- amtog.1 \
|
||||||
|
- biplabg.1 \
|
||||||
|
- catg.1 \
|
||||||
|
- complg.1 \
|
||||||
|
- converseg.1 \
|
||||||
|
- copyg.1 \
|
||||||
|
- countg.1 \
|
||||||
|
- cubhamg.1 \
|
||||||
|
- deledgeg.1 \
|
||||||
|
- delptg.1 \
|
||||||
|
- directg.1 \
|
||||||
|
- dretodot.1 \
|
||||||
|
- dretog.1 \
|
||||||
|
- genbg.1 \
|
||||||
|
- genbgL.1 \
|
||||||
|
- geng.1 \
|
||||||
|
- genquarticg.1 \
|
||||||
|
- genrang.1 \
|
||||||
|
- genspecialg.1 \
|
||||||
|
- gentourng.1 \
|
||||||
|
- gentreeg.1 \
|
||||||
|
- hamheuristic.1 \
|
||||||
|
- labelg.1 \
|
||||||
|
- linegraphg.1 \
|
||||||
|
- listg.1 \
|
||||||
|
- multig.1 \
|
||||||
|
- newedgeg.1 \
|
||||||
|
- NRswitchg.1 \
|
||||||
|
- pickg.1 \
|
||||||
|
- planarg.1 \
|
||||||
|
- ranlabg.1 \
|
||||||
|
- shortg.1 \
|
||||||
|
- showg.1 \
|
||||||
|
- subdivideg.1 \
|
||||||
|
- twohamg.1 \
|
||||||
|
- vcolg.1 \
|
||||||
|
- watercluster2.1 \
|
||||||
|
+ nauty-addedgeg.1 \
|
||||||
|
+ nauty-amtog.1 \
|
||||||
|
+ nauty-biplabg.1 \
|
||||||
|
+ nauty-catg.1 \
|
||||||
|
+ nauty-complg.1 \
|
||||||
|
+ nauty-converseg.1 \
|
||||||
|
+ nauty-copyg.1 \
|
||||||
|
+ nauty-countg.1 \
|
||||||
|
+ nauty-cubhamg.1 \
|
||||||
|
+ nauty-deledgeg.1 \
|
||||||
|
+ nauty-delptg.1 \
|
||||||
|
+ nauty-directg.1 \
|
||||||
|
+ nauty-dretodot.1 \
|
||||||
|
+ nauty-dretog.1 \
|
||||||
|
+ nauty-genbg.1 \
|
||||||
|
+ nauty-genbgL.1 \
|
||||||
|
+ nauty-geng.1 \
|
||||||
|
+ nauty-genquarticg.1 \
|
||||||
|
+ nauty-genrang.1 \
|
||||||
|
+ nauty-genspecialg.1 \
|
||||||
|
+ nauty-gentourng.1 \
|
||||||
|
+ nauty-gentreeg.1 \
|
||||||
|
+ nauty-hamheuristic.1 \
|
||||||
|
+ nauty-labelg.1 \
|
||||||
|
+ nauty-linegraphg.1 \
|
||||||
|
+ nauty-listg.1 \
|
||||||
|
+ nauty-multig.1 \
|
||||||
|
+ nauty-newedgeg.1 \
|
||||||
|
+ nauty-NRswitchg.1 \
|
||||||
|
+ nauty-pickg.1 \
|
||||||
|
+ nauty-planarg.1 \
|
||||||
|
+ nauty-ranlabg.1 \
|
||||||
|
+ nauty-shortg.1 \
|
||||||
|
+ nauty-showg.1 \
|
||||||
|
+ nauty-subdivideg.1 \
|
||||||
|
+ nauty-twohamg.1 \
|
||||||
|
+ nauty-vcolg.1 \
|
||||||
|
+ nauty-watercluster2.1 \
|
||||||
|
\
|
||||||
|
- blisstog.1 \
|
||||||
|
- checks6.1 \
|
||||||
|
- sumlines.1
|
||||||
|
+ nauty-blisstog.1 \
|
||||||
|
+ nauty-checks6.1 \
|
||||||
|
+ nauty-sumlines.1
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = \
|
||||||
|
libnauty.la \
|
||||||
|
@@ -153,8 +153,8 @@
|
||||||
|
$(HELP2MAN) \
|
||||||
|
-s 1 \
|
||||||
|
$(AM_H2MFLAGS) \
|
||||||
|
- -I $(top_srcdir)/man/$*.h2m \
|
||||||
|
- -n $(if $($*_DESCRIPTION), $($*_DESCRIPTION), "manual page for $*") \
|
||||||
|
+ -I $(top_srcdir)/man/$(subst nauty-,,$*).h2m \
|
||||||
|
+ -n $(if $($(subst -,_,$*)_DESCRIPTION), $($(subst -,_,$*)_DESCRIPTION), "manual page for $*") \
|
||||||
|
-o $@ \
|
||||||
|
$(top_builddir)/$<
|
||||||
|
|
||||||
|
@@ -175,176 +175,176 @@
|
||||||
|
## short descriptions inspired from the basic functions of the programs as described
|
||||||
|
## in section `Utilities' (15) of the `Nauty and Traces User's Guide' (version 2.6)
|
||||||
|
dreadnaut_DESCRIPTION = "command line interface to nauty graph isomorphism library"
|
||||||
|
-addedgeg_DESCRIPTION = "add an edge in each possible way"
|
||||||
|
-amtog_DESCRIPTION = "read graphs in matrix format"
|
||||||
|
-biplabg_DESCRIPTION = "label bipartite graphs so the colour classes are contiguous"
|
||||||
|
-catg_DESCRIPTION = "concatenate files of graphs"
|
||||||
|
-complg_DESCRIPTION = "complement graphs"
|
||||||
|
-converseg_DESCRIPTION = "converse digraphs"
|
||||||
|
-copyg_DESCRIPTION = "convert format and select subset"
|
||||||
|
-countg_DESCRIPTION = "count graphs according to a variety of properties"
|
||||||
|
-cubhamg_DESCRIPTION = "find hamiltonian cycles in subcubic graphs"
|
||||||
|
-deledgeg_DESCRIPTION = "delete an edge in each possible way"
|
||||||
|
-delptg_DESCRIPTION = "delete vertices"
|
||||||
|
-directg_DESCRIPTION = "generate small digraphs with given underlying graph"
|
||||||
|
-dretodot_DESCRIPTION = "read graphs and initial coloring in dreadnaut format and write in dot format"
|
||||||
|
-dretog_DESCRIPTION = "read graphs in dreadnaut format"
|
||||||
|
-genbg_DESCRIPTION = "generate small bicoloured graphs"
|
||||||
|
-genbgL_DESCRIPTION = "$(shell printf "%s %s" $(genbg_DESCRIPTION) "(L1 flavour)")"
|
||||||
|
-geng_DESCRIPTION = "generate small graphs"
|
||||||
|
-genquarticg_DESCRIPTION = "generate quartic graphs"
|
||||||
|
-genrang_DESCRIPTION = "generate random graphs"
|
||||||
|
-genspecialg_DESCRIPTION = "generate special graphs"
|
||||||
|
-gentourng_DESCRIPTION = "generate small tournaments"
|
||||||
|
-gentreeg_DESCRIPTION = "generate trees"
|
||||||
|
-hamheuristic_DESCRIPTION = "try to find hamiltonian cycles in any graphs"
|
||||||
|
-labelg_DESCRIPTION = "canonically label graphs"
|
||||||
|
-linegraphg_DESCRIPTION = "compute the linegraphs of a file of graphs"
|
||||||
|
-listg_DESCRIPTION = "display graphs in a variety of forms"
|
||||||
|
-multig_DESCRIPTION = "generate small multigraphs with given underlying graph"
|
||||||
|
-newedgeg_DESCRIPTION = "create new edges from pairs of non-adjacent edges in each possible way"
|
||||||
|
-NRswitchg_DESCRIPTION = "complement vertex edges"
|
||||||
|
-pickg_DESCRIPTION = "select graphs according to a variety of properties"
|
||||||
|
-planarg_DESCRIPTION = "test graphs for planarity and find embeddings or obstructions"
|
||||||
|
-ranlabg_DESCRIPTION = "randomly relabel graphs"
|
||||||
|
-shortg_DESCRIPTION = "remove isomorphs from a file of graphs"
|
||||||
|
-showg_DESCRIPTION = "$(shell printf "%s %s" $(listg_DESCRIPTION) "(stand-alone subset of listg)")"
|
||||||
|
-subdivideg_DESCRIPTION = "compute the subdivision graphs of a file of graphs"
|
||||||
|
-twohamg_DESCRIPTION = "split quartic graphs into two hamiltonian cycles"
|
||||||
|
-vcolg_DESCRIPTION = "colour the vertices of graphs in all distinct ways"
|
||||||
|
-watercluster2_DESCRIPTION = "$(shell printf "%s %s" $(directg_DESCRIPTION) "(faster alternative to directg)")"
|
||||||
|
-blisstog_DESCRIPTION = "convert files of graphs in bliss format to stdout in sparse6 format"
|
||||||
|
-checks6_DESCRIPTION = "check a file of graphs and optionally perform corrections"
|
||||||
|
-sumlines_DESCRIPTION = "sum lines matching specified graph formats"
|
||||||
|
+nauty_addedgeg_DESCRIPTION = "add an edge in each possible way"
|
||||||
|
+nauty_amtog_DESCRIPTION = "read graphs in matrix format"
|
||||||
|
+nauty_biplabg_DESCRIPTION = "label bipartite graphs so the colour classes are contiguous"
|
||||||
|
+nauty_catg_DESCRIPTION = "concatenate files of graphs"
|
||||||
|
+nauty_complg_DESCRIPTION = "complement graphs"
|
||||||
|
+nauty_converseg_DESCRIPTION = "converse digraphs"
|
||||||
|
+nauty_copyg_DESCRIPTION = "convert format and select subset"
|
||||||
|
+nauty_countg_DESCRIPTION = "count graphs according to a variety of properties"
|
||||||
|
+nauty_cubhamg_DESCRIPTION = "find hamiltonian cycles in subcubic graphs"
|
||||||
|
+nauty_deledgeg_DESCRIPTION = "delete an edge in each possible way"
|
||||||
|
+nauty_delptg_DESCRIPTION = "delete vertices"
|
||||||
|
+nauty_directg_DESCRIPTION = "generate small digraphs with given underlying graph"
|
||||||
|
+nauty_dretodot_DESCRIPTION = "read graphs and initial coloring in dreadnaut format and write in dot format"
|
||||||
|
+nauty_dretog_DESCRIPTION = "read graphs in dreadnaut format"
|
||||||
|
+nauty_genbg_DESCRIPTION = "generate small bicoloured graphs"
|
||||||
|
+nauty_genbgL_DESCRIPTION = "$(shell printf "%s %s" $(nauty_genbg_DESCRIPTION) "(L1 flavour)")"
|
||||||
|
+nauty_geng_DESCRIPTION = "generate small graphs"
|
||||||
|
+nauty_genquarticg_DESCRIPTION = "generate quartic graphs"
|
||||||
|
+nauty_genrang_DESCRIPTION = "generate random graphs"
|
||||||
|
+nauty_genspecialg_DESCRIPTION = "generate special graphs"
|
||||||
|
+nauty_gentourng_DESCRIPTION = "generate small tournaments"
|
||||||
|
+nauty_gentreeg_DESCRIPTION = "generate trees"
|
||||||
|
+nauty_hamheuristic_DESCRIPTION = "try to find hamiltonian cycles in any graphs"
|
||||||
|
+nauty_labelg_DESCRIPTION = "canonically label graphs"
|
||||||
|
+nauty_linegraphg_DESCRIPTION = "compute the linegraphs of a file of graphs"
|
||||||
|
+nauty_listg_DESCRIPTION = "display graphs in a variety of forms"
|
||||||
|
+nauty_multig_DESCRIPTION = "generate small multigraphs with given underlying graph"
|
||||||
|
+nauty_newedgeg_DESCRIPTION = "create new edges from pairs of non-adjacent edges in each possible way"
|
||||||
|
+nauty_NRswitchg_DESCRIPTION = "complement vertex edges"
|
||||||
|
+nauty_pickg_DESCRIPTION = "select graphs according to a variety of properties"
|
||||||
|
+nauty_planarg_DESCRIPTION = "test graphs for planarity and find embeddings or obstructions"
|
||||||
|
+nauty_ranlabg_DESCRIPTION = "randomly relabel graphs"
|
||||||
|
+nauty_shortg_DESCRIPTION = "remove isomorphs from a file of graphs"
|
||||||
|
+nauty_showg_DESCRIPTION = "$(shell printf "%s %s" $(nauty_listg_DESCRIPTION) "(stand-alone subset of listg)")"
|
||||||
|
+nauty_subdivideg_DESCRIPTION = "compute the subdivision graphs of a file of graphs"
|
||||||
|
+nauty_twohamg_DESCRIPTION = "split quartic graphs into two hamiltonian cycles"
|
||||||
|
+nauty_vcolg_DESCRIPTION = "colour the vertices of graphs in all distinct ways"
|
||||||
|
+nauty_watercluster2_DESCRIPTION = "$(shell printf "%s %s" $(nauty_directg_DESCRIPTION) "(faster alternative to directg)")"
|
||||||
|
+nauty_blisstog_DESCRIPTION = "convert files of graphs in bliss format to stdout in sparse6 format"
|
||||||
|
+nauty_checks6_DESCRIPTION = "check a file of graphs and optionally perform corrections"
|
||||||
|
+nauty_sumlines_DESCRIPTION = "sum lines matching specified graph formats"
|
||||||
|
|
||||||
|
dreadnaut_CPPFLAGS =
|
||||||
|
-addedgeg_CPPFLAGS =
|
||||||
|
-amtog_CPPFLAGS =
|
||||||
|
-biplabg_CPPFLAGS =
|
||||||
|
-catg_CPPFLAGS =
|
||||||
|
-complg_CPPFLAGS =
|
||||||
|
-converseg_CPPFLAGS =
|
||||||
|
-copyg_CPPFLAGS =
|
||||||
|
-countg_CPPFLAGS =
|
||||||
|
-cubhamg_CPPFLAGS =
|
||||||
|
-deledgeg_CPPFLAGS =
|
||||||
|
-delptg_CPPFLAGS =
|
||||||
|
-directg_CPPFLAGS =
|
||||||
|
-dretodot_CPPFLAGS =
|
||||||
|
-dretog_CPPFLAGS =
|
||||||
|
-genbg_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
|
||||||
|
-genbgL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS) -DMAXN1=30
|
||||||
|
-geng_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
|
||||||
|
-genquarticg_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
|
||||||
|
-genrang_CPPFLAGS =
|
||||||
|
-genspecialg_CPPFLAGS =
|
||||||
|
-gentourng_CPPFLAGS = -DMAXN=24
|
||||||
|
-gentreeg_CPPFLAGS =
|
||||||
|
-hamheuristic_CPPFLAGS =
|
||||||
|
-labelg_CPPFLAGS =
|
||||||
|
-linegraphg_CPPFLAGS =
|
||||||
|
-listg_CPPFLAGS =
|
||||||
|
-multig_CPPFLAGS =
|
||||||
|
-newedgeg_CPPFLAGS =
|
||||||
|
-NRswitchg_CPPFLAGS =
|
||||||
|
-pickg_CPPFLAGS =
|
||||||
|
-planarg_CPPFLAGS =
|
||||||
|
-ranlabg_CPPFLAGS =
|
||||||
|
-shortg_CPPFLAGS =
|
||||||
|
-showg_CPPFLAGS =
|
||||||
|
-subdivideg_CPPFLAGS =
|
||||||
|
-twohamg_CPPFLAGS =
|
||||||
|
-vcolg_CPPFLAGS =
|
||||||
|
-watercluster2_CPPFLAGS = -DMAXN=32
|
||||||
|
-blisstog_CPPFLAGS = $(ZLIB_CFLAGS)
|
||||||
|
-checks6_CPPFLAGS =
|
||||||
|
-sumlines_CPPFLAGS = $(GMP_CFLAGS)
|
||||||
|
+nauty_addedgeg_CPPFLAGS =
|
||||||
|
+nauty_amtog_CPPFLAGS =
|
||||||
|
+nauty_biplabg_CPPFLAGS =
|
||||||
|
+nauty_catg_CPPFLAGS =
|
||||||
|
+nauty_complg_CPPFLAGS =
|
||||||
|
+nauty_converseg_CPPFLAGS =
|
||||||
|
+nauty_copyg_CPPFLAGS =
|
||||||
|
+nauty_countg_CPPFLAGS =
|
||||||
|
+nauty_cubhamg_CPPFLAGS =
|
||||||
|
+nauty_deledgeg_CPPFLAGS =
|
||||||
|
+nauty_delptg_CPPFLAGS =
|
||||||
|
+nauty_directg_CPPFLAGS =
|
||||||
|
+nauty_dretodot_CPPFLAGS =
|
||||||
|
+nauty_dretog_CPPFLAGS =
|
||||||
|
+nauty_genbg_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
|
||||||
|
+nauty_genbgL_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS) -DMAXN1=30
|
||||||
|
+nauty_geng_CPPFLAGS = $(nautyW1_flavour_CPPFLAGS)
|
||||||
|
+nauty_genquarticg_CPPFLAGS = $(nautyL1_flavour_CPPFLAGS)
|
||||||
|
+nauty_genrang_CPPFLAGS =
|
||||||
|
+nauty_genspecialg_CPPFLAGS =
|
||||||
|
+nauty_gentourng_CPPFLAGS = -DMAXN=24
|
||||||
|
+nauty_gentreeg_CPPFLAGS =
|
||||||
|
+nauty_hamheuristic_CPPFLAGS =
|
||||||
|
+nauty_labelg_CPPFLAGS =
|
||||||
|
+nauty_linegraphg_CPPFLAGS =
|
||||||
|
+nauty_listg_CPPFLAGS =
|
||||||
|
+nauty_multig_CPPFLAGS =
|
||||||
|
+nauty_newedgeg_CPPFLAGS =
|
||||||
|
+nauty_NRswitchg_CPPFLAGS =
|
||||||
|
+nauty_pickg_CPPFLAGS =
|
||||||
|
+nauty_planarg_CPPFLAGS =
|
||||||
|
+nauty_ranlabg_CPPFLAGS =
|
||||||
|
+nauty_shortg_CPPFLAGS =
|
||||||
|
+nauty_showg_CPPFLAGS =
|
||||||
|
+nauty_subdivideg_CPPFLAGS =
|
||||||
|
+nauty_twohamg_CPPFLAGS =
|
||||||
|
+nauty_vcolg_CPPFLAGS =
|
||||||
|
+nauty_watercluster2_CPPFLAGS = -DMAXN=32
|
||||||
|
+nauty_blisstog_CPPFLAGS = $(ZLIB_CFLAGS)
|
||||||
|
+nauty_checks6_CPPFLAGS =
|
||||||
|
+nauty_sumlines_CPPFLAGS = $(GMP_CFLAGS)
|
||||||
|
|
||||||
|
dreadnaut_SOURCES = dreadnaut.c
|
||||||
|
-addedgeg_SOURCES = addedgeg.c
|
||||||
|
-amtog_SOURCES = amtog.c
|
||||||
|
-biplabg_SOURCES = biplabg.c
|
||||||
|
-catg_SOURCES = catg.c
|
||||||
|
-complg_SOURCES = complg.c
|
||||||
|
-converseg_SOURCES = converseg.c
|
||||||
|
-copyg_SOURCES = copyg.c
|
||||||
|
-countg_SOURCES = testg.c
|
||||||
|
-cubhamg_SOURCES = cubhamg.c
|
||||||
|
-deledgeg_SOURCES = deledgeg.c
|
||||||
|
-delptg_SOURCES = delptg.c
|
||||||
|
-directg_SOURCES = directg.c
|
||||||
|
-dretodot_SOURCES = dretodot.c
|
||||||
|
-dretog_SOURCES = dretog.c
|
||||||
|
-genbg_SOURCES = genbg.c
|
||||||
|
-genbgL_SOURCES = genbg.c
|
||||||
|
-geng_SOURCES = geng.c
|
||||||
|
-genquarticg_SOURCES = genquarticg.c
|
||||||
|
-genrang_SOURCES = genrang.c
|
||||||
|
-genspecialg_SOURCES = genspecialg.c
|
||||||
|
-gentourng_SOURCES = gentourng.c
|
||||||
|
-gentreeg_SOURCES = gentreeg.c
|
||||||
|
-hamheuristic_SOURCES = hamheuristic.c
|
||||||
|
-labelg_SOURCES = labelg.c
|
||||||
|
-linegraphg_SOURCES = linegraphg.c
|
||||||
|
-listg_SOURCES = listg.c
|
||||||
|
-multig_SOURCES = multig.c
|
||||||
|
-newedgeg_SOURCES = newedgeg.c
|
||||||
|
-NRswitchg_SOURCES = NRswitchg.c
|
||||||
|
-pickg_SOURCES = testg.c
|
||||||
|
-planarg_SOURCES = planarg.c planarity.c
|
||||||
|
-ranlabg_SOURCES = ranlabg.c
|
||||||
|
-shortg_SOURCES = shortg.c
|
||||||
|
-showg_SOURCES = showg.c
|
||||||
|
-subdivideg_SOURCES = subdivideg.c
|
||||||
|
-twohamg_SOURCES = twohamg.c
|
||||||
|
-vcolg_SOURCES = vcolg.c
|
||||||
|
-watercluster2_SOURCES = watercluster2.c
|
||||||
|
-blisstog_SOURCES = blisstog.c
|
||||||
|
-checks6_SOURCES = checks6.c
|
||||||
|
-sumlines_SOURCES = sumlines.c
|
||||||
|
+nauty_addedgeg_SOURCES = addedgeg.c
|
||||||
|
+nauty_amtog_SOURCES = amtog.c
|
||||||
|
+nauty_biplabg_SOURCES = biplabg.c
|
||||||
|
+nauty_catg_SOURCES = catg.c
|
||||||
|
+nauty_complg_SOURCES = complg.c
|
||||||
|
+nauty_converseg_SOURCES = converseg.c
|
||||||
|
+nauty_copyg_SOURCES = copyg.c
|
||||||
|
+nauty_countg_SOURCES = testg.c
|
||||||
|
+nauty_cubhamg_SOURCES = cubhamg.c
|
||||||
|
+nauty_deledgeg_SOURCES = deledgeg.c
|
||||||
|
+nauty_delptg_SOURCES = delptg.c
|
||||||
|
+nauty_directg_SOURCES = directg.c
|
||||||
|
+nauty_dretodot_SOURCES = dretodot.c
|
||||||
|
+nauty_dretog_SOURCES = dretog.c
|
||||||
|
+nauty_genbg_SOURCES = genbg.c
|
||||||
|
+nauty_genbgL_SOURCES = genbg.c
|
||||||
|
+nauty_geng_SOURCES = geng.c
|
||||||
|
+nauty_genquarticg_SOURCES = genquarticg.c
|
||||||
|
+nauty_genrang_SOURCES = genrang.c
|
||||||
|
+nauty_genspecialg_SOURCES = genspecialg.c
|
||||||
|
+nauty_gentourng_SOURCES = gentourng.c
|
||||||
|
+nauty_gentreeg_SOURCES = gentreeg.c
|
||||||
|
+nauty_hamheuristic_SOURCES = hamheuristic.c
|
||||||
|
+nauty_labelg_SOURCES = labelg.c
|
||||||
|
+nauty_linegraphg_SOURCES = linegraphg.c
|
||||||
|
+nauty_listg_SOURCES = listg.c
|
||||||
|
+nauty_multig_SOURCES = multig.c
|
||||||
|
+nauty_newedgeg_SOURCES = newedgeg.c
|
||||||
|
+nauty_NRswitchg_SOURCES = NRswitchg.c
|
||||||
|
+nauty_pickg_SOURCES = testg.c
|
||||||
|
+nauty_planarg_SOURCES = planarg.c planarity.c
|
||||||
|
+nauty_ranlabg_SOURCES = ranlabg.c
|
||||||
|
+nauty_shortg_SOURCES = shortg.c
|
||||||
|
+nauty_showg_SOURCES = showg.c
|
||||||
|
+nauty_subdivideg_SOURCES = subdivideg.c
|
||||||
|
+nauty_twohamg_SOURCES = twohamg.c
|
||||||
|
+nauty_vcolg_SOURCES = vcolg.c
|
||||||
|
+nauty_watercluster2_SOURCES = watercluster2.c
|
||||||
|
+nauty_blisstog_SOURCES = blisstog.c
|
||||||
|
+nauty_checks6_SOURCES = checks6.c
|
||||||
|
+nauty_sumlines_SOURCES = sumlines.c
|
||||||
|
|
||||||
|
dreadnaut_LDADD = $(NAUTY_LDADD)
|
||||||
|
-addedgeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-amtog_LDADD = $(NAUTY_LDADD)
|
||||||
|
-biplabg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-catg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-complg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-converseg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-copyg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-countg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-cubhamg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-deledgeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-delptg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-directg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-dretodot_LDADD = $(NAUTY_LDADD) $(LIBM)
|
||||||
|
-dretog_LDADD = $(NAUTY_LDADD)
|
||||||
|
-genbg_LDADD = $(NAUTYW1_LDADD)
|
||||||
|
-genbgL_LDADD = $(NAUTYL1_LDADD)
|
||||||
|
-geng_LDADD = $(NAUTYW1_LDADD)
|
||||||
|
-genquarticg_LDADD = $(NAUTYL1_LDADD)
|
||||||
|
-genrang_LDADD = $(NAUTY_LDADD)
|
||||||
|
-genspecialg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-gentourng_LDADD = $(NAUTY_LDADD)
|
||||||
|
-gentreeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-hamheuristic_LDADD = $(NAUTY_LDADD)
|
||||||
|
-labelg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-linegraphg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-listg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-multig_LDADD = $(NAUTY_LDADD)
|
||||||
|
-newedgeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-NRswitchg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-pickg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-planarg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-ranlabg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-shortg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-showg_LDADD =
|
||||||
|
-subdivideg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-twohamg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-vcolg_LDADD = $(NAUTY_LDADD)
|
||||||
|
-watercluster2_LDADD = $(NAUTY_LDADD)
|
||||||
|
-blisstog_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
|
||||||
|
-checks6_LDADD = $(NAUTY_LDADD)
|
||||||
|
-sumlines_LDADD = $(GMP_LIBS)
|
||||||
|
+nauty_addedgeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_amtog_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_biplabg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_catg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_complg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_converseg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_copyg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_countg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_cubhamg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_deledgeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_delptg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_directg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_dretodot_LDADD = $(NAUTY_LDADD) $(LIBM)
|
||||||
|
+nauty_dretog_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_genbg_LDADD = $(NAUTYW1_LDADD)
|
||||||
|
+nauty_genbgL_LDADD = $(NAUTYL1_LDADD)
|
||||||
|
+nauty_geng_LDADD = $(NAUTYW1_LDADD)
|
||||||
|
+nauty_genquarticg_LDADD = $(NAUTYL1_LDADD)
|
||||||
|
+nauty_genrang_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_genspecialg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_gentourng_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_gentreeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_hamheuristic_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_labelg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_linegraphg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_listg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_multig_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_newedgeg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_NRswitchg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_pickg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_planarg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_ranlabg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_shortg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_showg_LDADD =
|
||||||
|
+nauty_subdivideg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_twohamg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_vcolg_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_watercluster2_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_blisstog_LDADD = $(NAUTY_LDADD) $(ZLIB_LIBS)
|
||||||
|
+nauty_checks6_LDADD = $(NAUTY_LDADD)
|
||||||
|
+nauty_sumlines_LDADD = $(GMP_LIBS)
|
||||||
|
|
||||||
|
libnauty_la_LD_VERSION_SCRIPT =
|
||||||
|
libnautyA1_la_MAP =
|
||||||
|
--- a/runalltests
|
||||||
|
+++ b/runalltests
|
||||||
|
@@ -30,7 +30,7 @@
|
||||||
|
eval $cmd <"$in" 2>$out2 >$out1
|
||||||
|
|
||||||
|
if [ -d $top_workingdir/.libs ]; then
|
||||||
|
- sed -i 's@'$top_workingdir'/.libs/lt-@./@' $out2
|
||||||
|
+ sed -i 's@'$top_workingdir'/.libs/lt-nauty-@./@' $out2
|
||||||
|
fi
|
||||||
|
|
||||||
|
LC_COLLATE=C sort $out2 >>$out1
|
||||||
|
@@ -82,13 +82,13 @@
|
||||||
|
runonetest ./dreadtest4K nautest2.dre nautest2a.ans
|
||||||
|
runonetest "./dreadtest4K -o As" nautest2.dre nautest2b.ans
|
||||||
|
|
||||||
|
-runonetest "./geng -ud1D7t 11" "" nautesta.ans
|
||||||
|
-runonetest "./geng -cd1f 10 | ./labelg -q" "" nautestb.ans
|
||||||
|
-runonetest "./genrang -r3 114 100 | ./countg --nedDr -q" "" nautestc.ans
|
||||||
|
-runonetest "./gentourng -q -z 8 | ./pickg -T3" "" nautestd.ans
|
||||||
|
-runonetest "./gentreeg -q -s 18 | ./countg -z6 --o" "" nauteste.ans
|
||||||
|
-runonetest "./geng -c -q 8 8 | ./directg -q -o | ./converseg -q | ./labelg -q" "" nautestf.ans
|
||||||
|
-runonetest "./genbg -q 4 3 10 | ./vcolg -m6 -T" "" nautestg.ans
|
||||||
|
+runonetest "./nauty-geng -ud1D7t 11" "" nautesta.ans
|
||||||
|
+runonetest "./nauty-geng -cd1f 10 | ./nauty-labelg -q" "" nautestb.ans
|
||||||
|
+runonetest "./nauty-genrang -r3 114 100 | ./nauty-countg --nedDr -q" "" nautestc.ans
|
||||||
|
+runonetest "./nauty-gentourng -q -z 8 | ./nauty-pickg -T3" "" nautestd.ans
|
||||||
|
+runonetest "./nauty-gentreeg -q -s 18 | ./nauty-countg -z6 --o" "" nauteste.ans
|
||||||
|
+runonetest "./nauty-geng -c -q 8 8 | ./nauty-directg -q -o | ./nauty-converseg -q | ./nauty-labelg -q" "" nautestf.ans
|
||||||
|
+runonetest "./nauty-genbg -q 4 3 10 | ./nauty-vcolg -m6 -T" "" nautestg.ans
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
|
|
@ -0,0 +1,211 @@
|
||||||
|
Description: implement zlib support to blisstog utility
|
||||||
|
zlib is implemented to handle directly flate and compress files
|
||||||
|
for the blisstog nauty tool.
|
||||||
|
Origin: debian
|
||||||
|
Author: Jerome Benoit <calculus@rezozer.net>
|
||||||
|
Last-Update: 2016-03-18
|
||||||
|
|
||||||
|
--- a/blisstog.c
|
||||||
|
+++ b/blisstog.c
|
||||||
|
@@ -9,45 +9,37 @@
|
||||||
|
-n#:# Specify a range of n values for output\n\
|
||||||
|
Input files with name *.gz are ungzipped\n"
|
||||||
|
|
||||||
|
-#define ZCAT "gunzip -c" /* name of zcat command (might be "gunzip -c") */
|
||||||
|
-
|
||||||
|
/*************************************************************************/
|
||||||
|
|
||||||
|
+#include <zlib.h>
|
||||||
|
#include "gtools.h"
|
||||||
|
|
||||||
|
+#define BUFSIZE 256
|
||||||
|
+
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int v,w;
|
||||||
|
} vpair;
|
||||||
|
|
||||||
|
-static int
|
||||||
|
-nextchar(FILE *f)
|
||||||
|
-{
|
||||||
|
- char s[2];
|
||||||
|
-
|
||||||
|
- if (fscanf(f,"%1s",s) != 1) return EOF;
|
||||||
|
- else return s[0];
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static boolean
|
||||||
|
-readblissgraph(FILE *f, sparsegraph *g)
|
||||||
|
+readblissgraph(gzFile f, sparsegraph *g)
|
||||||
|
/* Reads a graph from Bliss format into a sparse graph */
|
||||||
|
{
|
||||||
|
- int n,c;
|
||||||
|
+ int n;
|
||||||
|
unsigned long ne,j;
|
||||||
|
int haven;
|
||||||
|
int i,v,w;
|
||||||
|
- int haveptn;
|
||||||
|
DYNALLSTAT(vpair,elist,elist_sz);
|
||||||
|
+ char buffer[BUFSIZE];
|
||||||
|
|
||||||
|
+ memset(buffer, '\0', BUFSIZE);
|
||||||
|
haven = 0;
|
||||||
|
j = 0;
|
||||||
|
- while ((c = nextchar(f)) >= 0)
|
||||||
|
+ while (gzgets(f, buffer, BUFSIZE) != NULL && strlen(buffer) < BUFSIZE - 1)
|
||||||
|
{
|
||||||
|
- switch (c)
|
||||||
|
+ switch (*buffer)
|
||||||
|
{
|
||||||
|
case 'c':
|
||||||
|
- while ((c = getc(f)) != '\n' && c != EOF) {}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'p':
|
||||||
|
@@ -56,7 +48,7 @@
|
||||||
|
fprintf(stderr,"Duplicate p line\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
- if (fscanf(f," edge %d %lu",&n,&ne) != 2)
|
||||||
|
+ if (sscanf(buffer,"p edge %d %lu",&n,&ne) != 2)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Bad p line\n");
|
||||||
|
return FALSE;
|
||||||
|
@@ -71,7 +63,7 @@
|
||||||
|
fprintf(stderr,"Missing p line\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
- if (fscanf(f,"%d%d",&w,&v) != 2 || w < 1 || w > n)
|
||||||
|
+ if (sscanf(buffer,"n %d%d",&w,&v) != 2 || w < 1 || w > n)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Bad n line\n");
|
||||||
|
return FALSE;
|
||||||
|
@@ -84,7 +76,7 @@
|
||||||
|
fprintf(stderr,"Missing p line or too many e lines\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
- if (fscanf(f,"%d%d",&v,&w) != 2 || v < 1 || w < 1 || v > n || w > n)
|
||||||
|
+ if (sscanf(buffer,"e %d%d",&v,&w) != 2 || v < 1 || w < 1 || v > n || w > n)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Bad e line\n");
|
||||||
|
return FALSE;
|
||||||
|
@@ -94,11 +86,22 @@
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
- fprintf(stderr,"Unknown line %c\n",c);
|
||||||
|
+ fprintf(stderr,"Unknown line\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (errno)
|
||||||
|
+ {
|
||||||
|
+ fputs("Corrupted data file\n", stderr);
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
+ else if (strlen(buffer) == BUFSIZE - 1)
|
||||||
|
+ {
|
||||||
|
+ fputs("Corruped data line\n", stderr);
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (j != ne)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Wrong number of e lines\n");
|
||||||
|
@@ -135,13 +138,10 @@
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
- FILE *infile;
|
||||||
|
+ gzFile infile;
|
||||||
|
int j,firstarg;
|
||||||
|
SG_DECL(g);
|
||||||
|
- size_t flen;
|
||||||
|
- boolean ispipe;
|
||||||
|
int nmin,nmax;
|
||||||
|
- char zcmd[515];
|
||||||
|
|
||||||
|
HELP; PUTVERSION;
|
||||||
|
|
||||||
|
@@ -160,53 +160,46 @@
|
||||||
|
|
||||||
|
if (argc == firstarg)
|
||||||
|
{
|
||||||
|
- if (!readblissgraph(stdin,&g))
|
||||||
|
+ if ((infile = gzdopen(STDIN_FILENO,"r")) == NULL)
|
||||||
|
{
|
||||||
|
- fprintf(stderr,">E Bliss error in file %s\n","stdin");
|
||||||
|
+ fputs(">E Can't open stdin\n", stderr);
|
||||||
|
gt_abort(NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- writes6_sg(stdout,&g);
|
||||||
|
+ {
|
||||||
|
+ if (!readblissgraph(stdin,&g))
|
||||||
|
+ {
|
||||||
|
+ fprintf(stderr,">E Bliss error in file %s\n","stdin");
|
||||||
|
+ gt_abort(NULL);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ writes6_sg(stdout,&g);
|
||||||
|
+ gzclose(infile);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (j = firstarg; j < argc; ++j)
|
||||||
|
{
|
||||||
|
- flen = strlen(argv[j]);
|
||||||
|
- if (flen >= 3 && strcmp(argv[j]+flen-3,".gz") == 0)
|
||||||
|
- {
|
||||||
|
- sprintf(zcmd,"%s \"%s\"",ZCAT,argv[j]);
|
||||||
|
- if ((infile = popen(zcmd,"r")) == NULL)
|
||||||
|
- {
|
||||||
|
- fprintf(stderr,
|
||||||
|
- ">E blisstog: cannot open zcat pipe for \"%s\"\n",
|
||||||
|
- argv[j]);
|
||||||
|
- gt_abort(NULL);
|
||||||
|
- }
|
||||||
|
- ispipe = TRUE;
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- if ((infile = fopen(argv[j],"r")) == NULL)
|
||||||
|
- {
|
||||||
|
- fprintf(stderr,">E Can't open file %s\n",argv[j]);
|
||||||
|
- gt_abort(NULL);
|
||||||
|
- }
|
||||||
|
- ispipe = FALSE;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!readblissgraph(infile,&g))
|
||||||
|
+ if ((infile = gzopen(argv[j],"r")) == NULL)
|
||||||
|
{
|
||||||
|
- fprintf(stderr,">E Bliss error in file %s\n",argv[j]);
|
||||||
|
+ fprintf(stderr,">E Can't open file %s\n",argv[j]);
|
||||||
|
gt_abort(NULL);
|
||||||
|
}
|
||||||
|
- else if (nmax < 0 || (g.nv >= nmin && g.nv <= nmax))
|
||||||
|
- {
|
||||||
|
- sortlists_sg(&g);
|
||||||
|
- writes6_sg(stdout,&g);
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if (!readblissgraph(infile,&g))
|
||||||
|
+ {
|
||||||
|
+ fprintf(stderr,">E Bliss error in file %s\n",argv[j]);
|
||||||
|
+ gt_abort(NULL);
|
||||||
|
+ }
|
||||||
|
+ else if (nmax < 0 || (g.nv >= nmin && g.nv <= nmax))
|
||||||
|
+ {
|
||||||
|
+ sortlists_sg(&g);
|
||||||
|
+ writes6_sg(stdout,&g);
|
||||||
|
+ }
|
||||||
|
+ gzclose(infile);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if (ispipe) pclose(infile); else fclose(infile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,132 @@
|
||||||
|
%global nautybasever 2.6r5
|
||||||
|
%global nautytarver %(tr -d . <<< %{nautybasever})
|
||||||
|
|
||||||
|
Name: nauty
|
||||||
|
Version: %(tr r . <<< %{nautybasever})
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Graph canonical labeling and automorphism group computation
|
||||||
|
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: http://pallini.di.uniroma1.it/
|
||||||
|
Source0: http://pallini.di.uniroma1.it/%{name}%{nautytarver}.tar.gz
|
||||||
|
|
||||||
|
# Debian patch to fix the gt_numorbits declaration
|
||||||
|
Patch0: %{name}-fix-gt_numorbits.patch
|
||||||
|
# Debian patch to add explicit extern declarations where needed
|
||||||
|
Patch1: %{name}-fix-include-extern.patch
|
||||||
|
# Debian patch to use zlib instead of invoking zcat through a pipe
|
||||||
|
Patch2: %{name}-zlib-blisstog.patch
|
||||||
|
# Debian patch to improve usage and help information
|
||||||
|
Patch3: %{name}-help2man.patch
|
||||||
|
# Debian patch to add libtool support for building a shared library
|
||||||
|
Patch4: %{name}-autotoolization.patch
|
||||||
|
# Debian patch to canonicalize header file usage
|
||||||
|
Patch5: %{name}-includes.patch
|
||||||
|
# Debian patch to prefix "nauty-" to the names of the generic tools
|
||||||
|
Patch6: %{name}-tool-prefix.patch
|
||||||
|
# Detect availability of the popcnt instruction at runtime
|
||||||
|
Patch7: %{name}-popcnt.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: gmp-devel
|
||||||
|
BuildRequires: help2man
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
|
||||||
|
# The shortg program invokes sort.
|
||||||
|
Requires: coreutils
|
||||||
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description
|
||||||
|
Nauty and Traces are programs for computing automorphism groups of
|
||||||
|
graphs and digraphs. (At present, Traces does not accept digraphs.)
|
||||||
|
They can also produce a canonical label. They are written in a portable
|
||||||
|
subset of C, and run on a considerable number of different systems.
|
||||||
|
|
||||||
|
There is a small suite of programs called gtools included in the
|
||||||
|
package. For example, geng can generate non-isomorphic graphs very
|
||||||
|
quickly. There are also generators for bipartite graphs, digraphs, and
|
||||||
|
multigraphs, and programs for manipulating files of graphs in a compact
|
||||||
|
format.
|
||||||
|
|
||||||
|
%package -n libnauty
|
||||||
|
Summary: Library for graph automorphism
|
||||||
|
|
||||||
|
%description -n libnauty
|
||||||
|
Nauty (No AUTomorphisms, Yes?) is a set of procedures for computing
|
||||||
|
automorphism groups of graphs and digraphs. This package contains a
|
||||||
|
library of nauty procedures.
|
||||||
|
|
||||||
|
%package -n libnauty-devel
|
||||||
|
Summary: Development files for libnauty
|
||||||
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n libnauty-devel
|
||||||
|
This package contains files needed to develop programs that use libnauty.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}%{nautytarver}
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
|
# Remove the pregenerated makefile
|
||||||
|
rm -f makefile
|
||||||
|
|
||||||
|
# Inject the version number
|
||||||
|
sed -i 's/@INJECTVER@/%{version}/' configure.ac
|
||||||
|
|
||||||
|
# Regenerate the configure script with libtool support
|
||||||
|
autoreconf -fi
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS="%{optflags} -fwrapv"
|
||||||
|
%configure --disable-static \
|
||||||
|
%ifarch %ix86 x86_64
|
||||||
|
--enable-runtime-popcnt \
|
||||||
|
%endif
|
||||||
|
--enable-tls
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
# We do not want the libtool archives
|
||||||
|
rm %{buildroot}%{_libdir}/*.la
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
|
%post -n libnauty -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libnauty -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README nug26.pdf
|
||||||
|
%{_bindir}/dreadnaut
|
||||||
|
%{_bindir}/nauty-*
|
||||||
|
%{_mandir}/man1/dreadnaut.1*
|
||||||
|
%{_mandir}/man1/nauty-*.1*
|
||||||
|
|
||||||
|
%files -n libnauty
|
||||||
|
%doc changes24-26.txt formats.txt
|
||||||
|
%license COPYRIGHT
|
||||||
|
%{_libdir}/libnauty*.so.*
|
||||||
|
|
||||||
|
%files -n libnauty-devel
|
||||||
|
%doc schreier.txt
|
||||||
|
%{_includedir}/nauty/
|
||||||
|
%{_libdir}/libnauty*.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Apr 21 2016 Jerry James <loganjerry@gmail.com> - 2.6.5-1
|
||||||
|
- New upstream version
|
||||||
|
|
||||||
|
* Fri Apr 15 2016 Jerry James <loganjerry@gmail.com> - 2.6.4-1
|
||||||
|
- Initial RPM
|
Loading…
Reference in New Issue