graph_base.c
Go to the documentation of this file.
24 * The method 'graph_pack()' can be used to build a new graph that discards these nodes and edges.
28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
160 SCIPdebugMessage("wrong overall terminal count(1): %d != %d \n", nProperTerms + nFixedTerms, g->terms);
169 SCIPdebugMessage("wrong overall terminal count(2): %d != %d \n", nProperTerms + nNonLeafTerms + nFixedTerms - 1, g->terms);
362 SCIP_CALL( graph_pseudoAncestors_appendCopyArrayToEdge(scip, e_new, ancestors, nancestors, g_new, &conflict) );
1045 if( Is_term(g_org->term[k]) && (!graph_pc_isRootedPcMw(g_copy) || !graph_pc_knotIsFixedTerm(g_org, k)) )
1073 SCIP_CALL(SCIPallocMemoryArray(scip, &(g_copy->grid_coordinates[k]), g_org->terms)); /*lint !e866*/
1074 BMScopyMemoryArray(g_copy->grid_coordinates[k], g_org->grid_coordinates[k], g_org->terms); /*lint !e866*/
1119 SCIP_CALL( graph_pseudoAncestors_appendCopyArrayToEdge(scip, e, ancestors, nancestors, copygraph, &conflict) );
1668 SCIPerrorMessage("Input graph invalid: Wrong number of terminals, count is %d, should be %d\n",
1704 SCIPerrorMessage("Input graph invalid: Node %d not connected to terminal node %d \n", k + 1, g->source + 1);
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
Definition: scip_randnumgen.c:70
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_RETCODE graph_copy(SCIP *scip, const GRAPH *orggraph, GRAPH **copygraph)
Definition: graph_base.c:939
SCIP_Bool graph_mincut_isInitialized(const GRAPH *)
Definition: graph_mcut.c:1139
static SCIP_RETCODE packPcMwVanished(SCIP *scip, GRAPH *g_old)
Definition: graph_base.c:216
SCIP_Bool graph_pc_term2edgeIsConsistent(SCIP *, const GRAPH *)
Definition: graph_pcbase.c:874
SCIP_RETCODE graph_fixed_addNodePc(SCIP *, int, GRAPH *)
Definition: graph_history.c:1778
includes various files containing graph methods used for Steiner tree problems
Definition: struct_misc.h:259
SCIP_Real graph_pc_getNonLeafTermOffset(SCIP *, const GRAPH *)
Definition: graph_pcbase.c:2209
header only, simple implementation of an STL like vector
void graph_getEdgeCosts(const GRAPH *graph, SCIP_Real *RESTRICT cost, SCIP_Real *RESTRICT costrev)
Definition: graph_base.c:500
void graph_getEdgeRevCosts(const GRAPH *graph, SCIP_Real *RESTRICT costrev)
Definition: graph_base.c:521
SCIP_Bool graph_pc_termIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1431
SCIP_RETCODE graph_pack(SCIP *scip, GRAPH *graph, GRAPH **newgraph, REDSOL *redsol, SCIP_Bool verbose)
Definition: graph_base.c:1324
SCIP_RETCODE graph_init(SCIP *scip, GRAPH **g, int ksize, int esize, int layers)
Definition: graph_base.c:607
SCIP_RETCODE graph_pc_initSubgraph(SCIP *, GRAPH *)
Definition: graph_pcbase.c:763
static SCIP_Bool graphisValidPcMw(SCIP *scip, const GRAPH *g, SCIP_Bool *nodevisited)
Definition: graph_base.c:49
miscellaneous methods used for solving Steiner problems
void graph_freePseudoAncestors(SCIP *, GRAPH *)
Definition: graph_history.c:1101
void graph_edge_addSubgraph(SCIP *, const GRAPH *, const int *, int, GRAPH *)
Definition: graph_edge.c:341
SCIP_RETCODE graph_pseudoAncestors_appendCopyArrayToEdge(SCIP *, int, const int *, int, GRAPH *, SCIP_Bool *)
Definition: graph_history.c:1458
Definition: reduce_sol.c:70
void graph_edge_add(SCIP *, GRAPH *, int, int, double, double)
internal miscellaneous methods
SCIP_RETCODE graph_initPseudoAncestors(SCIP *, GRAPH *)
Definition: graph_history.c:1049
Definition: type_retcode.h:33
SCIP_RETCODE graph_copyData(SCIP *scip, const GRAPH *orgraph, GRAPH *copygraph)
Definition: graph_base.c:957
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
Definition: scip_randnumgen.c:47
static SCIP_RETCODE packPcMwInit(SCIP *scip, int nnodes_new, GRAPH *g_old, GRAPH *g_new)
Definition: graph_base.c:250
void graph_getIsTermArray(const GRAPH *g, SCIP_Bool *isterm)
Definition: graph_base.c:540
SCIP_RETCODE graph_pc_finalizeSubgraph(SCIP *, GRAPH *)
Definition: graph_pcbase.c:795
void reduce_solPack(const GRAPH *, const int *, int, REDSOL *)
Definition: reduce_sol.c:846
void SCIPrandomPermuteIntArray(SCIP_RANDNUMGEN *randnumgen, int *array, int begin, int end)
Definition: misc.c:10044
static SCIP_RETCODE packEdges(SCIP *scip, const int *old2newNode, GRAPH *g_old, int nnodes, int nedges, GRAPH *g_new)
Definition: graph_base.c:381
const int * graph_edge_getPseudoAncestors(const GRAPH *, int)
Definition: graph_history.c:1187
SCIP_RETCODE graph_getTermsRandom(SCIP *scip, const GRAPH *g, int *terms)
Definition: graph_base.c:588
SCIP_RETCODE graph_resize(SCIP *scip, GRAPH *g, int ksize, int esize, int layers)
Definition: graph_base.c:744
SCIP_Bool graph_pc_knotIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1383
SCIP_RETCODE graph_trail_costAware(SCIP *, const GRAPH *, int, SCIP_Bool *)
Definition: graph_util.c:353
Portable definitions.
SCIP_RETCODE graph_trail_arr(SCIP *, const GRAPH *, int, SCIP_Bool *)
Definition: graph_util.c:336
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:477
SCIP_Bool graph_pc_knotIsDummyTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1344
SCIP_RETCODE graph_buildCompleteGraph(SCIP *scip, GRAPH **g, int nnodes)
Definition: graph_base.c:440
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1257
SCIP_Real * reduce_solGetOffsetPointer(REDSOL *)
Definition: reduce_sol.c:1285
SCIP_RETCODE graph_copyPseudoAncestors(SCIP *scip, const GRAPH *orggraph, GRAPH *copygraph)
Definition: graph_base.c:1088
static SCIP_RETCODE packPseudoAncestors(SCIP *scip, const GRAPH *g_old, GRAPH *g_new)
Definition: graph_base.c:328
shortest paths based primal heuristics for Steiner problems
int graph_getNpseudoAncestors(const GRAPH *)
Definition: graph_history.c:1282
SCIP_RETCODE graph_initHistory(SCIP *scip, GRAPH *graph)
Definition: graph_base.c:695
Definition: objbenders.h:33
includes various reduction methods for Steiner tree problems
void graph_getCsr(const GRAPH *g, int *RESTRICT edgearr, int *RESTRICT tailarr, int *RESTRICT start, int *nnewedges)
Definition: graph_base.c:468