extreduce_contract.c
Go to the documentation of this file.
20 * This file implements rule-out algorithms for extended reduction techniques for Steiner problems.
21 * Allows to compute and store special distance (SD) MSTs / SPGs between the leaves of extension tree,
24 * Similarly to the extmst methods, we keep two distance storages: One from all component vertices to the
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
47 SCIP_Real* leaves_mindists; /**< minimum distances from leaves to contracted node (buffer, of size leaves_maxn) */
142 const SCIP_Real* const sdvertical_dists = extreduce_mldistsTopTargetDists(sds_vertical, topleaf);
151 SCIPdebugMessage("top=%d leaf=%d, dist=%f \n", topleaf, extdata->tree_leaves[j], sdvertical_dists[j]);
195 const SCIP_Real* const sdvertical_dists = extreduce_mldistsTargetDists(sds_vertical, level - 1, comproot);
196 const SCIP_Real* const sdhorizontal_dists = hasSiblings ? extreduce_mldistsTargetDists(sds_horizontal, level - 1, comproot) : NULL;
197 const int* const sdhorizontal_ids = hasSiblings ? extreduce_mldistsTargetIds(sds_horizontal, level - 1, comproot) : NULL;
201 const int* const sdvertical_ids = extreduce_mldistsTargetIds(sds_vertical, level - 1, comproot);
516 SCIPdebugMessage("ruled-out with equality %f <= %f, contraction-level=%d \n", mstweight, tree_cost, i);
Definition: graphdefs.h:184
Definition: extreducedefs.h:187
Definition: struct_scip.h:59
static int compDistGetPosition(int leaf_id, int level, const CONTRACT *contraction)
Definition: extreduce_contract.c:68
const int * extreduce_mldistsTargetIds(const MLDISTS *, int, int)
Definition: extreduce_mldists.c:829
static void compUpDistInitMindists(int level, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:248
SCIP_Real * leafToCompLeaves
Definition: extreduce_contract.c:53
SCIP_Bool extreduce_contractionRuleOutPeriph(SCIP *scip, const GRAPH *graph, EXTDATA *extdata)
Definition: extreduce_contract.c:609
static void compUpDistAddLeaf(int leaf_id, SCIP_Real dist, SCIP_Bool override, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:88
static void compRootDistsUpdateLeavesDists(const GRAPH *graph, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:182
static int extStackGetTopOutEdgesStart(const EXTDATA *extdata, int stackpos)
Definition: extreducedefs.h:398
static int extStackGetTopOutEdgesEnd(const EXTDATA *extdata, int stackpos)
Definition: extreducedefs.h:412
static int extStackGetPosition(const EXTDATA *extdata)
Definition: extreducedefs.h:325
static void addComponentUpdateLeavesStarts(const GRAPH *graph, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:367
static void compRootDistUpdateMindists(int level, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:303
SCIP_Real * leaves_mindists
Definition: extreduce_contract.c:47
void reduce_dcmstAddNode(SCIP *, const CSR *, const SCIP_Real *, DCMST *, CSR *)
Definition: reduce_util.c:1411
This file implements extended reduction techniques for several Steiner problems.
SCIP_Real * leafToCompRootDists
Definition: extreduce_contract.c:44
SCIP_Real reduce_dcmstGetWeight(SCIP *, const CSR *)
Definition: reduce_util.c:1573
int extreduce_mldistsLevelNTargets(const MLDISTS *, int)
Definition: extreduce_mldists.c:730
static SCIP_Bool extProbIsPc(const GRAPH *graph, const EXTDATA *extdata)
Definition: extreducedefs.h:237
Definition: type_retcode.h:33
const SCIP_Real * extreduce_mldistsTopTargetDists(const MLDISTS *, int)
Definition: extreduce_mldists.c:873
includes extended reductions definitions and inline methods used for Steiner tree problems ...
SCIP_RETCODE extreduce_contractionInit(SCIP *scip, int maxnlevels, int maxnleaves, CONTRACT **contraction)
Definition: extreduce_contract.c:538
static void addComponentUpdateLeavesToCompDists(const GRAPH *graph, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:406
void extreduce_contractionFree(SCIP *scip, CONTRACT **contraction)
Definition: extreduce_contract.c:581
Definition: graphdefs.h:138
int extreduce_mldistsLevelNTopTargets(const MLDISTS *)
Definition: extreduce_mldists.c:743
static void addComponent(SCIP *scip, const GRAPH *graph, EXTDATA *extdata)
Definition: extreduce_contract.c:424
Definition: extreducedefs.h:138
SCIP_Real * leafToCompUpDists
Definition: extreduce_contract.c:45
SCIP_Real * level_treecost
Definition: extreduce_contract.c:46
static SCIP_Bool ruledOut(SCIP *scip, const GRAPH *graph, EXTDATA *extdata)
Definition: extreduce_contract.c:446
static void compRootDistAddLeaf(int leaf_id, SCIP_Real dist, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:161
static void compUpDistUpdateMindists(int level, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:276
const SCIP_Real * extreduce_mldistsTargetDists(const MLDISTS *, int, int)
Definition: extreduce_mldists.c:845
static int extStackGetTopRoot(const GRAPH *graph, const EXTDATA *extdata)
Definition: extreducedefs.h:338
Definition: objbenders.h:33
const int * extreduce_mldistsTopTargetIds(const MLDISTS *, int)
Definition: extreduce_mldists.c:863
static void addComponentUpdateTreeCosts(const GRAPH *graph, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:330
void graph_csrdepo_getCSR(const CSRDEPO *, int, CSR *)
Definition: graph_util.c:667
static void compUpDistUpdateLeavesDists(const GRAPH *graph, EXTDATA *extdata, CONTRACT *contraction)
Definition: extreduce_contract.c:119