graph_sub.c
Go to the documentation of this file.
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
227 assert(graph_typeIsUndirected(source_graph)); /* NOTE: otherwise ancestor copy would not be correct */
234 SCIP_CALL( graph_pseudoAncestors_appendCopyArrayToEdge(scip, target_edge, pseudoancestors, npseudoancestors, target_graph, &conflict));
265 graph_edge_add(scip, target_graph, target_tail, target_head, source_graph->cost[source_edge], source_graph->cost[source_edge]);
369 SCIP_CALL( extractSubgraphAddEdge(scip, subinout->useNewHistory, FALSE, &edgetransfer, orggraph, subgraph) );
417 SCIPdebugMessage("number of collected border nodes %d \n", StpVecGetSize(subinout->org_bordernodes));
435 SCIPdebugMessage("number of border nodes to contract: %d \n", StpVecGetSize(subinout->org_bordernodes));
609 if( org_contracttrace && graph_knot_hasContractTrace(subnode, subgraph) && orggraph->grad[orgnode] == 0 )
711 * ancestors and pseudo-ancestors are kept/moved and will be modified also for original graph! */
800 const SUBINOUT* subinout /**< data structure for handling inclusion/exclusion of sub-problems */
813 const SUBINOUT* subinout /**< data structure for handling inclusion/exclusion of sub-problems */
826 const SUBINOUT* subinout /**< data structure for handling inclusion/exclusion of sub-problems */
838 const SUBINOUT* subinout /**< data structure for handling inclusion/exclusion of sub-problems */
849 const SUBINOUT* subinout /**< data structure for handling inclusion/exclusion of sub-problems */
897 const SUBINOUT* subinout /**< data structure for handling inclusion/exclusion of sub-problems */
942 /* NOTE we want to have only the fixed pseudo-ancestor, or we get into trouble with the retransformation */
970 SCIP_CALL( graph_pseudoAncestors_appendCopyArrayToEdge(scip, e, pseudoancestors, npseudoancestors, subgraph, &conflict));
static void extractSubgraphAddNodes(const GRAPH *orggraph, SUBINOUT *subinout, GRAPH *subgraph)
Definition: graph_sub.c:135
Definition: misc_stp.h:88
int graph_edge_nPseudoAncestors(const GRAPH *, int)
Definition: graph_history.c:1159
Definition: graphdefs.h:184
Definition: struct_scip.h:59
SCIP_Bool graph_subinoutUsesNewHistory(const SUBINOUT *subinout)
Definition: graph_sub.c:848
static void reinsertSubgraphAdaptSubToOrgMap(const GRAPH *subgraph, const GRAPH *orggraph, SUBINOUT *subinout)
Definition: graph_sub.c:274
SCIP_RETCODE graph_initPseudoAncestorsSized(SCIP *, int, GRAPH *)
Definition: graph_history.c:1064
void graph_subinoutActivateNewHistory(SUBINOUT *subinout)
Definition: graph_sub.c:788
static void extractSubgraphGetSizeAndMap(const GRAPH *orggraph, SUBINOUT *subinout)
Definition: graph_sub.c:79
includes various files containing graph methods used for Steiner tree problems
int graph_edge_redirect(SCIP *, GRAPH *, int, int, int, SCIP_Real, SCIP_Bool, SCIP_Bool)
Definition: graph_edge.c:103
static SCIP_RETCODE reinsertSubgraphTransferEdges(SCIP *scip, GRAPH *subgraph, SUBINOUT *subinsertion, GRAPH *orggraph)
Definition: graph_sub.c:548
Definition: graph_sub.c:54
SCIP_RETCODE graph_knot_contract(SCIP *, GRAPH *, int *, int, int)
Definition: graph_node.c:264
void graph_subinoutClean(SCIP *scip, SUBINOUT *subinout)
Definition: graph_sub.c:882
static SCIP_RETCODE reinsertSubgraphTransferTerminals(const GRAPH *subgraph, SUBINOUT *subinout, GRAPH *orggraph)
Definition: graph_sub.c:591
header only, simple implementation of an STL like vector
SCIP_RETCODE graph_subgraphReinsert(SCIP *scip, SUBINOUT *subinout, GRAPH *orggraph, GRAPH **subgraph)
Definition: graph_sub.c:983
SCIP_RETCODE graph_subgraphCompleteNewHistory(SCIP *scip, const int *edgemap_subToOrg, GRAPH *orggraph, GRAPH *subgraph)
Definition: graph_sub.c:920
const int * graph_subinoutGetOrgToSubNodeMap(const SUBINOUT *subinout)
Definition: graph_sub.c:825
SCIP_RETCODE SCIPintListNodeAppendCopy(SCIP *scip, IDX **node1, IDX *node2, SCIP_Bool *conflict)
Definition: misc_stp.c:197
const int * graph_subinoutGetSubToOrgEdgeMap(const SUBINOUT *subinout)
Definition: graph_sub.c:812
SCIP_RETCODE graph_pseudoAncestors_appendCopyArrayToEdge(SCIP *, int, const int *, int, GRAPH *, SCIP_Bool *)
Definition: graph_history.c:1458
void graph_free_fixedEdgesOnly(SCIP *, GRAPH *)
Definition: graph_history.c:1671
void graph_edge_add(SCIP *, GRAPH *, int, int, double, double)
internal miscellaneous methods
SCIP_Bool graph_knot_hasContractTrace(int, const GRAPH *)
Definition: graph_history.c:1859
Definition: type_retcode.h:33
SCIP_RETCODE graph_copyFixed(SCIP *, GRAPH *, SCIP_Bool, GRAPH *)
Definition: graph_history.c:1895
SCIP_RETCODE graph_initContractTracing(SCIP *, GRAPH *)
Definition: graph_history.c:1836
static SCIP_RETCODE extractSubgraphBuild(SCIP *scip, GRAPH *orggraph, SUBINOUT *subinout, GRAPH **subgraph)
Definition: graph_sub.c:481
SCIP_RETCODE graph_subinoutActivateEdgeMap(const GRAPH *orggraph, SUBINOUT *subinout)
Definition: graph_sub.c:769
static SCIP_RETCODE extractSubgraphAddEdgesWithHistory(SCIP *scip, GRAPH *orggraph, SUBINOUT *subinout, GRAPH *subgraph)
Definition: graph_sub.c:327
Definition: graph_sub.c:42
const int * graph_edge_getPseudoAncestors(const GRAPH *, int)
Definition: graph_history.c:1187
SCIP_RETCODE graph_subinoutInit(SCIP *scip, const GRAPH *orggraph, SUBINOUT **subinout)
Definition: graph_sub.c:733
static SCIP_RETCODE extractSubgraphInitHistory(SCIP *scip, GRAPH *orggraph, SCIP_Bool moveFixedEdges, GRAPH *subgraph)
Definition: graph_sub.c:175
static void reinsertSubgraphTransferFixedHistory(SCIP *scip, GRAPH *subgraph, GRAPH *orggraph)
Definition: graph_sub.c:516
const int * graph_subinoutGetContractionRecord(const SUBINOUT *subinout)
Definition: graph_sub.c:837
Portable definitions.
SCIP_RETCODE graph_subgraphExtract(SCIP *scip, GRAPH *orggraph, SUBINOUT *subinout, GRAPH **subgraph)
Definition: graph_sub.c:712
void graph_subinoutFree(SCIP *scip, SUBINOUT **subinout)
Definition: graph_sub.c:859
const int * graph_subinoutGetSubToOrgNodeMap(const SUBINOUT *subinout)
Definition: graph_sub.c:799
static SCIP_RETCODE reinsertSubgraph(SCIP *scip, GRAPH *subgraph, SUBINOUT *subinout, GRAPH *orggraph)
Definition: graph_sub.c:675
int graph_getNpseudoAncestors(const GRAPH *)
Definition: graph_history.c:1282
int graph_knot_getContractionRecordAncestor(int node, const SUBINOUT *subinout)
Definition: graph_sub.c:895
Definition: objbenders.h:33
static void borderNodesCollect(SCIP *scip, const GRAPH *orggraph, const GRAPH *subgraph, SUBINOUT *subinout)
Definition: graph_sub.c:383
static SCIP_RETCODE reinsertSubgraphDeleteOldEdges(SCIP *scip, const GRAPH *subgraph, SUBINOUT *subinout, GRAPH *orggraph)
Definition: graph_sub.c:634
static SCIP_RETCODE borderNodesContract(SCIP *scip, const GRAPH *subgraph, SUBINOUT *subinout, GRAPH *orggraph)
Definition: graph_sub.c:423
static SCIP_RETCODE extractSubgraphAddEdge(SCIP *scip, SCIP_Bool useNewHistory, SCIP_Bool moveEdges, const EDGETRANS *edgetrans, GRAPH *source_graph, GRAPH *target_graph)
Definition: graph_sub.c:201
IDX * graph_edge_getAncestors(const GRAPH *, int)
Definition: graph_history.c:1202
struct edge_transfer EDGETRANS