SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
PublicSymmetryGraphMethods

Detailed Description

Functions

SCIP_RETCODE SCIPcreateSymgraph (SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH **graph, SCIP_VAR **symvars, int nsymvars, int nopnodes, int nvalnodes, int nconsnodes, int nedges)
 
SCIP_RETCODE SCIPfreeSymgraph (SCIP *scip, SYM_GRAPH **graph)
 
SCIP_RETCODE SCIPcopySymgraph (SCIP *scip, SYM_GRAPH **graph, SYM_GRAPH *origgraph, int *perm, SYM_SPEC fixedtype)
 
SCIP_RETCODE SCIPextendPermsymDetectionGraphLinear (SCIP *scip, SYM_GRAPH *graph, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool *success)
 
SCIP_RETCODE SCIPaddSymgraphVarAggregation (SCIP *scip, SYM_GRAPH *graph, int rootidx, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Real constant)
 
SCIP_RETCODE SCIPaddSymgraphOpnode (SCIP *scip, SYM_GRAPH *graph, int op, int *nodeidx)
 
SCIP_RETCODE SCIPaddSymgraphValnode (SCIP *scip, SYM_GRAPH *graph, SCIP_Real val, int *nodeidx)
 
SCIP_RETCODE SCIPaddSymgraphConsnode (SCIP *scip, SYM_GRAPH *graph, SCIP_CONS *cons, SCIP_Real lhs, SCIP_Real rhs, int *nodeidx)
 
