extreduce_mldists.c
Go to the documentation of this file.
21 * that allow use to store and retrieve (special) distances between vertices of the extension tree.
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
42 * Each slots consists of a base (id) and a number of targets. Each target has a distance and an ID.
58 int emptyslot_number; /**< number (0,...) of current empty slot, or EMPTYSLOT_NONE if none exists */
91 assert(mldists->level_basestart[level] >= 0 && mldists->level_basestart[level] < mldists->maxnslots);
105 assert(mldists->level_basestart[level + 1] >= 0 && mldists->level_basestart[level] <= mldists->maxnslots);
296 int emptyslot_nbuffers, /**< buffer entries for empty slot (dists and IDs array is that much longer) */
583 mldists->level_targetstart[nlevels] = mldists->level_targetstart[nlevels - 1] + nslots * nslottargets;
645 mldists->level_targetstart[nlevels] = mldists->level_targetstart[nlevels - 1] + emptyslot * nslottargets;
668 mldists->emptyslot_number = mldists->level_basestart[nlevels] - mldists->level_basestart[nlevels - 1];
737 assert(mldists->level_ntargets[level] >= 0 && mldists->level_ntargets[level] <= mldists->level_maxntargets);
762 assert(mldists->level_basestart[level + 1] - mldists->level_basestart[level] <= mldists->level_maxnslots);
void extreduce_mldistsLevelAddAndCloseRoot(int base, MLDISTS *mldists)
Definition: extreduce_mldists.c:609
int level_maxntargets
Definition: extreduce_mldists.c:52
SCIP_Real * target_dists
Definition: extreduce_mldists.c:47
const int * extreduce_mldistsTopTargetIds(const MLDISTS *mldists, int baseid)
Definition: extreduce_mldists.c:863
void extreduce_mldistsEmptySlotSetFilled(MLDISTS *mldists)
Definition: extreduce_mldists.c:534
Definition: struct_scip.h:59
int extreduce_mldistsLevelNSlots(const MLDISTS *mldists, int level)
Definition: extreduce_mldists.c:754
SCIP_Bool target_withids
Definition: extreduce_mldists.c:59
static int mldistsGetPosBasesEnd(const MLDISTS *mldists, int level)
Definition: extreduce_mldists.c:99
SCIP_Real * extreduce_mldistsEmptySlotTargetDistsDirty(const MLDISTS *mldists)
Definition: extreduce_mldists.c:454
SCIP_Real extreduce_mldistsTargetDist(const MLDISTS *mldists, int level, int baseid, int targetid)
Definition: extreduce_mldists.c:904
SCIP_Bool extreduce_mldistsIsEmpty(const MLDISTS *mldists)
Definition: extreduce_mldists.c:372
SCIP_RETCODE extreduce_mldistsInit(SCIP *scip, int maxnlevels, int maxnslots, int maxntargets, int emptyslot_nbuffers, SCIP_Bool use_targetids, MLDISTS **mldistances)
Definition: extreduce_mldists.c:291
SCIP_Bool extreduce_mldistsLevelContainsBase(const MLDISTS *mldists, int level, int baseid)
Definition: extreduce_mldists.c:814
int extreduce_mldistsTopLevelNSlots(const MLDISTS *mldists)
Definition: extreduce_mldists.c:769
SCIP_Real extreduce_mldistsTopTargetDist(const MLDISTS *mldists, int baseid, int targetid)
Definition: extreduce_mldists.c:885
int * level_basestart
Definition: extreduce_mldists.c:49
static int mldistsGetPosBase(const MLDISTS *mldists, int level, int baseid)
Definition: extreduce_mldists.c:114
const SCIP_Real * extreduce_mldistsTopTargetDists(const MLDISTS *mldists, int baseid)
Definition: extreduce_mldists.c:873
This file implements extended reduction techniques for several Steiner problems.
void extreduce_mldistsLevelAddTop(int nslots, int nslottargets, MLDISTS *mldists)
Definition: extreduce_mldists.c:562
miscellaneous methods used for solving Steiner problems
static int mldistsGetPosTargets(const MLDISTS *mldists, int level, int baseid, int targetid)
Definition: extreduce_mldists.c:189
void extreduce_mldistsEmptySlotSetBase(int baseid, MLDISTS *mldists)
Definition: extreduce_mldists.c:477
SCIP_Bool extreduce_mldistsEmptySlotExists(const MLDISTS *mldists)
Definition: extreduce_mldists.c:383
int emptyslot_number
Definition: extreduce_mldists.c:58
Definition: type_retcode.h:33
static int mldistsGetPosTargetsStart(const MLDISTS *mldists, int level, int baseid)
Definition: extreduce_mldists.c:160
int extreduce_mldistsNlevels(const MLDISTS *mldists)
Definition: extreduce_mldists.c:778
void extreduce_mldistsLevelRemoveTop(MLDISTS *mldists)
Definition: extreduce_mldists.c:695
void extreduce_mldistsLevelAddAndCloseEmpty(int nslottargets, MLDISTS *mldists)
Definition: extreduce_mldists.c:594
int * extreduce_mldistsEmptySlotTargetIdsDirty(const MLDISTS *mldists)
Definition: extreduce_mldists.c:418
static void mldistsTopLevelUnset(const MLDISTS *mldists)
Definition: extreduce_mldists.c:238
int extreduce_mldistsLevelNTargets(const MLDISTS *mldists, int level)
Definition: extreduce_mldists.c:730
const int * extreduce_mldistsTargetIds(const MLDISTS *mldists, int level, int baseid)
Definition: extreduce_mldists.c:829
static int mldistsGetPosEmptyTargetsStart(const MLDISTS *mldists)
Definition: extreduce_mldists.c:219
int * extreduce_mldistsEmptySlotTargetIds(const MLDISTS *mldists)
Definition: extreduce_mldists.c:395
int * level_targetstart
Definition: extreduce_mldists.c:50
static int mldistsGetPosBasesStart(const MLDISTS *mldists, int level)
Definition: extreduce_mldists.c:85
Portable definitions.
void extreduce_mldistsEmptySlotReset(MLDISTS *mldists)
Definition: extreduce_mldists.c:496
int extreduce_mldistsEmptySlotLevel(const MLDISTS *mldists)
Definition: extreduce_mldists.c:466
static int mldistsGetTopLevel(const MLDISTS *mldists)
Definition: extreduce_mldists.c:72
void extreduce_mldistsFree(SCIP *scip, MLDISTS **mldistances)
Definition: extreduce_mldists.c:344
const int * extreduce_mldistsTopLevelBases(const MLDISTS *mldists)
Definition: extreduce_mldists.c:802
void extreduce_mldistsLevelRemoveTopNonClosed(MLDISTS *mldists)
Definition: extreduce_mldists.c:712
const SCIP_Real * extreduce_mldistsTargetDists(const MLDISTS *mldists, int level, int baseid)
Definition: extreduce_mldists.c:845
void extreduce_mldistsLevelReopenTop(MLDISTS *mldists)
Definition: extreduce_mldists.c:656
int extreduce_mldistsTopLevel(const MLDISTS *mldists)
Definition: extreduce_mldists.c:790
Definition: objbenders.h:33
int extreduce_mldistsLevelNTopTargets(const MLDISTS *mldists)
Definition: extreduce_mldists.c:743
void extreduce_mldistsLevelCloseTop(MLDISTS *mldists)
Definition: extreduce_mldists.c:625
SCIP_Real * extreduce_mldistsEmptySlotTargetDists(const MLDISTS *mldists)
Definition: extreduce_mldists.c:432