Directed Graph Detailed DescriptionFunction Documentation
creates directed graph structure
Definition at line 5596 of file misc.c. References BMSallocClearMemoryArray, BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by addBranchingComplementaritiesSOS1(), enforceConflictgraph(), initConflictgraph(), initImplGraphSOS1(), presolComponents(), presolRoundConssSOS1(), presolRoundVarsSOS1(), sortGenVBounds(), and tightenVarsBoundsSOS1().
resize directed graph structure
Definition at line 5625 of file misc.c. References SCIP_Digraph::arcdata, BMSreallocMemoryArray, SCIP_Digraph::nnodes, SCIP_Digraph::nodedata, SCIP_Digraph::nsuccessors, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_Digraph::successors, and SCIP_Digraph::successorssize.
copies directed graph structure
Definition at line 5661 of file misc.c. References SCIP_Digraph::arcdata, BMSallocClearMemoryArray, BMSallocMemory, BMSduplicateMemoryArray, SCIP_Digraph::components, SCIP_Digraph::componentstarts, SCIP_Digraph::ncomponents, SCIP_Digraph::nnodes, SCIP_Digraph::nodedata, SCIP_Digraph::nsuccessors, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIP_Digraph::successors.
sets the sizes of the successor lists for the nodes in a directed graph and allocates memory for the lists
Definition at line 5720 of file misc.c. References SCIP_Digraph::arcdata, BMSallocMemoryArray, SCIP_Digraph::nnodes, SCIP_Digraph::nsuccessors, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_Digraph::successors, and SCIP_Digraph::successorssize. Referenced by presolComponents().
frees given directed graph structure
Definition at line 5742 of file misc.c. References BMSfreeMemory, BMSfreeMemoryArray, BMSfreeMemoryArrayNull, NULL, and SCIPdigraphFreeComponents(). Referenced by freeConflictgraph(), presolComponents(), presolRoundConssSOS1(), presolRoundVarsSOS1(), sortGenVBounds(), and tightenVarsBoundsSOS1().
add (directed) arc and a related data to the directed graph structure
Definition at line 5814 of file misc.c. References SCIP_Digraph::arcdata, BMS_BufMem::data, ensureSuccessorsSize(), SCIP_Digraph::nsuccessors, NULL, SCIP_CALL, SCIP_OKAY, and SCIP_Digraph::successors. Referenced by addBranchingComplementaritiesSOS1(), fillDigraph(), SCIPdigraphComputeUndirectedComponents(), sortGenVBounds(), and updateArcData().
add (directed) arc to the directed graph structure, if it is not contained, yet
Definition at line 5842 of file misc.c. References SCIP_Digraph::arcdata, BMS_BufMem::data, ensureSuccessorsSize(), SCIP_Digraph::nsuccessors, NULL, SCIP_CALL, SCIP_OKAY, and SCIP_Digraph::successors. Referenced by enforceConflictgraph(), extensionOperatorSOS1(), genConflictgraphLinearCons(), handleNewVariableSOS1(), initConflictgraph(), performImplicationGraphAnalysis(), and presolRoundConssSOS1().
sets the number of successors to a given value
Definition at line 5876 of file misc.c. References SCIP_Digraph::nsuccessors, NULL, and SCIP_OKAY. Referenced by resetConflictgraphSOS1().
returns the number of nodes of the given digraph
Definition at line 5892 of file misc.c. References SCIP_Digraph::nnodes, and NULL. Referenced by cliqueGetCommonSuccessorsSOS1(), nodeGetSolvalBinaryBigMSOS1(), nodeGetSolvalVarboundLbSOS1(), nodeGetSolvalVarboundUbSOS1(), performImplicationGraphAnalysis(), and sortGenVBounds().
returns the node data, or NULL if no data exist
Definition at line 5902 of file misc.c. References SCIP_Digraph::nodedata, and NULL. Referenced by addBranchingComplementaritiesSOS1(), checkConComponentsVarbound(), detectVarboundSOS1(), freeConflictgraph(), generateBoundInequalityFromSOS1Nodes(), getBoundConsFromVertices(), nodeGetSolvalVarboundLbSOS1(), nodeGetSolvalVarboundUbSOS1(), passConComponentVarbound(), propVariableNonzero(), and sepaImplBoundCutsSOS1().
sets the node data sets the node data
Definition at line 5918 of file misc.c. References SCIP_Digraph::nodedata, and NULL. Referenced by freeConflictgraph(), initConflictgraph(), and initImplGraphSOS1().
returns the total number of arcs in the given digraph
Definition at line 5932 of file misc.c. References SCIP_Digraph::nnodes, SCIP_Digraph::nsuccessors, and NULL. Referenced by SCIP_DECL_SEPAEXECLP(), and sepaImplBoundCutsSOS1().
returns the number of successor nodes of the given node
Definition at line 5950 of file misc.c. References SCIP_Digraph::nsuccessors, NULL, and SCIP_Digraph::successorssize. Referenced by addBranchingComplementaritiesSOS1(), checkConComponentsVarbound(), checkSwitchNonoverlappingSOS1Methods(), cliqueGetCommonSuccessorsSOS1(), computeVarsCoverSOS1(), enforceConflictgraph(), genConflictgraphLinearCons(), getBoundConsFromVertices(), getBranchingPrioritiesSOS1(), getBranchingVerticesSOS1(), getCoverVertices(), getDiveBdChgsSOS1conflictgraph(), getSOS1Implications(), getVectorOfWeights(), handleNewVariableSOS1(), initConflictgraph(), initImplGraphSOS1(), initTCliquegraph(), isConnectedSOS1(), isViolatedSOS1(), markNeighborsMWISHeuristic(), maxWeightIndSetHeuristic(), passConComponentVarbound(), performImplicationGraphAnalysis(), presolRoundConssSOS1(), presolRoundVarsSOS1(), propVariableNonzero(), resetConflictgraphSOS1(), SCIP_DECL_SEPAEXECLP(), sepaImplBoundCutsSOS1(), tightenVarsBoundsSOS1(), and updateArcData().
returns the array of indices of the successor nodes; this array must not be changed from outside
Definition at line 5965 of file misc.c. References SCIP_Digraph::nsuccessors, NULL, SCIP_Digraph::successors, and SCIP_Digraph::successorssize. Referenced by addBranchingComplementaritiesSOS1(), checkConComponentsVarbound(), cliqueGetCommonSuccessorsSOS1(), computeVarsCoverSOS1(), enforceConflictgraph(), genConflictgraphLinearCons(), getBoundConsFromVertices(), getBranchingVerticesSOS1(), getCoverVertices(), getDiveBdChgsSOS1conflictgraph(), getSOS1Implications(), getVectorOfWeights(), handleNewVariableSOS1(), initConflictgraph(), initImplGraphSOS1(), initTCliquegraph(), isConnectedSOS1(), isViolatedSOS1(), markNeighborsMWISHeuristic(), passConComponentVarbound(), performImplicationGraphAnalysis(), presolRoundConssSOS1(), propVariableNonzero(), resetConflictgraphSOS1(), SCIP_DECL_SEPAEXECLP(), sepaImplBoundCutsSOS1(), tightenVarsBoundsSOS1(), and updateArcData().
returns the array of data corresponding to the arcs originating at the given node, or NULL if no data exist; this array must not be changed from outside
Definition at line 5983 of file misc.c. References SCIP_Digraph::arcdata, SCIP_Digraph::nsuccessors, NULL, and SCIP_Digraph::successorssize. Referenced by getSOS1Implications(), performImplicationGraphAnalysis(), presolRoundVarsSOS1(), propVariableNonzero(), sepaImplBoundCutsSOS1(), and updateArcData().
Compute undirected connected components on the given graph.
Definition at line 6077 of file misc.c. References BMSallocClearMemoryArray, BMSallocMemoryArray, BMSclearMemoryArray, BMScopyMemoryArray, BMSfreeMemoryArray, BMSreallocMemoryArray, SCIP_Digraph::components, SCIP_Digraph::componentstarts, SCIP_Digraph::componentstartsize, depthFirstSearch(), SCIP_Digraph::ncomponents, SCIP_Digraph::nnodes, SCIP_Digraph::nsuccessors, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdigraphAddArc(), SCIPdigraphFreeComponents(), and SCIP_Digraph::successors. Referenced by presolComponents(), and sortGenVBounds().
Computes all strongly connected components of an undirected connected component with Tarjan's Algorithm. The resulting strongly connected components are sorted topologically (starting from the end of the strongcomponents array).
Definition at line 6398 of file misc.c. References BMSallocMemoryArray, BMSfreeMemoryArrayNull, SCIP_Digraph::components, SCIP_Digraph::componentstarts, FALSE, SCIP_Digraph::nnodes, NULL, SCIP_ALLOC_TERMINATE, SCIP_Bool, SCIP_OKAY, SCIPdebugMessage, tarjan(), and TRUE. Referenced by sortGenVBounds().
Performes an (almost) topological sort on the undirected components of the given directed graph. The undirected components should be computed before using SCIPdigraphComputeUndirectedComponents().
Definition at line 6189 of file misc.c. References BMSallocClearMemoryArray, BMSallocMemoryArray, BMSfreeMemoryArray, SCIP_Digraph::components, SCIP_Digraph::componentstarts, depthFirstSearch(), SCIP_Digraph::ncomponents, SCIP_Digraph::nnodes, NULL, SCIP_ALLOC, SCIP_Bool, and SCIP_OKAY. Referenced by sortGenVBounds().
returns the number of previously computed undirected components for the given directed graph
Definition at line 6253 of file misc.c. References SCIP_Digraph::componentstartsize, SCIP_Digraph::ncomponents, and NULL. Referenced by sortGenVBounds().
Returns the previously computed undirected component of the given number for the given directed graph. If the components were sorted using SCIPdigraphTopoSortComponents(), the component is (almost) topologically sorted.
Definition at line 6266 of file misc.c. References SCIP_Digraph::components, SCIP_Digraph::componentstarts, and NULL. Referenced by presolComponents(), and sortGenVBounds().
frees the component information for the given directed graph
Definition at line 6485 of file misc.c. References BMSfreeMemoryArray, SCIP_Digraph::components, SCIP_Digraph::componentstarts, SCIP_Digraph::componentstartsize, SCIP_Digraph::ncomponents, and NULL. Referenced by SCIPdigraphComputeUndirectedComponents(), and SCIPdigraphFree().
output of the given directed graph via the given message handler
Definition at line 6512 of file misc.c. References SCIP_Digraph::nnodes, SCIP_Digraph::nsuccessors, SCIPmessageFPrintInfo(), and SCIP_Digraph::successors.
prints the given directed graph structure in GML format into the given file
Definition at line 6547 of file misc.c. References SCIP_Digraph::nnodes, SCIP_Digraph::nsuccessors, NULL, SCIP_MAXSTRLEN, SCIPgmlWriteArc(), SCIPgmlWriteClosing(), SCIPgmlWriteNode(), SCIPgmlWriteOpening(), SCIPsnprintf(), SCIP_Digraph::successors, and TRUE.
output of the given directed graph via the given message handler
Definition at line 6586 of file misc.c. References SCIP_Digraph::components, SCIP_Digraph::componentstarts, SCIP_Digraph::ncomponents, and SCIPmessageFPrintInfo(). |