int SCIPgetSymgraphVarnodeidx (SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
 
int SCIPgetSymgraphNegatedVarnodeidx (SCIP *scip, SYM_GRAPH *graph, SCIP_VAR *var)
 
SCIP_RETCODE SCIPupdateSymgraphLhs (SYM_GRAPH *graph, int nodeidx, SCIP_Real newlhs)
 
SCIP_RETCODE SCIPupdateSymgraphRhs (SYM_GRAPH *graph, int nodeidx, SCIP_Real newrhs)
 
SCIP_RETCODE SCIPfixSymgraphVarnode (SYM_GRAPH *graph, SCIP_VAR *var)
 
SCIP_RETCODE SCIPaddSymgraphEdge (SCIP *scip, SYM_GRAPH *graph, int first, int second, SCIP_Bool hasval, SCIP_Real val)
 
SCIP_RETCODE SCIPcomputeSymgraphColors (SCIP *scip, SYM_GRAPH *graph, SYM_SPEC fixedtype)
 
SYM_SYMTYPE SCIPgetSymgraphSymtype (SYM_GRAPH *graph)
 
SCIP_VAR ** SCIPgetSymgraphVars (SYM_GRAPH *graph)
 
int SCIPgetSymgraphNVars (SYM_GRAPH *graph)
 
int SCIPgetSymgraphNConsnodes (SYM_GRAPH *graph)
 
int SCIPgetSymgraphNNodes (SYM_GRAPH *graph)
 
int SCIPgetSymgraphNEdges (SYM_GRAPH *graph)
 
int SCIPgetSymgraphEdgeFirst (SYM_GRAPH *graph, int edgeidx)
 
int SCIPgetSymgraphEdgeSecond (SYM_GRAPH *graph, int edgeidx)
 
int SCIPgetSymgraphVarnodeColor (SYM_GRAPH *graph, int nodeidx)
 
SYM_NODETYPE SCIPgetSymgraphNodeType (SYM_GRAPH *graph, int nodeidx)
 
int SCIPgetSymgraphNodeColor (SYM_GRAPH *graph, int nodeidx)
 
SCIP_Bool SCIPisSymgraphEdgeColored (SYM_GRAPH *graph, int edgeidx)
 
int SCIPgetSymgraphEdgeColor (SYM_GRAPH *graph, int edgeidx)
 
int SCIPgetSymgraphNVarcolors (SYM_GRAPH *graph)
 
SCIP_Bool SCIPhasGraphUniqueEdgetype (SYM_GRAPH *graph)
 
SCIP_RETCODE SCIPallocateSymgraphConsnodeperm (SCIP *scip, SYM_GRAPH *graph)
 
SCIP_RETCODE SCIPcreateSymgraphConsnodeperm (SCIP *scip, SYM_GRAPH *graph)
 
int * SCIPgetSymgraphConsnodeperm (SCIP *scip, SYM_GRAPH *graph)
 
SCIP_RETCODE SCIPfreeSymgraphConsnodeperm (SCIP *scip, SYM_GRAPH *graph)
 
SCIP_RETCODE SCIPgetSymActiveVariables (SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
 
SCIP_RETCODE SCIPfreeSymDataExpr (SCIP *scip, SYM_EXPRDATA **symdata)
 
int SCIPgetSymExprdataNConstants (SYM_EXPRDATA *symdata)
 
SCIP_RealSCIPgetSymExprdataConstants (SYM_EXPRDATA *symdata)
 
SCIP_RETCODE SCIPgetCoefSymData (SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR *parentexpr, SCIP_Real *coef, SCIP_Bool *success)
 

Function Documentation

◆ SCIPcreateSymgraph()

SCIP_RETCODE SCIPcreateSymgraph ( SCIP * scip,
SYM_SYMTYPE symtype,
SYM_GRAPH ** graph,
SCIP_VAR ** symvars,
int nsymvars,
int nopnodes,
int nvalnodes,
int nconsnodes,
int nedges )

creates and initializes a symmetry detection graph with memory for the given number of nodes and edges

Note
at some point, the graph needs to be freed!

creates and initializes a symmetry detection graph with memory for the given number of nodes and edges

Note
At some point, the graph needs to be freed!
Parameters
scipSCIP data structure
symtypetype of symmetries encoded in graph
graphpointer to hold symmetry detection graph
symvarsvariables used in symmetry detection
nsymvarsnumber of variables used in symmetry detection
nopnodesnumber of operator nodes
nvalnodesnumber of value nodes
nconsnodesnumber of constraint nodes
nedgesnumber of edges

Definition at line 44 of file symmetry_graph.c.

References assert(), FALSE, nnodes, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPallocClearBlockMemoryArray, and SCIPinfinity().

Referenced by checkSymmetriesAreSymmetries(), computeSymmetryGroup(), and SCIPcopySymgraph().

◆ SCIPfreeSymgraph()

SCIP_RETCODE SCIPfreeSymgraph ( SCIP * scip,
SYM_GRAPH ** graph )

frees a symmetry detection graph

Parameters
scipSCIP data structure
graphpointer to symmetry detection graph

Definition at line 111 of file symmetry_graph.c.

References assert(), NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SYM_SYMTYPE_PERM, and SYM_SYMTYPE_SIGNPERM.

Referenced by checkSymmetriesAreSymmetries(), and computeSymmetryGroup().

◆ SCIPcopySymgraph()

SCIP_RETCODE SCIPcopySymgraph ( SCIP * scip,
SYM_GRAPH ** graph,
SYM_GRAPH * origgraph,
int * perm,
SYM_SPEC fixedtype )

◆ SCIPextendPermsymDetectionGraphLinear()

SCIP_RETCODE SCIPextendPermsymDetectionGraphLinear ( SCIP * scip,
SYM_GRAPH * graph,
SCIP_VAR ** vars,
SCIP_Real * vals,
int nvars,
SCIP_CONS * cons,
SCIP_Real lhs,
SCIP_Real rhs,
SCIP_Bool * success )

adds a symmetry detection graph for a linear constraint to existing graph

For permutation symmetries, a constraint node is added that is connected to all variable nodes in the constraint. Edges are colored according to the variable coefficients. For signed permutation symmetries, also edges connecting the constraint node and the negated variable nodes are added, these edges are colored by the negative coefficients.

Parameters
scipSCIP data structure
graphsymmetry detection graph
varsvariable array of linear constraint
valscoefficients of linear constraint
nvarsnumber of variables in linear constraint
consconstraint for which we encode symmetries
lhsleft-hand side of constraint
rhsright-hand side of constraint
successpointer to store whether graph could be built

Definition at line 226 of file symmetry_graph.c.

References assert(), i, SYM_Graph::islocked, SYM_Graph::nsymvars, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPaddSymgraphConsnode(), SCIPaddSymgraphEdge(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphSymtype(), SCIPgetSymgraphVarnodeidx(), SCIPvarGetProbindex(), SYM_SYMTYPE_PERM, SYM_SYMTYPE_SIGNPERM, TRUE, and vars.

Referenced by addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), and addSymmetryInformation().

◆ SCIPaddSymgraphVarAggregation()

SCIP_RETCODE SCIPaddSymgraphVarAggregation ( SCIP * scip,
SYM_GRAPH * graph,
int rootidx,
SCIP_VAR ** vars,
SCIP_Real * vals,
int nvars,
SCIP_Real constant )

adds nodes and edges corresponding to the aggregation of a variable to a symmetry detection graph

For permutation symmetries, the root node is connected with all variable nodes in the aggregation. Edges are colored according to the variable coefficients. For signed permutation symmetries, also edges connecting the root node and the negated variable nodes are added, these edges are colored by the negative coefficients.

Parameters
scipSCIP data structure
graphsymmetry detection graph
rootidxindex of root node of the aggegration
varsarray of variables in aggregation
valscoefficients of variables
nvarsnumber of variables in aggregation
constantconstant of aggregation

Definition at line 294 of file symmetry_graph.c.

References assert(), FALSE, SYM_Graph::nsymvars, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPaddSymgraphEdge(), SCIPaddSymgraphValnode(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphSymtype(), SCIPgetSymgraphVarnodeidx(), SCIPisZero(), SCIPvarGetProbindex(), SYM_SYMTYPE_PERM, SYM_SYMTYPE_SIGNPERM, TRUE, and vars.

Referenced by addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), SCIP_DECL_CONSGETPERMSYMGRAPH(), SCIP_DECL_CONSGETPERMSYMGRAPH(), SCIP_DECL_CONSGETPERMSYMGRAPH(), and SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH().

◆ SCIPaddSymgraphOpnode()

◆ SCIPaddSymgraphValnode()

◆ SCIPaddSymgraphConsnode()

◆ SCIPgetSymgraphVarnodeidx()

◆ SCIPgetSymgraphNegatedVarnodeidx()

◆ SCIPupdateSymgraphLhs()

SCIP_RETCODE SCIPupdateSymgraphLhs ( SYM_GRAPH * graph,
int nodeidx,
SCIP_Real newlhs )

updates the lhs of a constraint node

Parameters
graphsymmetry detection graph
nodeidxindex of constraint node in graph
newlhsnew left-hand side of node

Definition at line 553 of file symmetry_graph.c.

References assert(), SYM_Graph::lhs, SYM_Graph::nodeinfopos, SYM_Graph::nodetypes, NULL, SCIP_OKAY, and SYM_NODETYPE_CONS.

◆ SCIPupdateSymgraphRhs()

SCIP_RETCODE SCIPupdateSymgraphRhs ( SYM_GRAPH * graph,
int nodeidx,
SCIP_Real newrhs )

updates the rhs of a constraint node

Parameters
graphsymmetry detection graph
nodeidxindex of constraint node in graph
newrhsnew reft-hand side of node

Definition at line 569 of file symmetry_graph.c.

References assert(), SYM_Graph::nodeinfopos, SYM_Graph::nodetypes, NULL, SYM_Graph::rhs, SCIP_OKAY, and SYM_NODETYPE_CONS.

◆ SCIPfixSymgraphVarnode()

SCIP_RETCODE SCIPfixSymgraphVarnode ( SYM_GRAPH * graph,
SCIP_VAR * var )

registers a variable node (corresponding to active variable) to be fixed by symmetry

Parameters
graphsymmetry detection graph
varactive variable that needs to be fixed

Definition at line 585 of file symmetry_graph.c.

References assert(), SYM_Graph::isfixedvar, NULL, SCIP_OKAY, SCIPvarGetProbindex(), TRUE, var, and varidx.

◆ SCIPaddSymgraphEdge()

◆ SCIPcomputeSymgraphColors()

SCIP_RETCODE SCIPcomputeSymgraphColors ( SCIP * scip,
SYM_GRAPH * graph,
SYM_SPEC fixedtype )

computes colors of nodes and edges

computes colors of nodes and edges

Colors are detected by sorting different types of nodes (variables, operators, values, and constraint) and edges. If two consecutive nodes of the same type differ (e.g., different variable type), they are assigned a new color.

Parameters
scipSCIP data structure
graphsymmetry detection graph
fixedtypevariable types that must be fixed by symmetries

Definition at line 1185 of file symmetry_graph.c.

References assert(), compareConsnodes(), compareOps(), compareVars(), compareVarsSignedPerm(), SYM_Graph::conscolors, SYM_Graph::edgecolors, FALSE, i, isFixedVar(), SYM_Graph::isfixedvar, SYM_Graph::islocked, SYM_Graph::nconsnodes, SYM_Graph::nedges, SYM_Graph::nopnodes, SYM_Graph::nsymvars, NULL, SYM_Graph::nvalnodes, SYM_Graph::opcolors, SYM_Graph::ops, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPisEQ(), SCIPisInfinity(), SCIPsort(), SYM_SYMTYPE_PERM, SYM_SYMTYPE_SIGNPERM, SYM_Graph::symtype, SYM_Graph::symvars, TRUE, SYM_Graph::valcolors, SYM_Graph::vals, and SYM_Graph::varcolors.

Referenced by checkSymmetriesAreSymmetries(), computeSymmetryGroup(), and SCIPcopySymgraph().

◆ SCIPgetSymgraphSymtype()

◆ SCIPgetSymgraphVars()

SCIP_VAR ** SCIPgetSymgraphVars ( SYM_GRAPH * graph)

returns the variables in a symmetry detection graph

Parameters
graphsymmetry detection graph

Definition at line 1438 of file symmetry_graph.c.

References assert(), NULL, and SYM_Graph::symvars.

◆ SCIPgetSymgraphNVars()

int SCIPgetSymgraphNVars ( SYM_GRAPH * graph)

returns the number of variables in a symmetry detection graph

Parameters
graphsymmetry detection graph

Definition at line 1448 of file symmetry_graph.c.

References assert(), SYM_Graph::nsymvars, and NULL.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), createOrDetermineSizeGraphCheck(), SYMcheckGraphsAreIdentical(), SYMcomputeSymmetryGenerators(), and SYMcomputeSymmetryGenerators().

◆ SCIPgetSymgraphNConsnodes()

int SCIPgetSymgraphNConsnodes ( SYM_GRAPH * graph)

returns the number of constraint nodes in a symmetry detection graph

Parameters
graphsymmetry detection graph

Definition at line 1458 of file symmetry_graph.c.

References assert(), SYM_Graph::nconsnodes, and NULL.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), createOrDetermineSizeGraphCheck(), and SYMcomputeSymmetryGenerators().

