37#include <bliss/defs.hh>
38#include <bliss/graph.hh>
75 const unsigned int*
aut
106 if ( (
int)
aut[
j] !=
j )
156#ifdef BLISS_PATCH_PRESENT
166 return "Computing Graph Automorphism Groups by T. Junttila and P. Kaski (users.aalto.fi/~tjunttil/bliss)";
198 if ( first < 0 &&
second < 0 )
204 if ( first < 0 ||
second < 0 )
210 if ( first >= 0 &&
second >= 0 )
218 else if ( first >= 0 )
307 SCIP_Real* log10groupsize,
308 SCIP_Bool restricttovars,
320 assert( maxgenerators >= 0 );
344 G->set_splitting_heuristic(bliss::Graph::shs_f);
346 G->set_component_recursion(
false);
349#if BLISS_VERSION_MAJOR >= 1 || BLISS_VERSION_MINOR >= 76
351 auto reportglue = [&](
unsigned int n,
const unsigned int*
aut) {
357 return (maxgenerators != 0 && data.
nperms >= maxgenerators);
365#ifdef BLISS_PATCH_PRESENT
369 G->set_search_limits(0, (
unsigned) maxgenerators);
373 G->find_automorphisms(stats,
blisshook, (
void*) &data);
413 SCIP_Real* log10groupsize,
464 int node = (int)
G.add_vertex((
unsigned)
color);
480 int node = (int)
G.add_vertex((
unsigned)
color);
607 for (
int v = 0; v < nsymvars; ++v)
608 G.add_edge(v, v + nsymvars);
646 if (
G1->nnodes !=
G2->nnodes ||
G1->nopnodes !=
G2->nopnodes ||
G1->nvalnodes !=
G2->nvalnodes
647 ||
G1->nconsnodes !=
G2->nconsnodes ||
G1->nedges !=
G2->nedges )
664 for (
i = 0;
i <
G1->nedges; ++
i)
666 if (
G1->edgefirst[
i] < 0 )
668 if (
G2->edgefirst[
i] < 0 )
670 if (
G1->edgesecond[
i] < 0 )
672 if (
G2->edgesecond[
i] < 0 )
701 for (
i = 0;
i <
G1->nnodes; ++
i)
704 for (
i = 0;
i <
G1->nedges; ++
i)
706 int first =
G1->edgefirst[
i];
735 for (
i = 0;
i <
G1->nsymvars; ++
i)
750 for (
i = 0;
i <
G2->nnodes; ++
i)
753 for (
i = 0;
i <
G2->nedges; ++
i)
755 int first =
G2->edgefirst[
i];
784 for (
i = 0;
i <
G2->nsymvars; ++
i)
798 SCIP_Real log10groupsize;
799 int n =
G.get_nof_vertices();
822 for (
int p = 0;
p < nperms; ++
p)
interface for symmetry computations
SCIP_Bool SYMcheckGraphsAreIdentical(SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH *G1, SYM_GRAPH *G2)
const char * SYMsymmetryGetName(void)
const char * SYMsymmetryGetAddName(void)
SCIP_RETCODE SYMcomputeSymmetryGenerators(SCIP *scip, int maxgenerators, SYM_GRAPH *graph, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize, SCIP_Real *symcodetime)
static SCIP_RETCODE computeAutomorphisms(SCIP *scip, SYM_SYMTYPE symtype, bliss::Graph *G, int nsymvars, int maxgenerators, int ***perms, int *nperms, int *nmaxperms, SCIP_Real *log10groupsize, SCIP_Bool restricttovars, SCIP_Real *symcodetime)
SCIP_Bool SYMcanComputeSymmetry(void)
static void blisshook(void *user_param, unsigned int n, const unsigned int *aut)
static SCIP_RETCODE addGroupedEdges(bliss::Graph *G, int commonnodeidx, int *neighbors, int *colors, int nneighbors, int *naddednodes, int *naddededges)
const char * SYMsymmetryGetDesc(void)
SCIP_Bool isEdgeGroupable(SYM_GRAPH *graph, int edgeidx, SCIP_Bool groupbycons)
const char * SYMsymmetryGetAddDesc(void)
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
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#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)
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))
methods for handling symmetries
methods for dealing with symmetry detection graphs
enum SCIP_Retcode SCIP_RETCODE
enum SYM_Symtype SYM_SYMTYPE
enum SYM_Nodetype SYM_NODETYPE