dpterms_util.c
Go to the documentation of this file.
21 * One naive one, and one based on a search tree (DPS tree). Performance is slightly better for the latter one.
22 * NOTE: DPS tree design is mostly taken from "Separator-Based Pruned Dynamic Programming for Steiner Tree"
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
80 printf("termsmark size is wrong %d!=%d \n", stpbitset_getCapacity(termsmark), (((dpstree->nterms + 63) / 64) * 64));
87 printf("rootsmark size is wrong %d!=%d \n", stpbitset_getCapacity(rootsmark), (((dpstree->nnodes + 63) / 64) * 64));
195 stpbitset_bitIsTrue(terms_intersection, split_pos) == stpbitset_bitIsTrue(termsmark, split_pos) )
234 assert(stpbitset_bitIsTrue(terms_intersection, split_pos) != stpbitset_bitIsTrue(termsmark, split_pos));
348 STP_Vectype(int) intersects_naive = dpterms_collectIntersectsNaive(scip, termsmark, rootsmark, dpmisc);
354 SCIPdebugMessage("wrong sizes: %d %d\n", StpVecGetSize(intersects_naive), StpVecGetSize(intersects));
SCIP_RETCODE dpterms_streeInit(SCIP *scip, int nterms, int nnodes, DPSTREE **dpstree)
Definition: dpterms_util.c:533
Definition: struct_scip.h:59
STP_Bitset roots_union
Definition: dpterms_util.c:45
static SCIP_Bool treenodeIsInRange(int node_pos, const DPSTREE *dpstree)
Definition: dpterms_util.c:98
static void streeCollectIntersects(SCIP *scip, STP_Bitset termsmark, STP_Bitset rootsmark, int node_pos, DPSTREE *dpstree)
Definition: dpterms_util.c:278
static SCIP_Bool stpbitset_haveIntersection(STP_Bitset bitset1, STP_Bitset bitset2)
Definition: stpbitset.h:177
struct dynamic_programming_search_tree_node DPSNODE
Dynamic programming solver for Steiner tree (sub-) problems with small number of terminals.
Definition: dptermsinterns.h:82
STP_Bitset terms_intersection
Definition: dpterms_util.c:44
SCIP_Bool dpterms_intersectsEqualNaive(SCIP *scip, STP_Bitset termsmark, STP_Bitset rootsmark, STP_Vectype(int) intersects, DPMISC *dpmisc)
Definition: dpterms_util.c:340
static void stpbitset_and(SCIP *scip, STP_Bitset bitset1, STP_Bitset bitset2, STP_Bitset bitsetAnd)
Definition: stpbitset.h:286
static void printNodeDebugInfo(int node_pos, const DPSTREE *dpstree)
Definition: dpterms_util.c:123
Definition: dptermsinterns.h:50
static SCIP_Bool stpbitset_setsAreCompatible(STP_Bitset bitset1, STP_Bitset bitset2)
Definition: stpbitset.h:157
Definition: type_retcode.h:33
static void stpbitset_or(SCIP *scip, STP_Bitset bitset1, STP_Bitset bitset2, STP_Bitset bitsetOr)
Definition: stpbitset.h:308
static SCIP_Bool bitsetsizesAreValid(STP_Bitset termsmark, STP_Bitset rootsmark, const DPSTREE *dpstree)
Definition: dpterms_util.c:70
Definition: type_retcode.h:34
static STP_Bitset stpbitset_newCopy(SCIP *scip, STP_Bitset bitsetOrg)
Definition: stpbitset.h:267
Definition: dpterms_util.c:52
static void insertData(SCIP *scip, STP_Bitset termsmark, STP_Bitset rootsmark, int64_t nsubsets, int node_pos, int split_pos, int *subrootpos, DPSTREE *dpstree)
Definition: dpterms_util.c:172
static SCIP_Bool stpbitset_bitIsTrue(STP_Bitset bitset, int index)
Definition: stpbitset.h:223
Dynamic programming internals for Steiner tree (sub-) problems with small number of terminals...
void SCIPsortDownInt(int *intarray, int len)
SCIP_RETCODE dpterms_streeInsert(SCIP *scip, STP_Bitset termsmark, STP_Bitset rootsmark, int64_t nsubsets, DPSTREE *dpstree)
Definition: dpterms_util.c:449
static void addLeaf(SCIP *scip, STP_Bitset termsmark, STP_Bitset rootsmark, int64_t nsubsets, int *leafpos, DPSTREE *dpstree)
Definition: dpterms_util.c:147
Definition: objbenders.h:33
default SCIP plugins
void dpterms_streeFree(SCIP *scip, DPSTREE **dpstree)
Definition: dpterms_util.c:560