◆ SCIPgetSymgraphNNodes()

int SCIPgetSymgraphNNodes ( SYM_GRAPH * graph)

◆ SCIPgetSymgraphNEdges()

int SCIPgetSymgraphNEdges ( SYM_GRAPH * graph)

returns the number of edges in a graph

Parameters
graphsymmetry detection graph

Definition at line 1478 of file symmetry_graph.c.

References assert(), SYM_Graph::nedges, and NULL.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), createOrDetermineSizeGraphCheck(), and SYMcomputeSymmetryGenerators().

◆ SCIPgetSymgraphEdgeFirst()

int SCIPgetSymgraphEdgeFirst ( SYM_GRAPH * graph,
int edgeidx )

return the first node index of an edge

Parameters
graphsymmetry detection graph
edgeidxindex of edge

Definition at line 1488 of file symmetry_graph.c.

References assert(), SYM_Graph::edgefirst, and NULL.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), createOrDetermineSizeGraphCheck(), isEdgeGroupable(), isEdgeGroupable(), isEdgeGroupable(), SCIPcopySymgraph(), and SYMcomputeSymmetryGenerators().

◆ SCIPgetSymgraphEdgeSecond()

int SCIPgetSymgraphEdgeSecond ( SYM_GRAPH * graph,
int edgeidx )

