shortestpath.c
Go to the documentation of this file.
21 * Note: This file is supposed to replace graph_path.c in the long run, as it includes the faster implementations.
37 const STP_Bool* connected /**< array to mark whether a vertex is part of computed Steiner tree */
59 const STP_Bool* connected /**< array to mark whether a vertex is part of computed Steiner tree */
82 const STP_Bool* connected /**< array to mark whether a vertex is part of computed Steiner tree */
153 STP_Bool* RESTRICT connected /**< array to mark whether a vertex is part of computed Steiner tree */
189 STP_Bool* RESTRICT connected /**< array to mark whether a vertex is part of computed Steiner tree */
518 STP_Bool* RESTRICT connected, /**< array to mark whether a vertex is part of computed Steiner tree */
564 STP_Bool* RESTRICT connected, /**< array to mark whether a vertex is part of computed Steiner tree */
597 computeSteinerTree_connectPseudoTerm(g, k, nodes_pred, nodes_dist, spaths_pc, dheap, connected, nPseudoTerms);
656 computeSteinerTree_tryConnectNodePcMw(g, k, prize, costIsBiased, nodes_pred, nodes_dist, dheap, connected,
692 assert(termsposCount == ntermspos || !computeSteinerTree_allPseudoTermsAreReached(g, connected));
744 /* if k is fixed terminal positive vertex and close enough, connect its path to current subtree */
745 if( Is_anyTerm(g->term[k]) && (Is_term(g->term[k]) || GE(prize[k], nodes_dist[k])) && !connected[k] )
905 const SCIP_Bool usecosts = (costs && (graph->stp_type == STP_MWCSP || graph->stp_type == STP_RMWCSP));
993 const STP_Bool* connected, /**< array to mark whether a vertex is part of computed Steiner tree */
1040 assert(spaths->csr && spaths->nodes_dist && spaths->nodes_pred && spaths->dheap && spaths->nodes_isConnected);
1063 assert(spaths->csr && spaths->nodes_dist && spaths->nodes_pred && spaths->dheap && spaths->nodes_isConnected);
1089 assert(spaths->csr && spaths->nodes_dist && spaths->nodes_pred && spaths->dheap && spaths->nodes_isConnected);
1114 assert(spaths->csr && spaths->nodes_dist && spaths->nodes_pred && spaths->dheap && spaths->nodes_isConnected);
1138 assert(spaths->csr && spaths->nodes_dist && spaths->nodes_pred && spaths->dheap && spaths->nodes_isConnected);
1160 assert(spaths->csr && spaths->nodes_dist && spaths->nodes_pred && spaths->dheap && spaths->nodes_isConnected);
void shortestpath_computeSteinerTreePcMw(const GRAPH *g, int startnode, const SCIP_Real *prize, SCIP_Bool costIsBiased, SPATHSPC *spaths_pc, SPATHS *spaths)
Definition: shortestpath.c:1104
Definition: graphdefs.h:184
static void computeSteinerTree_connectTerminal(const GRAPH *g, int k, const int *nodes_pred, SCIP_Real *RESTRICT nodes_dist, DHEAP *dheap, STP_Bool *RESTRICT connected)
Definition: shortestpath.c:147
Definition: struct_scip.h:59
SCIP_RETCODE shortestpath_pcInit(SCIP *scip, const GRAPH *graph, const SCIP_Real *costs, const SCIP_Real *prizes, SPATHSPC **sppc)
Definition: shortestpath.c:893
Shortest path based algorithms for Steiner problems.
Definition: graphdefs.h:301
void shortestpath_computeSteinerTreePcMwFull(const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:1153
static void computeSteinerTree_execRpcMw(const GRAPH *g, int startnode, const SCIP_Real *prize, SPATHSPC *spaths_pc, SPATHS *spaths)
Definition: shortestpath.c:699
static void computeSteinerTree_connectPseudoTerm(const GRAPH *g, int k, const int *nodes_pred, SCIP_Real *RESTRICT nodes_dist, SPATHSPC *spaths_pc, DHEAP *dheap, STP_Bool *RESTRICT connected, int *RESTRICT nPseudoTerms)
Definition: shortestpath.c:511
static void computeSteinerTree_init(const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:104
static SCIP_Bool computeSteinerTree_allTermsAreReached(const GRAPH *g, const STP_Bool *connected)
Definition: shortestpath.c:35
void SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
void shortestpath_computeSteinerTreeDirected(SCIP *scip, const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:1055
static SCIP_Bool computeSteinerTree_allFixedTermsAreReached(const GRAPH *g, const STP_Bool *connected)
Definition: shortestpath.c:80
header only, simple implementation of an STL like vector
Definition: shortestpath.h:36
static void computeSteinerTree_connectNode(const GRAPH *g, int k, const int *nodes_pred, SCIP_Real *RESTRICT nodes_dist, DHEAP *dheap, int *termscount, STP_Bool *RESTRICT connected)
Definition: shortestpath.c:182
static void computeSteinerTree_execDirected(SCIP *scip, const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:304
Definition: reducedefs.h:135
void shortestpath_pcFree(SCIP *scip, SPATHSPC **sppc)
Definition: shortestpath.c:964
Definition: type_retcode.h:33
void shortestpath_computeSteinerTreeBiased(const GRAPH *g, const SDPROFIT *sdprofit, int startnode, SPATHS *spaths)
Definition: shortestpath.c:1081
static SCIP_Bool computeSteinerTree_allPseudoTermsAreReached(const GRAPH *g, const STP_Bool *connected)
Definition: shortestpath.c:57
static void computeSteinerTree_execPcMwFull(const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:809
static void computeSteinerTree_exec(const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:224
SCIP_Bool graph_pc_knotIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1383
Definition: graphdefs.h:138
Portable definitions.
void shortestpath_computeSteinerTreeRpcMw(const GRAPH *g, int startnode, const SCIP_Real *prize, SPATHSPC *spaths_pc, SPATHS *spaths)
Definition: shortestpath.c:1129
SCIP_Bool graph_pc_knotIsDummyTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1344
SCIP_Real *RESTRICT nodes_bias
Definition: reducedefs.h:137
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1257
int graph_heap_deleteMinReturnNode(DHEAP *)
Definition: graph_util.c:1076
void shortestpath_computeSteinerTree(const GRAPH *g, int startnode, SPATHS *spaths)
Definition: shortestpath.c:1033
static void computeSteinerTree_execBiased(const GRAPH *g, const SDPROFIT *sdprofit, int startnode, SPATHS *spaths)
Definition: shortestpath.c:408
int *RESTRICT nodes_biassource
Definition: reducedefs.h:139
void shortestpath_pcConnectNode(const GRAPH *g, const STP_Bool *connected, int node_connected, SPATHSPC *sppc)
Definition: shortestpath.c:991
static void computeSteinerTree_tryConnectNodePcMw(const GRAPH *g, int k, const SCIP_Real *prize, SCIP_Bool costIsBiased, const int *nodes_pred, SCIP_Real *RESTRICT nodes_dist, DHEAP *dheap, STP_Bool *RESTRICT connected, SPATHSPC *spaths_pc, SCIP_Bool *isConnected, int *RESTRICT nPseudoTerms)
Definition: shortestpath.c:556
Definition: shortestpath.h:47
Definition: objbenders.h:33
static void computeSteinerTree_execPcMw(const GRAPH *g, int startnode, const SCIP_Real *prize, SCIP_Bool costIsBiased, SPATHSPC *spaths_pc, SPATHS *spaths)
Definition: shortestpath.c:607
includes various reduction methods for Steiner tree problems