Detailed Description
interface for symmetry computations to bliss
Definition in file compute_symmetry_bliss.cpp.
#include "compute_symmetry.h"
#include <bliss/defs.hh>
#include <bliss/graph.hh>
#include <vector>
#include <list>
#include <math.h>
Go to the source code of this file.
Data Structures | |
struct | BLISS_Data |
Functions | |
static void | blisshook (void *user_param, unsigned int n, const unsigned int *aut) |
static SCIP_RETCODE | fillGraphByColoredCoefficients (SCIP *scip, bliss::Graph *G, SYM_MATRIXDATA *matrixdata, int &nnodes, int &nedges, SCIP_Bool &success) |
SCIP_Bool | SYMcanComputeSymmetry (void) |
const char * | SYMsymmetryGetName (void) |
const char * | SYMsymmetryGetDesc (void) |
SCIP_RETCODE | SYMcomputeSymmetryGenerators (SCIP *scip, int maxgenerators, SYM_MATRIXDATA *matrixdata, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize) |
Variables | |
static char | blissname [100] |
Function Documentation
◆ blisshook()
|
static |
callback function for bliss
- Parameters
-
user_param parameter supplied at call to bliss n size of aut vector aut automorphism
Definition at line 48 of file compute_symmetry_bliss.cpp.
References BLISS_Data::maxgenerators, BLISS_Data::nmaxperms, BLISS_Data::nperms, BLISS_Data::npermvars, NULL, BLISS_Data::perms, BLISS_Data::scip, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPfreeBlockMemoryArray, and SCIPreallocBlockMemoryArray.
Referenced by SYMcomputeSymmetryGenerators().
◆ fillGraphByColoredCoefficients()
|
static |
Construct colored graph for symmetry computations
Construct bipartite graph:
- Each variable gets a different node.
- Each constraint gets a different node.
- Each matrix coefficient gets a different node that is conntected to the two nodes corresponding to the constraint and variable.
Each different variable, rhs, and matrix coefficient type gets a different color that is attached to the corresponding entries.
- Parameters
-
scip SCIP instance G Graph to be constructed matrixdata data for MIP matrix nnodes number of nodes in graph nedges number of edges in graph success whether the construction was successful
Definition at line 113 of file compute_symmetry_bliss.cpp.
References FALSE, SYM_Matrixdata::matcoef, SYM_Matrixdata::matcoefcolors, SYM_Matrixdata::matidx, SYM_Matrixdata::matrhsidx, SYM_Matrixdata::matvaridx, SYM_Matrixdata::nmatcoef, nnodes, BLISS_Data::npermvars, SYM_Matrixdata::npermvars, SYM_Matrixdata::nrhscoef, NULL, SYM_Matrixdata::nuniquemat, SYM_Matrixdata::nuniquerhs, SYM_Matrixdata::nuniquevars, SYM_Matrixdata::permvarcolors, SYM_Matrixdata::rhscoefcolors, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPisEQ(), and TRUE.
Referenced by SYMcomputeSymmetryGenerators().
◆ SYMcanComputeSymmetry()
SCIP_Bool SYMcanComputeSymmetry | ( | void | ) |
return whether symmetry can be computed
Definition at line 271 of file compute_symmetry_bliss.cpp.
References TRUE.
◆ SYMsymmetryGetName()
const char* SYMsymmetryGetName | ( | void | ) |
return name of external program used to compute generators
Definition at line 280 of file compute_symmetry_bliss.cpp.
References blissname.
◆ SYMsymmetryGetDesc()
const char* SYMsymmetryGetDesc | ( | void | ) |
return description of external program used to compute generators
Definition at line 291 of file compute_symmetry_bliss.cpp.
◆ SYMcomputeSymmetryGenerators()
SCIP_RETCODE SYMcomputeSymmetryGenerators | ( | SCIP * | scip, |
int | maxgenerators, | ||
SYM_MATRIXDATA * | matrixdata, | ||
int * | nperms, | ||
int * | nmaxperms, | ||
int *** | perms, | ||
SCIP_Real * | log10groupsize | ||
) |
compute generators of symmetry group
- Parameters
-
scip SCIP pointer maxgenerators maximal number of generators constructed (= 0 if unlimited) matrixdata data for MIP matrix nperms pointer to store number of permutations nmaxperms pointer to store maximal number of permutations (needed for freeing storage) perms pointer to store permutation generators as (nperms x npermvars) matrix log10groupsize pointer to store size of group
Definition at line 297 of file compute_symmetry_bliss.cpp.
References blisshook(), FALSE, fillGraphByColoredCoefficients(), BLISS_Data::maxgenerators, BLISS_Data::nmaxperms, nnodes, BLISS_Data::nperms, BLISS_Data::npermvars, SYM_Matrixdata::npermvars, NULL, BLISS_Data::perms, BLISS_Data::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPallocBlockMemoryArray, SCIPdebugMsg, and SCIPverbMessage().
Variable Documentation
◆ blissname
|
static |
static variable for holding the name of bliss
Definition at line 277 of file compute_symmetry_bliss.cpp.
Referenced by SYMsymmetryGetName().