return the second node index of an edge

Parameters
graphsymmetry detection graph
edgeidxindex of edge

Definition at line 1500 of file symmetry_graph.c.

References assert(), SYM_Graph::edgesecond, and NULL.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), createOrDetermineSizeGraphCheck(), isEdgeGroupable(), isEdgeGroupable(), isEdgeGroupable(), SCIPcopySymgraph(), and SYMcomputeSymmetryGenerators().

◆ SCIPgetSymgraphVarnodeColor()

int SCIPgetSymgraphVarnodeColor ( SYM_GRAPH * graph,
int nodeidx )

returns the color of a variable node

Parameters
graphsymmetry detection graph
nodeidxindex of variable node

Definition at line 1512 of file symmetry_graph.c.

References assert(), SYM_Graph::islocked, NULL, SYM_SYMTYPE_PERM, SYM_SYMTYPE_SIGNPERM, SYM_Graph::symtype, and SYM_Graph::varcolors.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), and SYMcomputeSymmetryGenerators().

◆ SCIPgetSymgraphNodeType()

SYM_NODETYPE SCIPgetSymgraphNodeType ( SYM_GRAPH * graph,
int nodeidx )

◆ SCIPgetSymgraphNodeColor()

◆ SCIPisSymgraphEdgeColored()

SCIP_Bool SCIPisSymgraphEdgeColored ( SYM_GRAPH * graph,
int edgeidx )

