compute_symmetry_nauty.c
Go to the documentation of this file.
30/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
153 if ( SCIPreallocBlockMemoryArray(data_.scip, &data_.perms, data_.nmaxperms, newsize) != SCIP_OKAY )
186 "symmetry computation terminated early, because number of cells %d in Nauty exceeds limit of %d\n",
189 "for running full symmetry detection, increase value of parameter propagating/symmetry/nautymaxncells\n");
276 if ( SCIPreallocBlockMemoryArray(data_.scip, &data_.perms, data_.nmaxperms, newsize) != SCIP_OKAY )
356 SCIP_Bool determinesize, /**< whether only the effect of grouping on the graph shall be checked */
361 int* ncolorstostore, /**< (initialized) pointer to maximum number of entries in colorstostore */
583 /* loop through all edges of the symmetry detection graph and either get degrees of nodes or add edges */
603 if ( ! SCIPhasGraphUniqueEdgetype(symgraph) && isEdgeGroupable(symgraph, e, groupByConstraints) )
693 /* if a new first node has been found, group the edges of the previous first node; ignoring the last group */
936 /* collect information or generate graphs, we shift the node indices of the second graph when adding them to G */
981 /* loop through all edges of the symmetry detection graph and either get degrees of nodes or add edges */
999 if ( ! SCIPhasGraphUniqueEdgetype(symgraph) && isEdgeGroupable(symgraph, e, groupByConstraints) )
1027 SCIP_CALL( SCIPensureBlockMemoryArray(scip, degrees, maxdegrees, nodeshift + internodeid + 1) );
1072 assert( nodeshift+first == *nnodes - 1 || pos[nodeshift+first] <= (int) SG->v[nodeshift+first+1] );
1073 assert( nodeshift+second == *nnodes - 1 || pos[nodeshift+second] <= (int) SG->v[nodeshift+second+1] );
1093 /* if a new first node has been found, group the edges of the previous first node; ignoring the last group */
1115 &groupseconds[firstidx], &groupcolors[firstidx], ngroupedges - firstidx, &naddednodes, &naddededges) );
1206 (void) SCIPsnprintf(nautyname, (int)sizeof(nautyname), "Nauty %d.%d.%d", NAUTYVERSIONID/10000, (NAUTYVERSIONID%10000)/1000, (NAUTYVERSIONID%1000)/10);
1208 (void) SCIPsnprintf(nautyname, (int)sizeof(nautyname), "Traces %d.%d.%d", NAUTYVERSIONID/10000, (NAUTYVERSIONID%10000)/1000, (NAUTYVERSIONID%1000)/10);
1217 return "Computing Graph Automorphism Groups by Brendan D. McKay (https://users.cecs.anu.edu.au/~bdm/nauty/)";
1219 return "Computing Graph Automorphism Groups by Adolfo Piperno (https://pallini.di.uniroma1.it/)";
1241 int* nmaxperms, /**< pointer to store maximal number of permutations (needed for freeing storage) */
1308 SG_ALLOC(SG, (size_t) nnodes, 2 * (size_t)(unsigned) nedges, "malloc"); /*lint !e647*//*lint !e774*//*lint !e571*/
1417 if ( G1->nnodes != G2->nnodes || G1->nopnodes != G2->nopnodes || G1->nvalnodes != G2->nvalnodes
1421 SCIP_CALL_ABORT( createOrDetermineSizeGraphCheck(scip, G1, G2, TRUE, NULL, &nnodes, &nedges, °rees, &maxdegrees,
1462 SG_ALLOC(SG, (size_t) nnodes, 2 * (size_t)(unsigned) nedges, "malloc"); /*lint !e647*//*lint !e774*//*lint !e571*/
1468 SCIP_CALL_ABORT( createOrDetermineSizeGraphCheck(scip, G1, G2, FALSE, &SG, &nnodes, &nedges, °rees, &maxdegrees,
1538 SCIP_CALL( SCIPgetIntParam(scip, "propagating/symmetry/nautymaxncells", &data_.maxncells) ); /*lint !e641*//*lint !e732*/
1539 SCIP_CALL( SCIPgetIntParam(scip, "propagating/symmetry/nautymaxnnodes", &data_.maxnnodes) ); /*lint !e641*//*lint !e732*/
interface for symmetry computations
SCIP_Bool SYMcheckGraphsAreIdentical(SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH *G1, SYM_GRAPH *G2)
Definition: compute_symmetry_nauty.c:1394
static void nautyhook(int count, int *p, int *orbits, int numorbits, int stabvertex, int n)
Definition: compute_symmetry_nauty.c:89
const char * SYMsymmetryGetAddName(void)
Definition: compute_symmetry_nauty.c:1224
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)
Definition: compute_symmetry_nauty.c:776
static void nautyterminationhook(graph *g, int *lab, int *ptn, int level, int numcells, int tc, int code, int m, int n)
Definition: compute_symmetry_nauty.c:166
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)
Definition: compute_symmetry_nauty.c:352
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)
Definition: compute_symmetry_nauty.c:477
static SCIP_Bool isEdgeGroupable(SYM_GRAPH *symgraph, int edgeidx, SCIP_Bool groupbycons)
Definition: compute_symmetry_nauty.c:291
const char * SYMsymmetryGetAddDesc(void)
Definition: compute_symmetry_nauty.c:1230
SCIP_RETCODE SYMcomputeSymmetryGenerators(SCIP *scip, int maxgenerators, SYM_GRAPH *symgraph, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize, SCIP_Real *symcodetime)
Definition: compute_symmetry_nauty.c:1236
Constraint handler for linear constraints in their most general form, .
constraint handler for nonlinear constraints specified by algebraic expressions
private functions to work with algebraic expressions
power and signed power expression handlers
sum expression handler
variable expression handler
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:208
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:225
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
Definition: scip_param.c:269
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
Definition: scip_mem.h:107
#define SCIPallocClearBufferArray(scip, ptr, num)
Definition: scip_mem.h:126
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
Definition: scip_mem.h:99
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
Definition: scip_mem.h:111
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
Definition: scip_mem.h:105
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortIntIntInt(int *intarray1, int *intarray2, int *intarray3, int len)
SYM_NODETYPE SCIPgetSymgraphNodeType(SYM_GRAPH *graph, int nodeidx)
Definition: symmetry_graph.c:1534
int SCIPgetSymgraphEdgeFirst(SYM_GRAPH *graph, int edgeidx)
Definition: symmetry_graph.c:1488
SCIP_Bool SCIPhasGraphUniqueEdgetype(SYM_GRAPH *graph)
Definition: symmetry_graph.c:1613
int SCIPgetSymgraphVarnodeColor(SYM_GRAPH *graph, int nodeidx)
Definition: symmetry_graph.c:1512
SYM_SYMTYPE SCIPgetSymgraphSymtype(SYM_GRAPH *graph)
Definition: symmetry_graph.c:1428
int SCIPgetSymgraphEdgeSecond(SYM_GRAPH *graph, int edgeidx)
Definition: symmetry_graph.c:1500
int SCIPgetSymgraphNConsnodes(SYM_GRAPH *graph)
Definition: symmetry_graph.c:1458
SCIP_Bool SCIPisSymgraphEdgeColored(SYM_GRAPH *graph, int edgeidx)
Definition: symmetry_graph.c:1572
int SCIPgetSymgraphNodeColor(SYM_GRAPH *graph, int nodeidx)
Definition: symmetry_graph.c:1549
int SCIPgetSymgraphEdgeColor(SYM_GRAPH *graph, int edgeidx)
Definition: symmetry_graph.c:1587
Definition: objbenders.h:44
public methods for memory management
Definition: compute_symmetry_nauty.c:66
Definition: struct_symmetry.h:46
Definition: struct_scip.h:70
methods for dealing with symmetry detection graphs