39#pragma GCC diagnostic ignored "-Wunused-variable"
40#pragma GCC diagnostic ignored "-Wredundant-decls"
41#pragma GCC diagnostic ignored "-Wpedantic"
44#include "nauty/nauty.h"
45#include "nauty/nausparse.h"
47#include "nauty/traces.h"
50#pragma GCC diagnostic warning "-Wunused-variable"
51#pragma GCC diagnostic warning "-Wredundant-decls"
52#pragma GCC diagnostic warning "-Wpedantic"
123 if ( (
int)
p[
j] !=
j )
200 if ( (
int)
p[
j] !=
j )
261 if ( first < 0 &&
second < 0 )
267 if ( first < 0 ||
second < 0 )
273 if ( first >= 0 &&
second >= 0 )
281 else if ( first >= 0 )
518 SG->d[
j] = (*degrees)[
j];
602 assert( first == *
nnodes - 1 || pos[first] <= (
int)
SG->v[first+1] );
623 assert( first == *
nnodes - 1 || pos[first] <= (
int)
SG->v[first+1] );
690 for (
j = 0;
j < nsymvars; ++
j)
692 SG->e[pos[
j]++] =
j + nsymvars;
693 SG->e[pos[
j + nsymvars]++] =
j;
696 assert(
j + nsymvars == *
nnodes - 1 || pos[
j+nsymvars] <= (
int)
SG->v[
j+nsymvars+1] );
872 SG->d[
j] = (*degrees)[
j];
889 for (
i = 0;
i < 2; ++
i)
1115 (*nedges) += *
nnodes - 1;
1116 (*colors)[*
nnodes - 1] = 8;
1166 return "Computing Graph Automorphism Groups by Brendan D. McKay (https://users.cecs.anu.edu.au/~bdm/nauty/)";
1168 return "Computing Graph Automorphism Groups by Adolfo Piperno (https://pallini.di.uniroma1.it/)";
1192 SCIP_Real* log10groupsize,
1224 *log10groupsize = 0;
1249 "Stopped symmetry computation: Symmetry graph would become too large.\n");
1259 SG.nde = (size_t) (
unsigned) (2 * nedges);
1273 for (v = 0; v <
nnodes; ++v)
1280 for (v = 0; v <
nnodes; ++v)
1282 if ( v <
nnodes-1 && colors[v] == colors[v+1] )
1333 *log10groupsize = (
SCIP_Real) stats.grpsize2;
1362 if (
G1->nnodes !=
G2->nnodes ||
G1->nopnodes !=
G2->nopnodes ||
G1->nvalnodes !=
G2->nvalnodes
1363 ||
G1->nconsnodes !=
G2->nconsnodes ||
G1->nedges !=
G2->nedges )
1410 SG.nde = (size_t) (
unsigned) (2 * nedges);
1419#ifdef SCIP_DISABLED_CODE
1424 for (v = 0; v <
SG.nv; ++v)
1429 for (v = 0; v <
SG.nv; ++v)
1434 for (v = 0; v <
SG.nv; ++v)
1436 for (
int w = 0;
w <
SG.d[v]; ++
w)
1449 for (v = 0; v <
nnodes; ++v)
1456 for (v = 0; v <
nnodes; ++v)
1458 if ( v <
nnodes-1 && colors[v] == colors[v+1] )
1464#ifdef SCIP_DISABLED_CODE
1467 for (v = 0; v <
SG.nv; ++v)
interface for symmetry computations
SCIP_Bool SYMcheckGraphsAreIdentical(SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH *G1, SYM_GRAPH *G2)
const char * SYMsymmetryGetName(void)
static const char nautyname[]
static void nautyhook(int count, int *p, int *orbits, int numorbits, int stabvertex, int n)
const char * SYMsymmetryGetAddName(void)
static struct NAUTY_Data data_
SCIP_Bool SYMcanComputeSymmetry(void)
const char * SYMsymmetryGetDesc(void)
static SCIP_RETCODE createOrDetermineSizeGraphCheck(SCIP *scip, SYM_GRAPH *graph1, SYM_GRAPH *graph2, SCIP_Bool determinesize, sparsegraph *SG, int *nnodes, int *nedges, int **degrees, int *maxdegrees, int **colors, int *ncolors, int *nusedvars, int *nnodesfromgraph1, SCIP_Bool *success)
static SCIP_RETCODE addOrDetermineEffectOfGroupedEdges(SCIP *scip, sparsegraph *SG, int *edgestartpos, SCIP_Bool determinesize, int *internodeid, int **degrees, int *maxdegrees, int **colorstostore, int *ncolorstostore, int *nnodes, int *nedges, int commonnodeidx, int *neighbors, int *colors, int nneighbors, int *naddednodes, int *naddededges)
static SCIP_RETCODE createOrDetermineSizeGraph(SCIP *scip, SYM_GRAPH *symgraph, SCIP_Bool determinesize, sparsegraph *SG, int *nnodes, int *nedges, int **degrees, int *maxdegrees, int **colors, int *ncolors, SCIP_Bool *success)
static SCIP_Bool isEdgeGroupable(SYM_GRAPH *symgraph, int edgeidx, SCIP_Bool groupbycons)
const char * SYMsymmetryGetAddDesc(void)
SCIP_RETCODE SYMcomputeSymmetryGenerators(SCIP *scip, int maxgenerators, SYM_GRAPH *symgraph, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize, SCIP_Real *symcodetime)
Constraint handler for linear constraints in their most general form, .
constraint handler for nonlinear constraints specified by algebraic expressions
#define SCIP_CALL_ABORT(x)
private functions to work with algebraic expressions
power and signed power expression handlers
variable expression handler
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
#define SCIPallocClearBufferArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SYM_NODETYPE SCIPgetSymgraphNodeType(SYM_GRAPH *graph, int nodeidx)
int SCIPgetSymgraphEdgeFirst(SYM_GRAPH *graph, int edgeidx)
SCIP_Bool SCIPhasGraphUniqueEdgetype(SYM_GRAPH *graph)
int SCIPgetSymgraphVarnodeColor(SYM_GRAPH *graph, int nodeidx)
int SCIPgetSymgraphNEdges(SYM_GRAPH *graph)
SYM_SYMTYPE SCIPgetSymgraphSymtype(SYM_GRAPH *graph)
int SCIPgetSymgraphEdgeSecond(SYM_GRAPH *graph, int edgeidx)
int SCIPgetSymgraphNConsnodes(SYM_GRAPH *graph)
int SCIPgetSymgraphNVars(SYM_GRAPH *graph)
SCIP_Bool SCIPisSymgraphEdgeColored(SYM_GRAPH *graph, int edgeidx)
int SCIPgetSymgraphNodeColor(SYM_GRAPH *graph, int nodeidx)
int SCIPgetSymgraphEdgeColor(SYM_GRAPH *graph, int edgeidx)
int SCIPgetSymgraphNNodes(SYM_GRAPH *graph)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortIntIntInt(int *intarray1, int *intarray2, int *intarray3, int len)
assert(minobj< SCIPgetCutoffbound(scip))
public methods for memory management
methods for dealing with symmetry detection graphs
enum SCIP_Retcode SCIP_RETCODE
enum SYM_Symtype SYM_SYMTYPE
enum SYM_Nodetype SYM_NODETYPE