◆ SCIPgetSymgraphEdgeColor()

int SCIPgetSymgraphEdgeColor ( SYM_GRAPH * graph,
int edgeidx )

◆ SCIPgetSymgraphNVarcolors()

int SCIPgetSymgraphNVarcolors ( SYM_GRAPH * graph)

returns the number of unique variable colors in the graph

Parameters
graphsymmetry detection graph

Definition at line 1600 of file symmetry_graph.c.

References assert(), SYM_Graph::nsymvars, NULL, and SYM_Graph::nvarcolors.

Referenced by computeSymmetryGroup().

◆ SCIPhasGraphUniqueEdgetype()

SCIP_Bool SCIPhasGraphUniqueEdgetype ( SYM_GRAPH * graph)

returns whether the graph has a unique edge type

Parameters
graphsymmetry detection graph

Definition at line 1613 of file symmetry_graph.c.

References assert(), NULL, and SYM_Graph::uniqueedgetype.

Referenced by createOrDetermineSizeGraph(), createOrDetermineSizeGraph(), createOrDetermineSizeGraphCheck(), createOrDetermineSizeGraphCheck(), and SYMcomputeSymmetryGenerators().

◆ SCIPallocateSymgraphConsnodeperm()

SCIP_RETCODE SCIPallocateSymgraphConsnodeperm ( SCIP * scip,
SYM_GRAPH * graph )

creates consnodeperm array for symmetry detection graph

Note
colors of symmetry detection graph must have been computed
Parameters
scipSCIP data structure
graphsymmetry detection graph

◆ SCIPcreateSymgraphConsnodeperm()

SCIP_RETCODE SCIPcreateSymgraphConsnodeperm ( SCIP * scip,
SYM_GRAPH * graph )

creates consnodeperm array for symmetry detection graph

Note
colors of symmetry detection graph must have been computed
Parameters
scipSCIP data structure
graphsymmetry detection graph

Definition at line 1626 of file symmetry_graph.c.

References assert(), SYM_Graph::consnodeperm, SYM_Graph::islocked, SYM_Graph::nconsnodes, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and SCIPsort().

Referenced by checkSymmetriesAreSymmetries(), and SCIPgetSymgraphConsnodeperm().

◆ SCIPgetSymgraphConsnodeperm()

int * SCIPgetSymgraphConsnodeperm ( SCIP * scip,
SYM_GRAPH * graph )

returns consnodeperm array for symmetry detection graph

Note
colors of symmetry detection graph must have been computed
Parameters
scipSCIP data structure
graphsymmetry detection graph

Definition at line 1664 of file symmetry_graph.c.

References assert(), SYM_Graph::consnodeperm, SYM_Graph::islocked, NULL, SCIP_CALL_ABORT, and SCIPcreateSymgraphConsnodeperm().

◆ SCIPfreeSymgraphConsnodeperm()

SCIP_RETCODE SCIPfreeSymgraphConsnodeperm ( SCIP * scip,
SYM_GRAPH * graph )

frees consnodeperm array for symmetry detection graph

Parameters
scipSCIP data structure
graphsymmetry detection graph

Definition at line 1646 of file symmetry_graph.c.

References assert(), SYM_Graph::consnodeperm, SYM_Graph::islocked, SYM_Graph::nconsnodes, NULL, SCIP_OKAY, and SCIPfreeBlockMemoryArrayNull.

Referenced by checkSymmetriesAreSymmetries().

