compute_symmetry_nauty.c
Go to the documentation of this file.
30/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
150 if ( SCIPreallocBlockMemoryArray(data_.scip, &data_.perms, data_.nmaxperms, newsize) != SCIP_OKAY )
227 if ( SCIPreallocBlockMemoryArray(data_.scip, &data_.perms, data_.nmaxperms, newsize) != SCIP_OKAY )
307 SCIP_Bool determinesize, /**< whether only the effect of grouping on the graph shall be checked */
312 int* ncolorstostore, /**< (initialized) pointer to maximum number of entries in colorstostore */
534 /* loop through all edges of the symmetry detection graph and either get degrees of nodes or add edges */
554 if ( ! SCIPhasGraphUniqueEdgetype(symgraph) && isEdgeGroupable(symgraph, e, groupByConstraints) )
644 /* if a new first node has been found, group the edges of the previous first node; ignoring the last group */
887 /* collect information or generate graphs, we shift the node indices of the second graph when adding them to G */
932 /* loop through all edges of the symmetry detection graph and either get degrees of nodes or add edges */
950 if ( ! SCIPhasGraphUniqueEdgetype(symgraph) && isEdgeGroupable(symgraph, e, groupByConstraints) )
978 SCIP_CALL( SCIPensureBlockMemoryArray(scip, degrees, maxdegrees, nodeshift + internodeid + 1) );
1023 assert( nodeshift+first == *nnodes - 1 || pos[nodeshift+first] <= (int) SG->v[nodeshift+first+1] );
1024 assert( nodeshift+second == *nnodes - 1 || pos[nodeshift+second] <= (int) SG->v[nodeshift+second+1] );
1044 /* if a new first node has been found, group the edges of the previous first node; ignoring the last group */
1066 &groupseconds[firstidx], &groupcolors[firstidx], ngroupedges - firstidx, &naddednodes, &naddededges) );
1157 (void) SCIPsnprintf(nautyname, (int)sizeof(nautyname), "Nauty %d.%d.%d", NAUTYVERSIONID/10000, (NAUTYVERSIONID%10000)/1000, (NAUTYVERSIONID%1000)/10);
1159 (void) SCIPsnprintf(nautyname, (int)sizeof(nautyname), "Traces %d.%d.%d", NAUTYVERSIONID/10000, (NAUTYVERSIONID%10000)/1000, (NAUTYVERSIONID%1000)/10);
1168 return "Computing Graph Automorphism Groups by Brendan D. McKay (https://users.cecs.anu.edu.au/~bdm/nauty/)";
1170 return "Computing Graph Automorphism Groups by Adolfo Piperno (https://pallini.di.uniroma1.it/)";
1192 int* nmaxperms, /**< pointer to store maximal number of permutations (needed for freeing storage) */
1258 SG_ALLOC(SG, (size_t) nnodes, 2 * (size_t)(unsigned) nedges, "malloc"); /*lint !e647*//*lint !e774*//*lint !e571*/
1364 if ( G1->nnodes != G2->nnodes || G1->nopnodes != G2->nopnodes || G1->nvalnodes != G2->nvalnodes
1368 SCIP_CALL_ABORT( createOrDetermineSizeGraphCheck(scip, G1, G2, TRUE, NULL, &nnodes, &nedges, °rees, &maxdegrees,
1409 SG_ALLOC(SG, (size_t) nnodes, 2 * (size_t)(unsigned) nedges, "malloc"); /*lint !e647*//*lint !e774*//*lint !e571*/
1415 SCIP_CALL_ABORT( createOrDetermineSizeGraphCheck(scip, G1, G2, FALSE, &SG, &nnodes, &nedges, °rees, &maxdegrees,
interface for symmetry computations
SCIP_Bool SYMcheckGraphsAreIdentical(SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH *G1, SYM_GRAPH *G2)
Definition: compute_symmetry_nauty.c:1341
static void nautyhook(int count, int *p, int *orbits, int numorbits, int stabvertex, int n)
Definition: compute_symmetry_nauty.c:86
const char * SYMsymmetryGetAddName(void)
Definition: compute_symmetry_nauty.c:1175
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:727
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:303
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:428
static SCIP_Bool isEdgeGroupable(SYM_GRAPH *symgraph, int edgeidx, SCIP_Bool groupbycons)
Definition: compute_symmetry_nauty.c:242
const char * SYMsymmetryGetAddDesc(void)
Definition: compute_symmetry_nauty.c:1181
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:1187
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
#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
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
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsortIntIntInt(int *intarray1, int *intarray2, int *intarray3, int len)
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