assert( aut !=
NULL);
138assert( user_param !=
NULL);
149 boolisIdentity =
true;
168 for(
intj = 0; j < permlen; ++j)
170 if( (
int) aut[j] != j )
182 for(
intj = 0; j < permlen; ++j)
183p[j] = (
int) aut[j];
199assert( newsize >= data->
nperms);
235 "symmetry computation terminated early, because number of cells %d in Nauty exceeds limit of %d\n",
238 "for running full symmetry detection, increase value of parameter propagating/symmetry/nautymaxncells\n");
244 "symmetry computation terminated early, because number of" 247 "for running full symmetry detection, increase value of" 248 " parameter propagating/symmetry/nautymaxnnodes\n");
254nauty_kill_request = 1;
269static const char nautyname[] = {
'N',
'a',
'u',
't',
'y',
' ', NAUTYVERSIONID/10000 +
'0',
'.', (NAUTYVERSIONID%10000)/1000 +
'0',
'.', (NAUTYVERSIONID%1000)/10 +
'0',
'\0'};
271static const char nautyname[] = {
'T',
'r',
'a',
'c',
'e',
's',
' ', NAUTYVERSIONID/10000 +
'0',
'.', (NAUTYVERSIONID%10000)/1000 +
'0',
'.', (NAUTYVERSIONID%1000)/10 +
'0',
'\0'};
284 return "Computing Graph Automorphism Groups by Brendan D. McKay (users.cecs.anu.edu.au/~bdm/nauty)";
286 return "Computing Graph Automorphism Groups by Adolfo Piperno (pallini.di.uniroma1.it)";
291#define XSTR(x) STR(x) 296 return "sassy " XSTR(SASSY_VERSION_MAJOR)
"." XSTR(SASSY_VERSION_MINOR);
302 return "Symmetry preprocessor by Markus Anders (github.com/markusa4/sassy)";
310sassy::static_graph* G,
332assert( log10groupsize !=
NULL);
333assert( symcodetime !=
NULL);
363sassy::preprocessor sassy;
366sassy::configstruct sconfig;
367sconfig.CONFIG_PREP_DEACT_PROBE =
true;
368sassy.configure(&sconfig);
371sassy::sassy_hook sassyglue = [&](
intn,
const int* p,
intnsupp,
const int* suppa) {
372 sassyhook((
void*)&data, n, p, nsupp, suppa);
376sassy.reduce(G, &sassyglue);
380DYNALLSTAT(
int, lab, lab_sz);
381DYNALLSTAT(
int, ptn, ptn_sz);
384convert_sassy_to_nauty(G, &sg, &lab, &lab_sz, &ptn, &ptn_sz);
386DYNALLSTAT(
int, orbits, orbits_sz);
387DYNALLOC1(
int, orbits, orbits_sz, sg.nv,
"malloc");
388DEFAULTOPTIONS_SPARSEGRAPH(options);
390options.writeautoms =
FALSE;
391options.userautomproc = sassy::preprocessor::nauty_hook;
392options.defaultptn =
FALSE;
393 if( canterminateearly )
395*log10groupsize = 0.0;
397sparsenauty(&sg, lab, ptn, orbits, &options, &stats,
NULL);
398*log10groupsize = log10(stats.grpsize1 * sassy.base * pow(10.0, (
SCIP_Real) (stats.grpsize2 + sassy.exp)));
401convert_sassy_to_traces(&sassygraph, &sg, &lab, &lab_sz, &ptn, &ptn_sz);
403DYNALLSTAT(
int, orbits, orbits_sz);
404DYNALLOC1(
int, orbits, orbits_sz, sg.nv,
"malloc");
405DEFAULTOPTIONS_TRACES(options);
407options.writeautoms =
FALSE;
408options.userautomproc = sassy::preprocessor::traces_hook;
409options.defaultptn =
FALSE;
411Traces(&sg, lab, ptn, orbits, &options, &stats,
NULL);
412*log10groupsize = log10(stats.grpsize1 * sassy.base * pow(10.0, (
SCIP_Real) (stats.grpsize2 + sassy.exp)));
417DYNFREE(lab, lab_sz);
418DYNFREE(ptn, ptn_sz);
459assert( symgraph !=
NULL);
463assert( log10groupsize !=
NULL);
464assert( symcodetime !=
NULL);
474sassy::static_graph sassygraph;
503sassy::static_graph sassygraph;
518 for(
intp = 0; p <
nperms&& ! success; ++p)
520 for(
inti = 0; i < nnodesfromG1; ++i)
522 if(
perms[p][i] >= nnodesfromG1 )
530 for(
intp = 0; p <
nperms; ++p)
SCIP_RETCODE SYMbuildSassyGraph(SCIP *scip, sassy::static_graph *sassygraph, SYM_GRAPH *graph, SCIP_Bool *success)
SCIP_RETCODE SYMbuildSassyGraphCheck(SCIP *scip, sassy::static_graph *sassygraph, SYM_GRAPH *G1, SYM_GRAPH *G2, int *nnodes, int *nnodesfromG1, SCIP_Bool *success)
methods to build sassy graph for symmetry detection
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[]
const char * SYMsymmetryGetAddName(void)
static _Thread_local struct NAUTY_Data nautydata_
SCIP_Bool SYMcanComputeSymmetry(void)
const char * SYMsymmetryGetDesc(void)
static void sassyhook(void *user_param, int n, const int *aut, int nsupp, const int *suppa)
static void nautyterminationhook(graph *g, int *lab, int *ptn, int level, int numcells, int tc, int code, int m, int n)
static SCIP_RETCODE computeAutomorphisms(SCIP *scip, SYM_SYMTYPE symtype, sassy::static_graph *G, int nsymvars, int maxgenerators, int ***perms, int *nperms, int *nmaxperms, SCIP_Real *log10groupsize, SCIP_Bool restricttovars, SCIP_Real *symcodetime, SCIP_Bool canterminateearly)
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 SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SYM_SYMTYPE SCIPgetSymgraphSymtype(SYM_GRAPH *graph)
int SCIPgetSymgraphNVars(SYM_GRAPH *graph)
public methods for memory management
methods for dealing with symmetry detection graphs
enum SCIP_Retcode SCIP_RETCODE
enum SYM_Symtype SYM_SYMTYPE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4