57 assert(newroot >= 0 && newroot < nnodes);
60 *isInfeasible =
FALSE;
62 if( g->
grad[newroot] == 0 )
74 for(
int k = 0; k <
nnodes; k++ )
77 gmark[newroot] =
TRUE;
79 queue[size++] = newroot;
84 const int node = queue[--size];
89 const int head = g->
head[
a];
105 for(
int k = 0; k <
nnodes; k++ )
107 assert(*isInfeasible ==
FALSE);
127 *isInfeasible =
TRUE;
133 *isInfeasible =
TRUE;
139 const int node = g->
tail[
a];
140 if( gmark[node] && node != newroot )
150 const int node = g->
tail[
a];
151 if( node == newroot )
168 if( *isInfeasible ==
FALSE )
171 const int realroot = g->
source;
172 g_hacky->
source = newroot;
174 g_hacky->
source = realroot;
176 for(
int k = 0; k <
nnodes; k++ )
208 const int dfspos_root = dfspos[subtree_root];
210 assert(dfspos_root > 0);
211 assert(connected[subtree_root]);
212 assert(g->
mark[subtree_root]);
214 connected[subtree_root] =
FALSE;
223 const int neighbor = g->
head[e];
225 assert(dfspos[neighbor] >= 0);
227 assert(dfspos[neighbor] != dfspos_root);
230 if( dfspos[neighbor] > dfspos_root)
248 const CSR* csr_orgcosts,
250 int* RESTRICT dfspos,
251 int* RESTRICT result,
255 const int dfspos_root = dfspos[subtree_root];
256 const int rootedges_start = csr_orgcosts->
start[subtree_root];
257 const int rootedges_end = csr_orgcosts->
start[subtree_root + 1];
259 assert(dfspos_root > 0);
260 assert(connected[subtree_root]);
262 connected[subtree_root] =
FALSE;
266 for(
int e = rootedges_start; e != rootedges_end; e++ )
270 const int neighbor = csr_orgcosts->
head[e];
272 assert(dfspos[neighbor] >= 0);
273 assert(dfspos[neighbor] != dfspos_root);
276 if( dfspos[neighbor] > dfspos_root)
293 int* RESTRICT dfspos,
294 int* RESTRICT result,
296 int* RESTRICT dfscount
305 if(
LT(profit, 0.0) )
309 assert(0 <= *dfscount && *dfscount < g->knots);
311 dfspos[subtree_root] = ++(*dfscount);
315 for(
int e = g->
outbeg[subtree_root]; e >= 0; e = g->
oeat[e] )
319 const int neighbor = g->
head[e];
321 assert(dfspos[neighbor] >= 0);
325 if( dfspos[neighbor] == 0 )
328 const SCIP_Real extension_profit = neighbor_profit - cost[e];
330 if(
LT(extension_profit, 0.0) )
341 profit += extension_profit;
356 const CSR* csr_orgcosts,
360 int* RESTRICT dfspos,
361 int* RESTRICT result,
363 int* RESTRICT dfscount
367 const int rootedges_start = csr_orgcosts->
start[subtree_root];
368 const int rootedges_end = csr_orgcosts->
start[subtree_root + 1];
369 const int*
const heads_csr = csr_orgcosts->
head;
375 if(
LT(profit, 0.0) )
379 assert(0 <= *dfscount && *dfscount < csr_orgcosts->
nnodes);
380 assert(rootedges_start <= rootedges_end);
382 dfspos[subtree_root] = ++(*dfscount);
386 for(
int e = rootedges_start; e != rootedges_end; e++ )
390 const int neighbor = heads_csr[e];
392 assert(dfspos[neighbor] >= 0);
395 if( dfspos[neighbor] == 0 )
398 result, connected, dfscount);
399 const SCIP_Real extension_profit = neighbor_profit - orgcosts_csr[e];
401 if(
LE(extension_profit, 0.0) )
408 profit += extension_profit;
426 const int root = g->
source;
427 const int*
const gOeat = g->
oeat;
428 const int*
const gHead = g->
head;
431 for(
int i = 0; i < g->
edges; i++ )
435 for(
int a = g->
outbeg[root];
a >= 0;
a = gOeat[
a] )
437 const int head = gHead[
a];
440 assert(!connected || connected[head]);
459 const int*
const gmark = g->
mark;
464 for(
int i = 0; i <
nnodes; i++ )
466 if( gmark[i] && (mst[i].edge !=
UNKNOWN) )
470 assert(result[mst[i].edge] == -1);
489 int* RESTRICT gmark = g->
mark;
497 for(
int i = 0; i <
nnodes; i++ )
511 const int*
const gterm = g->
term;
513 for(
int i = 0; i <
nnodes; i++ )
515 if( connected[i] && !
Is_term(gterm[i]) )
538 const int*
const gGrad = g->
grad;
540 for(
int i = 0; i <
nnodes; i++ )
545 connected[i] =
FALSE;
555 assert(connected[g->
source]);
559 const int*
const gterm = g->
term;
561 for(
int i = 0; i <
nnodes; i++ )
564 connected[i] =
FALSE;
587 for(
int i = nnodes - 1; i >= 0; --i )
615 connected[i] =
FALSE;
628 for(
int i = 0; i <
nnodes; i++ )
630 if( connected[i] && i != g->
source )
651 int* RESTRICT result,
655 const CSR*
const csr = mst->
csr;
656 const int*
const csr_start = csr->
start;
666 for(
int i = 0; i <
nnodes; i++ )
673 for( outedge = csr_start[i]; outedge != csr_start[i + 1]; outedge++ )
675 if( result[outedge] ==
CONNECT )
680 if( outedge == csr_start[i + 1] )
686 assert(result[inedge] ==
CONNECT);
691 connected[i] =
FALSE;
716 for(
int i = 0; i <
nnodes; i++ )
718 if( connected[i] && (predEdge[i] !=
UNKNOWN) )
720 assert(mst->
csr->
head[predEdge[i]] == i);
721 assert(result[predEdge[i]] ==
UNKNOWN);
747 assert(solroot >= 0);
748 assert(connected[solroot]);
763 assert(nsoledges + 1 == dfscount);
765 if(
LT(profit, 0.0) )
769 assert(
EQ(g->
prize[solroot], 0.0));
790 const CSR* csr_orgcosts,
805 assert(solroot >= 0);
806 assert(connected[solroot]);
810 assert(nnodes == csr_orgcosts->
nnodes);
821 assert(nsoledges + 1 == dfscount);
825 if(
LT(profit, 0.0) )
852 assert(scip !=
NULL);
853 assert(cost !=
NULL);
854 assert(result !=
NULL);
855 assert(connected !=
NULL);
858 for(
int i = 0; i < g->
edges; i++ )
861 for(
int i = nnodes - 1; i >= 0; --i )
865 assert(nconnected >= g->
terms);
872 for(
int i = nnodes - 1; i >= 0; --i )
873 g->
mark[i] = connected[i];
877 for(
int i = nnodes - 1; i >= 0; --i )
879 if( connected[i] && (mst[i].edge != -1) )
882 assert(result[mst[i].edge] ==
UNKNOWN);
884 result[mst[i].
edge] = 0;
896 for(
int i = nnodes - 1; i >= 0; --i )
903 if( g->
term[i] == 0 )
920 connected[i] =
FALSE;
943 int* RESTRICT result,
947 assert(g && mst && result && connected);
952 for(
int i = 0; i < nedges_csr; i++ )
985 for(
int i = 0; i < nedges; i++ )
989 assert(scip && cost && result && connected);
1002 printf(
"trivial solution in pruning \n");
1010 assert(0 <= solroot && solroot < g->knots);
1011 assert(g->
mark[solroot]);
1017 for(
int i = 0; i < g->
knots; ++i )
1059 int* RESTRICT result,
1069 for(
int i = 0; i < nedges_csr; i++ )
1072 assert(scip && result && connected);
1087 printf(
"trivial solution in pruning \n");
1093 assert(0 <= solroot && solroot < g->knots);
1094 assert(connected[solroot]);
1118 assert(solnode !=
NULL);
1122 while( curr !=
NULL )
1124 const int i = curr->
index;
1149 assert(g && connected);
1163 for(
int k = 0; k <
nnodes; k++ )
1165 if( termsorder[k] < min && connected[k] )
1169 min = termsorder[k];
1175 assert(proot == -1 || min < nnodes);
1179 const int*
const gOeat = g->
oeat;
1180 const int*
const gHead = g->
head;
1181 const int*
const gTerm = g->
term;
1182 const int groot = g->
source;
1184 for(
int a = g->
outbeg[groot];
a >= 0;
a = gOeat[
a] )
1186 const int head = gHead[
a];
1187 if( !
Is_term(gTerm[head]) && connected[head] )
1203 int* RESTRICT result,
1207 const int*
const gTerm = g->
term;
1210 const int gRoot = g->
source;
1215 for(
int i = 0; i <
nnodes; i++ )
1217 if(
Is_term(gTerm[i]) && i != gRoot )
1221 assert(isFixedTerm || g->
grad[i] == 2);
1222 assert(isFixedTerm || g->
inpbeg[i] >= 0);
1227 assert(connected[i]);
1232 const int e1 = g->
inpbeg[i];
1233 const int e2 = g->
ieat[e1];
1234 const int k1 = g->
tail[e1];
1235 const int k2 = g->
tail[e2];
1237 connected[i] =
TRUE;
1241 assert(g->
grad[i] == 2);
1242 assert(k1 == gRoot || k2 == gRoot);
1244 if( k1 != gRoot && connected[k1] )
1246 else if( k2 != gRoot && connected[k2] )
1248 else if( k1 == gRoot )
1250 else if( k2 == gRoot )
1257 else if( i == solroot && !rpcmw )
1262 if( g->
tail[e1] == gRoot )
1272 connected[gRoot] =
TRUE;
1274 assert(connected[gRoot]);
1290 assert(scip && soledge);
1295 for(
int e = 0; e < nedges; e++ )
1296 nval[e] = (
CONNECT == soledge[e]) ? 1.0 : 0.0;
1316 for(
int i = 0; i <
nnodes; i++ )
1327 if( result[outedge] ==
CONNECT )
1375 assert(scip && result && connected);
1378 for(
int e = 0; e < nedges; e++ )
1395 edgecosts = g->
cost;
1422 assert(scip && g && result && connected);
1442 assert(scip && result);
1447 for(
int k = 0; k <
nnodes; k++ )
1448 connected[k] =
FALSE;
1450 for(
int e = 0; e < nedges; e++ )
1478 int* RESTRICT result,
1484 assert(scip && result && connected);
1488 for(
int e = 0; e < nedges; e++ )
1521 int* RESTRICT result
1527 assert(scip && result);
1528 assert(nedges <= g->edges);
1530 assert(g->
stp_type !=
STP_DHCSTP &&
"does not work because DHCSTP uses different edge costs");
1532 for(
int e = 0; e < nedges; e++ )
1567 assert(scip && g && result);
1571 assert(!isInfeasible);
1587 assert(scip && g && result && isInfeasible);
1604 assert(scip && result);
1608 for(
int e = 0; e < nedges; e++ )
1616 for(
int e = 0; e < nedges; e++ )
1634 assert(g && result);
1635 assert(node >= 0 && node < g->knots);
1663 const int root = graph->
source;
1666 assert(scip && result);
1670 for(
int e = 0; e < graph->
edges; ++e )
1693 countpseudo =
FALSE;
1694 nterms = graph->
terms;
1697 for(
int i = 0; i <
nnodes; i++ )
1704 reached[root] =
TRUE;
1705 queue[size++] = root;
1709 const int node = queue[--size];
1715 const int i = graph->
head[e];
1744 isValid = (termcount ==
nterms);
1749 printf(
"termcount %d graph->terms %d \n", termcount, nterms);
1750 printf(
"root %d \n", root);
1752 for(
int i = 0; i <
nnodes; i++ )
1754 const int isMandatoryTerm = countpseudo?
1757 if( !reached[i] && isMandatoryTerm )
1767 printf(
"...neighbor: ");
1779 for(
int i = 0; i <
nnodes; i++ )
1788 if( deg > graph->
maxdeg[i] )
1817 printf(
"solution tree edges: \n");
1819 for(
int e = 0; e < nedges; ++e )
1843 assert(nedges == g->
edges);
1846 for(
int e = 0; e < nedges; e++ )
1875 const int* soledge_csr,
1883 const int*
const gTerm = g->
term;
1889 assert(nnodes == csr->
nnodes);
1890 assert(nedges_csr <= g->edges);
1892 for(
int e = 0; e < nedges_csr; e++ )
1896 if( soledge_csr[e] ==
CONNECT )
1897 obj += edgecost_csr[e];
1900 for(
int k = 0; k <
nnodes; k++ )
1907 assert(g->
grad[k] >= 1);
1924 const int* soledge_csr,
1934 assert(nedges_csr <= g->edges);
1936 for(
int e = 0; e < nedges_csr; e++ )
1940 if( soledge_csr[e] ==
CONNECT )
1941 obj += edgecost_csr[e];
1959 assert(scip && scipsol && soledges);
1964 for(
int e = 0; e < nedges; e++ )
1966 if(
EQ(xval[e], 1.0) )
1980 const int* soledge_csr,
1982 int* RESTRICT soledge_g
1987 const int*
const edgeid = csr->
edge_id;
1989 assert(solnode && soledge_csr && soledge_g);
1991 assert(0 <= nedges_csr && nedges_csr <= nedges_g);
1993 for(
int i = 0; i < nedges_g; i++ )
1998 for(
int i = 0; i < nedges_csr; i++ )
2000 if(
CONNECT == soledge_csr[i] )
2002 const int edge_g = edgeid[i];
2004 assert(0 <= edge_g && edge_g < nedges_g);
2005 assert(
UNKNOWN == soledge_g[edge_g]);
2029 for(
int e = 0; e < nedges; e++ )
2050 for(
int e = 0; e < nedges; e++ )
2069 for(
int e = 0; e < nedges; e++ )
2084 const int nedges = g->
edges;
2087 assert(g && result && solnode);
2089 for(
int i = 0; i <
nnodes; i++ )
2094 for(
int e = 0; e < nedges; e++ )
2105 for(
int e = 0; e < nedges; e++ )
2107 assert(solnode[g->
head[e]] && solnode[g->
tail[e]]);
2120 const int nedges = g->
edges;
2123 assert(g && soledge && solnode);
2125 for(
int i = 0; i <
nnodes; i++ )
2130 for(
int e = 0; e < nedges; e++ )
2141 for(
int e = 0; e < nedges; e++ )
2150 const GRAPH* transgraph,
2151 const GRAPH* orggraph,
2152 const int* transsoledge,
2157 const int transnedges = transgraph->
edges;
2158 const int orgnnodes = orggraph->
knots;
2161 assert(transgraph !=
NULL && orggraph !=
NULL && transsoledge !=
NULL && orgsoledge !=
NULL);
2167 for(
int k = 0; k < orgnnodes; k++ )
2168 orgnodearr[k] =
FALSE;
2170 for(
int e = 0; e < transnedges; e++ )
2171 if( transsoledge[e] ==
CONNECT )
2215 int nedges = (nsoledges !=
NULL)? *nsoledges : 0;
2219 assert(scip !=
NULL && tails !=
NULL && heads !=
NULL && pcancestors !=
NULL && solnodemark !=
NULL);
2221 if( solnodequeue !=
NULL )
2222 queue = solnodequeue;
2226 if( nsolnodes ==
NULL )
2228 assert(solnodequeue ==
NULL);
2230 for(
int k = 0; k < orgnnodes; k++ )
2231 if( solnodemark[k] )
2232 queue[nnodes++] = k;
2236 nnodes = *nsolnodes;
2237 assert(solnodequeue !=
NULL);
2243 while( qend != qstart )
2247 assert(qstart < qend);
2250 for( ; k < qend; k++ )
2252 const int ancestornode = queue[k];
2254 assert(solnodemark[ancestornode]);
2256 for(
IDX* curr = pcancestors[ancestornode]; curr !=
NULL; curr = curr->parent )
2258 const int ancestoredge = curr->index;
2259 assert(tails[ancestoredge] < orgnnodes && heads[ancestoredge] < orgnnodes);
2261 if( soledgemark !=
NULL && !soledgemark[ancestoredge] )
2263 soledgemark[ancestoredge] =
TRUE;
2266 if( !solnodemark[tails[ancestoredge]] )
2268 solnodemark[tails[ancestoredge]] =
TRUE;
2269 queue[nnodes++] = tails[ancestoredge];
2271 if( !solnodemark[heads[ancestoredge]] )
2273 solnodemark[heads[ancestoredge]] =
TRUE;
2274 queue[nnodes++] = heads[ancestoredge];
2281 if( nsolnodes !=
NULL )
2284 if( nsoledges !=
NULL )
2285 *nsoledges = nedges;
2287 if( solnodequeue ==
NULL )
static SCIP_RETCODE pruneSteinerTreePc_csr(SCIP *scip, const GRAPH *g, MST *mst, int *RESTRICT result, STP_Bool *RESTRICT connected)
static void pcsubtreeDelete(const GRAPH *g, int subtree_root, int dfspos[], int result[], STP_Bool connected[])
int graph_get_nEdges(const GRAPH *)
static volatile int nterms
SCIP_Bool graph_pc_isMw(const GRAPH *)
SCIP_RETCODE solstp_addSolToProb(SCIP *scip, const GRAPH *g, const int *soledge, SCIP_HEUR *heur, SCIP_Bool *success)
SCIP_Bool graph_typeIsDirected(const GRAPH *)
int SCIPprobdataGetNTerms(SCIP *scip)
SCIP_Bool graph_pc_isRootedPcMw(const GRAPH *)
SCIP_Bool graph_csr_costsAreInSync(const GRAPH *, const CSR *, const SCIP_Real *)
Shortest path based algorithms for Steiner problems.
SCIP_RETCODE solstp_pruneFromNodes(SCIP *scip, const GRAPH *g, int *result, STP_Bool *connected)
static SCIP_RETCODE pruneSteinerTreeStp(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int *result, STP_Bool *connected)
static SCIP_RETCODE reroot(SCIP *scip, const GRAPH *g, int *result, int newroot, SCIP_Bool *isInfeasible)
void solstp_pcConnectDummies(const GRAPH *g, int solroot, int *RESTRICT result, STP_Bool *RESTRICT connected)
int graph_pc_nFixedTerms(const GRAPH *)
void graph_path_exec(SCIP *, const GRAPH *, int, int, const SCIP_Real *, PATH *)
SCIP_RETCODE solstp_getOrg(SCIP *scip, const GRAPH *transgraph, const GRAPH *orggraph, const int *transsoledge, int *orgsoledge)
SCIP_RETCODE solstp_markPcancestors(SCIP *scip, IDX **pcancestors, const int *tails, const int *heads, int orgnnodes, STP_Bool *solnodemark, STP_Bool *soledgemark, int *solnodequeue, int *nsolnodes, int *nsoledges)
includes methods for Steiner tree problem solutions
void graph_knot_printInfo(const GRAPH *, int)
static SCIP_RETCODE strongPruneSteinerTreePc_csr(SCIP *scip, const GRAPH *g, const CSR *csr_orgcosts, int solroot, int *result, STP_Bool *connected)
static SCIP_Real pcsubtreePruneForProfit_csr(const CSR *csr_orgcosts, const SCIP_Real *prize, SCIP_Bool isPc, int subtree_root, int *RESTRICT dfspos, int *RESTRICT result, STP_Bool *RESTRICT connected, int *RESTRICT dfscount)
SCIP_Bool solstp_isUnreduced(SCIP *scip, const GRAPH *graph, const int *result)
Problem data for stp problem.
enum SCIP_Retcode SCIP_RETCODE
int *RESTRICT nodes_predEdge
void solstp_convertCsrToGraph(SCIP *scip, const GRAPH *g, const CSR *csr, const int *soledge_csr, STP_Bool *RESTRICT solnode, int *RESTRICT soledge_g)
minimum spanning tree based algorithms for Steiner problems
SCIP_RETCODE solstp_pruneFromTmHeur(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int *RESTRICT result, STP_Bool *RESTRICT connected)
static SCIP_RETCODE pcsolGetMstEdges(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int root, int *result)
SCIP_Real *RESTRICT nodes_dist
int graph_csr_getNedges(const CSR *)
SCIP_Real solstp_pcGetObjCsr(const GRAPH *g, const CSR *csr, const int *soledge_csr, const STP_Bool *solnode)
#define SCIPfreeBufferArray(scip, ptr)
#define Is_nonleafTerm(a)
int solstp_getNedgesBounded(const GRAPH *g, const int *soledge, int nedges)
static void setNodeList(const GRAPH *g, STP_Bool *RESTRICT solnode, IDX *listnode)
STP_Bool *RESTRICT nodes_isConnected
void solstp_getStpFromSCIPsol(SCIP *scip, SCIP_SOL *scipsol, const GRAPH *g, int *soledges)
SCIP_Bool graph_pc_termIsNonLeafTerm(const GRAPH *, int)
void mst_computeOnMarked(const GRAPH *g, const STP_Bool *nodes_isMarked, int startnode, MST *mst)
SCIP_RETCODE solstp_rerootInfeas(SCIP *scip, GRAPH *g, int *result, int newroot, SCIP_Bool *isInfeasible)
static SCIP_RETCODE strongPruneSteinerTreePc(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int solroot, int *result, STP_Bool *connected)
void solstp_print(const GRAPH *graph, const int *result)
static void pcsubtreeDelete_csr(const CSR *csr_orgcosts, int subtree_root, int *RESTRICT dfspos, int *RESTRICT result, STP_Bool *RESTRICT connected)
SCIP_RETCODE SCIPprobdataAddNewSol(SCIP *scip, SCIP_Real *nval, SCIP_HEUR *heur, SCIP_Bool *success)
static void pcsolGetTrivialEdges(const GRAPH *g, const STP_Bool *connected, int *RESTRICT result)
static void pcsolMarkGraphNodes(const STP_Bool *connected, const GRAPH *g)
static SCIP_RETCODE pruneSteinerTreePc(SCIP *scip, const GRAPH *g, const SCIP_Real *cost, int *result, STP_Bool *connected)
SCIP_Real solstp_getObjCsr(const GRAPH *g, const CSR *csr, const int *soledge_csr, const STP_Bool *solnode)
int SCIPprobdataGetNNodes(SCIP *scip)
SCIP_RETCODE solstp_pruneFromEdges(SCIP *scip, const GRAPH *g, int *result)
static void stpsolPrune_csr(const GRAPH *g, const MST *mst, int *RESTRICT result, STP_Bool *RESTRICT connected)
void solstp_getTrivialSol(const GRAPH *g, int *soledge)
SCIP_Real solstp_getObjBounded(const GRAPH *g, const int *soledge, SCIP_Real offset, int nedges)
static SCIP_Real pcsubtreePruneForProfit(const GRAPH *g, const SCIP_Real *cost, int subtree_root, int *RESTRICT dfspos, int *RESTRICT result, STP_Bool *RESTRICT connected, int *RESTRICT dfscount)
#define SCIPallocBufferArray(scip, ptr, num)
SCIP_Bool solstp_containsNode(const GRAPH *g, const int *result, int node)
SCIP_Bool stpsol_pruningIsPossible(const GRAPH *g, const int *result, const STP_Bool *connected)
int graph_pc_nProperPotentialTerms(const GRAPH *)
IDX * graph_getFixedges(const GRAPH *)
#define BMScopyMemoryArray(ptr, source, num)
void graph_edge_printInfo(const GRAPH *, int)
SCIP_Bool graph_pc_knotIsNonLeafTerm(const GRAPH *, int)
SCIP_Bool graph_pc_isPc(const GRAPH *)
static void solGetMstEdges_csr(const GRAPH *g, const STP_Bool *connected, int root, MST *mst, int *RESTRICT result)
SCIP_Bool graph_pc_knotIsDummyTerm(const GRAPH *, int)
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
void solstp_setVertexFromEdgeConn(const GRAPH *g, const int *soledge, int *solnode)
SCIP_RETCODE solstp_reroot(SCIP *scip, const GRAPH *g, int *result, int newroot)
SCIP_Bool graph_pc_isPcMw(const GRAPH *)
static void pcsolMarkGraphNodes_csr(const GRAPH *g, STP_Bool *RESTRICT connected)
int solstp_pcGetSolRoot(SCIP *scip, const GRAPH *g, const STP_Bool *connected)
SCIP_Real * SCIPprobdataGetXval(SCIP *scip, SCIP_SOL *sol)
int graph_get_nNodes(const GRAPH *)
void graph_pc_getOrgCosts(SCIP *, const GRAPH *, SCIP_Real *)
void solstp_setVertexFromEdge(const GRAPH *g, const int *result, STP_Bool *solnode)
SCIP_Bool graph_pc_costsEqualOrgCosts(SCIP *, const GRAPH *, const SCIP_Real *)
static SCIP_RETCODE pruneSteinerTreeStp_csr(const GRAPH *g, MST *mst, int *RESTRICT result, STP_Bool *RESTRICT connected)
static void pcsolPrune(const GRAPH *g, int *result, STP_Bool *connected)
int solstp_getNedges(const GRAPH *g, const int *soledge)
int * SCIPprobdataGetPctermsorder(SCIP *scip)
#define BMSclearMemoryArray(ptr, num)
SCIP_Bool solstp_isValid(SCIP *scip, const GRAPH *graph, const int *result)
struct Int_List_Node * parent
#define SCIP_CALL_ABORT(x)
SCIP_RETCODE solstp_prune(SCIP *scip, const GRAPH *g, int *result, STP_Bool *connected)
SCIP_Real solstp_getObj(const GRAPH *g, const int *soledge, SCIP_Real offset)
IDX * graph_edge_getAncestors(const GRAPH *, int)
SCIP_RETCODE solstp_pruneFromTmHeur_csr(SCIP *scip, const GRAPH *g, SPATHS *spaths, int *RESTRICT result)