◆ SCIPgetSymActiveVariables()

SCIP_RETCODE SCIPgetSymActiveVariables ( SCIP * scip,
SYM_SYMTYPE symtype,
SCIP_VAR *** vars,
SCIP_Real ** scalars,
int * nvars,
SCIP_Real * constant,
SCIP_Bool transformed )

Transforms given variables, scalars, and constant to the corresponding active variables, scalars, and constant.

For permutation symmetries, active variables as encoded in SCIP are used. For signed permutation symmetries, active variables are shifted such that their domain is centered at 0 (if both their upper and lower bounds are finite).

Note
constant needs to be initialized!
Parameters
scipSCIP data structure
symtypetype of symmetries for which variables are required
varspointer to vars array to get active variables for
scalarspointer to scalars a_1, ..., a_n in linear sum a_1*x_1 + ... + a_n*x_n + c
nvarspointer to number of variables and values in vars and vals array
constantpointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c
transformedtransformed constraint?

Definition at line 1686 of file symmetry_graph.c.

References assert(), NULL, nvars, scalars, SCIP_CALL, SCIP_OKAY, SCIPgetProbvarLinearSum(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetLbGlobal(), SCIPvarGetOrigvarSum(), SCIPvarGetUbGlobal(), SYM_SYMTYPE_SIGNPERM, TRUE, and vars.

Referenced by addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), addSymmetryInformation(), SCIP_DECL_CONSGETPERMSYMGRAPH(), SCIP_DECL_CONSGETPERMSYMGRAPH(), SCIP_DECL_CONSGETPERMSYMGRAPH(), SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(), SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(), SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(), tryAddGadgetBilinearProductSignedPerm(), tryAddGadgetEvenOperatorSum(), tryAddGadgetEvenOperatorVariable(), and tryAddGadgetSquaredDifference().

◆ SCIPfreeSymDataExpr()

SCIP_RETCODE SCIPfreeSymDataExpr ( SCIP * scip,
SYM_EXPRDATA ** symdata )

frees symmetry information of an expression

Parameters
scipSCIP data structure
symdatasymmetry information of an expression

Definition at line 1750 of file symmetry_graph.c.

References assert(), NULL, SCIP_OKAY, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.

Referenced by addSymmetryInformation(), isEvenOperator(), SCIPgetCoefSymData(), tryAddGadgetBilinearProductSignedPerm(), and tryAddGadgetSquaredDifference().

◆ SCIPgetSymExprdataNConstants()

int SCIPgetSymExprdataNConstants ( SYM_EXPRDATA * symdata)

returns number of coefficients from exprdata

Parameters
symdatasymmetry information of an expression

Definition at line 1773 of file symmetry_graph.c.

References assert(), SYM_ExprData::nconstants, and NULL.

Referenced by addSymmetryInformation(), isEvenOperator(), tryAddGadgetBilinearProductSignedPerm(), and tryAddGadgetSquaredDifference().

◆ SCIPgetSymExprdataConstants()

SCIP_Real * SCIPgetSymExprdataConstants ( SYM_EXPRDATA * symdata)

returns number of coefficients form exprdata

Parameters
symdatasymmetry information of an expression

Definition at line 1783 of file symmetry_graph.c.

References assert(), SYM_ExprData::constants, and NULL.

Referenced by addSymmetryInformation(), isEvenOperator(), tryAddGadgetBilinearProductSignedPerm(), and tryAddGadgetSquaredDifference().

◆ SCIPgetCoefSymData()

SCIP_RETCODE SCIPgetCoefSymData ( SCIP * scip,
SCIP_EXPR * expr,
SCIP_EXPR * parentexpr,
SCIP_Real * coef,
SCIP_Bool * success )

gets coefficient of expression from parent expression

Parameters
scipSCIP data structure
exprexpression for which coefficient needs to be found
parentexprparent of expr
coefbuffer to store coefficient
successwhether a coefficient is found

Definition at line 1793 of file symmetry_graph.c.

References assert(), SYM_ExprData::children, SYM_ExprData::coefficients, FALSE, i, SYM_ExprData::ncoefficients, NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), SCIPexprhdlrHasGetSymData(), SCIPfreeSymDataExpr(), SCIPgetSymDataExpr(), and TRUE.

Referenced by addSymmetryInformation().