Detailed Description
includes extended reductions definitions and inline methods used for Steiner tree problems
Definition in file extreducedefs.h.
Go to the source code of this file.
Data Structures | |
struct | pathroot_state |
struct | distance_data |
struct | extension_data_permanent |
struct | reduction_data |
struct | pcmw_specific_data |
struct | initial_extension_component |
struct | extension_data |
Macros | |
#define | STP_EXT_CLOSENODES_MAXN 50 |
#define | STP_EXT_MAXSTACKSIZE 5000 |
#define | STP_EXT_MAXNCOMPS 1000 |
#define | STP_EXT_MAXDFSDEPTH 6 |
#define | STP_EXT_MAXDFSDEPTH_GUARD (STP_EXT_MAXDFSDEPTH + 2) |
#define | STP_EXT_MIDDFSDEPTH 5 |
#define | STP_EXT_MINDFSDEPTH 4 |
#define | STP_EXT_MAXGRAD 9 |
#define | STP_EXT_MAXEDGES 500 |
#define | STP_EXT_DEPTH_MIDNEDGES 50000 |
#define | STP_EXT_DEPTH_MAXNEDGES 100000 |
#define | STP_EXTTREE_MAXNEDGES 25 |
#define | STP_EXTTREE_MAXNLEAVES 20 |
#define | STP_EXTTREE_MAXNLEAVES_GUARD (STP_EXTTREE_MAXNLEAVES + STP_EXT_MAXGRAD) |
#define | EXT_EDGE_WRAPPED -10 |
#define | EXT_STATE_NONE 0 |
#define | EXT_STATE_EXPANDED 1 |
#define | EXT_STATE_MARKED 2 |
#define | STP_MLDISTS_ID_EMPTY -2 |
#define | STP_MLDISTS_ID_UNSET -1 |
#define | STP_MLDISTS_DIST_UNSET -1.0 |
Typedefs | |
typedef struct multi_level_distances_storage | MLDISTS |
typedef struct extension_tree_contraction | CONTRACT |
typedef struct pathroot_state | PRSTATE |
typedef struct distance_data | DISTDATA |
typedef struct extension_data_permanent | EXTPERMA |
typedef struct reduction_data | REDDATA |
typedef struct pcmw_specific_data | PCDATA |
typedef struct initial_extension_component | EXTCOMP |
typedef struct extension_data | EXTDATA |
Functions | |
static SCIP_Bool | extProbIsPc (const GRAPH *graph, const EXTDATA *extdata) |
static SCIP_Bool | extIsAtInitialComp (const EXTDATA *extdata) |
static SCIP_Bool | extInitialCompIsEdge (const EXTDATA *extdata) |
static SCIP_Bool | extInitialCompIsStar (const EXTDATA *extdata) |
static SCIP_Bool | extInitialCompIsGenStar (const EXTDATA *extdata) |
static SCIP_Bool | extIsAtInitialStar (const EXTDATA *extdata) |
static SCIP_Bool | extIsAtInitialGenStar (const EXTDATA *extdata) |
static int | extStackGetPosition (const EXTDATA *extdata) |
static int | extStackGetTopRoot (const GRAPH *graph, const EXTDATA *extdata) |
static int | extStackGetOutEdgesStart (const EXTDATA *extdata, int stackpos) |
static int | extStackGetOutEdgesEnd (const EXTDATA *extdata, int stackpos) |
static int | extStackGetTopOutEdgesStart (const EXTDATA *extdata, int stackpos) |
static int | extStackGetTopOutEdgesEnd (const EXTDATA *extdata, int stackpos) |
static SCIP_Bool | extStackTopIsWrapped (const EXTDATA *extdata) |
static SCIP_Bool | extStackTopIsSingleton (const EXTDATA *extdata) |
static int | extLeafFindPos (const EXTDATA *extdata, int leaf) |
static SCIP_Bool | extLeafIsExtendable (const GRAPH *graph, const SCIP_Bool *isterm, int leaf) |
static SCIP_Real | extSdGetProper (SCIP_Real sd_in) |
static SCIP_Real | extSdIsNonTrivial (SCIP_Real specialDist) |
static SCIP_Bool | extReddataHasBiasedSds (const REDDATA *reddata) |
Macro Definition Documentation
◆ STP_EXT_CLOSENODES_MAXN
#define STP_EXT_CLOSENODES_MAXN 50 |
Definition at line 35 of file extreducedefs.h.
Referenced by extInit(), extreduce_init(), and extreduce_pseudoDeleteNodes().
◆ STP_EXT_MAXSTACKSIZE
#define STP_EXT_MAXSTACKSIZE 5000 |
Definition at line 36 of file extreducedefs.h.
Referenced by extreduce_getMaxStackSize().
◆ STP_EXT_MAXNCOMPS
#define STP_EXT_MAXNCOMPS 1000 |
Definition at line 37 of file extreducedefs.h.
Referenced by extreduce_getMaxStackNcomponents().
◆ STP_EXT_MAXDFSDEPTH
#define STP_EXT_MAXDFSDEPTH 6 |
Definition at line 38 of file extreducedefs.h.
Referenced by extreduce_extPermaInit(), and extreduce_getMaxTreeDepth().
◆ STP_EXT_MAXDFSDEPTH_GUARD
#define STP_EXT_MAXDFSDEPTH_GUARD (STP_EXT_MAXDFSDEPTH + 2) |
Definition at line 39 of file extreducedefs.h.
Referenced by extreduce_extPermaAddMLdistsbiased(), and extreduce_extPermaInit().
◆ STP_EXT_MIDDFSDEPTH
#define STP_EXT_MIDDFSDEPTH 5 |
Definition at line 40 of file extreducedefs.h.
Referenced by extreduce_getMaxTreeDepth().
◆ STP_EXT_MINDFSDEPTH
#define STP_EXT_MINDFSDEPTH 4 |
Definition at line 41 of file extreducedefs.h.
Referenced by extreduce_getMaxTreeDepth().
◆ STP_EXT_MAXGRAD
#define STP_EXT_MAXGRAD 9 |
Definition at line 42 of file extreducedefs.h.
Referenced by baseMstBuildNew(), baseMstGetOrderedParentNodes(), extExtend(), extLeafIsExtendable(), extPreprocessInitialComponent(), extreduce_extendInitDebug(), extreduce_extPermaAddMLdistsbiased(), extreduce_extPermaInit(), extreduce_extStackCompNOutedges(), extreduce_mstLevelInitialInit(), extStackAddCompsExpanded(), extStackAddCompsExpandedSing(), extStackAddCompsNonExpanded(), extStackGetTopSize(), extStackTopCollectExtEdgesSing(), extStackTopExpandSingletons(), extStackTopExpandWrapped(), and extTreeFindExtensions().
◆ STP_EXT_MAXEDGES
#define STP_EXT_MAXEDGES 500 |
Definition at line 43 of file extreducedefs.h.
◆ STP_EXT_DEPTH_MIDNEDGES
#define STP_EXT_DEPTH_MIDNEDGES 50000 |
Definition at line 44 of file extreducedefs.h.
Referenced by extreduce_getMaxTreeDepth().
◆ STP_EXT_DEPTH_MAXNEDGES
#define STP_EXT_DEPTH_MAXNEDGES 100000 |
Definition at line 45 of file extreducedefs.h.
Referenced by extreduce_getMaxTreeDepth().
◆ STP_EXTTREE_MAXNEDGES
#define STP_EXTTREE_MAXNEDGES 25 |
Definition at line 46 of file extreducedefs.h.
Referenced by extreduce_extPermaInit().
◆ STP_EXTTREE_MAXNLEAVES
#define STP_EXTTREE_MAXNLEAVES 20 |
Definition at line 47 of file extreducedefs.h.
Referenced by extreduce_extPermaInit().
◆ STP_EXTTREE_MAXNLEAVES_GUARD
#define STP_EXTTREE_MAXNLEAVES_GUARD (STP_EXTTREE_MAXNLEAVES + STP_EXT_MAXGRAD) |
Definition at line 48 of file extreducedefs.h.
Referenced by extreduce_extPermaAddMLdistsbiased(), extreduce_extPermaInit(), extTreeGetDirectedRedcost(), extTreeGetDirectedRedcostProper(), sdmstGetExtWeight(), and sdmstGetWeight().
◆ EXT_EDGE_WRAPPED
#define EXT_EDGE_WRAPPED -10 |
Definition at line 49 of file extreducedefs.h.
Referenced by extreduce_printStack(), extStackAddCompsExpanded(), extStackAddCompsExpandedSing(), and extStackTopIsWrapped().
◆ EXT_STATE_NONE
#define EXT_STATE_NONE 0 |
Definition at line 52 of file extreducedefs.h.
Referenced by extBacktrack(), extPreprocessInitialComponent(), extProcessComponent(), extreduce_extStackCompNOutedges(), extreduce_printStack(), extStackAddCompsNonExpanded(), extStackGetTopSize(), extStackIsExtendable(), extStackTopExpandInitial(), extStackTopExpandSingletons(), extStackTopExpandWrapped(), and extTreeStackTopRemove().
◆ EXT_STATE_EXPANDED
#define EXT_STATE_EXPANDED 1 |
Definition at line 53 of file extreducedefs.h.
Referenced by extBacktrack(), extProcessComponent(), extProcessInitialComponent(), extreduce_nodeIsInStackTop(), extreduce_printStack(), extStackAddCompInitialExpanded(), extStackAddCompsExpanded(), extStackAddCompsExpandedSing(), extStackTopExpandSingletons(), extStackTopExpandWrapped(), extTreeStackTopAdd(), extTreeSyncWithStack(), and mstCompBuildMst().
◆ EXT_STATE_MARKED
#define EXT_STATE_MARKED 2 |
Definition at line 54 of file extreducedefs.h.
Referenced by extBacktrack(), extExtend(), extProcessComponent(), extProcessInitialComponent(), extreduce_nodeIsInStackTop(), extreduce_printStack(), extStackGetLastMarked(), extStackGetPrevMarked(), extTreeFindExtensions(), and extTruncate().
◆ STP_MLDISTS_ID_EMPTY
#define STP_MLDISTS_ID_EMPTY -2 |
Definition at line 56 of file extreducedefs.h.
Referenced by extreduce_mldistsEmptySlotSetBase(), extreduce_mldistsLevelAddAndCloseEmpty(), and mldistsGetPosBase().
◆ STP_MLDISTS_ID_UNSET
#define STP_MLDISTS_ID_UNSET -1 |
Definition at line 57 of file extreducedefs.h.
Referenced by extreduce_mldistsEmptySlotReset(), extreduce_mldistsEmptySlotSetBase(), extreduce_mldistsEmptySlotSetFilled(), extreduce_mldistsEmptySlotTargetIds(), extreduce_mldistsLevelReopenTop(), mldistsTopLevelUnset(), and mstLevelLeafAdjustVerticalSDs().
◆ STP_MLDISTS_DIST_UNSET
#define STP_MLDISTS_DIST_UNSET -1.0 |
Definition at line 58 of file extreducedefs.h.
Referenced by extreduce_mldistsEmptySlotReset(), extreduce_mldistsEmptySlotTargetDists(), extreduce_mldistsLevelReopenTop(), mldistsTopLevelUnset(), and mstLevelLeafAdjustVerticalSDs().
Typedef Documentation
◆ MLDISTS
typedef struct multi_level_distances_storage MLDISTS |
structure for storing distances in the extension tree
Definition at line 65 of file extreducedefs.h.
◆ CONTRACT
typedef struct extension_tree_contraction CONTRACT |
structure for storing data for algorithms based on contraction of extension tree
Definition at line 68 of file extreducedefs.h.
◆ PRSTATE
typedef struct pathroot_state PRSTATE |
path root state
◆ DISTDATA
typedef struct distance_data DISTDATA |
distance data
◆ EXTPERMA
typedef struct extension_data_permanent EXTPERMA |
permanent extension data
◆ REDDATA
typedef struct reduction_data REDDATA |
Reduction data; just used internally. Stores information for SDs between tree vertices, reduced costs, and pseudo-ancestor conflicts.
◆ PCDATA
typedef struct pcmw_specific_data PCDATA |
PC/MW data; just used internally.
◆ EXTCOMP
typedef struct initial_extension_component EXTCOMP |
initial extension component NOTE: it is vital the the first edge of the star component comes from the root! (will thus be constantly asserted)
◆ EXTDATA
typedef struct extension_data EXTDATA |
extension data; just used internally
Function Documentation
◆ extProbIsPc()
prize-collecting problem?
- Parameters
-
graph graph data structure extdata extension data
Definition at line 237 of file extreducedefs.h.
References graph_pc_isPc(), NULL, extension_data::pcdata, and pcmw_specific_data::pcSdToNode.
Referenced by addComponentUpdateTreeCosts(), extGetSdDouble(), extGetSdDoubleFromDistdata(), and mstLevelHorizontalAddSds().
◆ extIsAtInitialComp()
currently at initial component?
- Parameters
-
extdata extension data
Definition at line 251 of file extreducedefs.h.
References extension_data::extstack_ncomponents.
Referenced by compMstInitMsts(), extGetNancestorLeaves(), extIsAtInitialGenStar(), extIsAtInitialStar(), extreduce_mstLevelClose(), extreduce_mstLevelInitialInit(), extreduce_mstLevelVerticalAddLeaf(), extreduce_mstLevelVerticalAddLeafInitial(), extreduce_sdsverticalInSync(), extStackTopExpandInitial(), extTreeAddEdge(), extTreeRuleOutPeriph(), extTreeStackTopRootRemove(), and mstLevelLeafAdjustVerticalSDs().
◆ extInitialCompIsEdge()
is the initial component a single edge?
- Parameters
-
extdata extension data
Definition at line 264 of file extreducedefs.h.
References extension_data::extstack_start, and extension_data::genstar_centeredge.
Referenced by compMstInitMsts(), extInnerNodeRemoveTop(), extreduce_bottleneckMarkRootPath(), extreduce_distDataGetSdDoubleForbidden(), extreduce_distDataGetSdDoubleForbiddenEq(), extreduce_mstLevelVerticalAddLeafInitial(), extreduce_spg3LeafTreeRuleOut(), extStackTopGetInitalDataStart(), extStackTopProcessInitialEdges(), mstCompRuleOut(), and mstLevelLeafAdjustVerticalSDs().
◆ extInitialCompIsStar()
is the initial component a star?
- Parameters
-
extdata extension data
Definition at line 279 of file extreducedefs.h.
References extension_data::extstack_start, and extension_data::genstar_centeredge.
Referenced by extInnerNodeRemoveTop(), extIsAtInitialStar(), extProcessInitialComponent(), extreduce_extStackCompNOutedges(), extreduce_mstLevelVerticalAddLeafInitial(), extStackAddCompInitialExpanded(), extStackGetOutEdgesStart(), extTreeAddEdge(), extTreeStackTopRootRemove(), mstCompLeafGetSDs(), mstEqComp3RuleOut(), and mstLevelLeafAdjustVerticalSDs().
◆ extInitialCompIsGenStar()
is the initial component a star?
- Parameters
-
extdata extension data
Definition at line 293 of file extreducedefs.h.
References extension_data::genstar_centeredge.
Referenced by extInnerNodeRemoveTop(), extIsAtInitialGenStar(), extPreprocessInitialComponent(), extPreprocessInitialGenStar(), extProcessInitialComponent(), extreduce_bottleneckMarkRootPath(), extreduce_distDataGetSdDoubleForbidden(), extreduce_distDataGetSdDoubleForbiddenEq(), extreduce_extCompClean(), extreduce_extStackCompNOutedges(), extreduce_mstLevelVerticalAddLeaf(), extStackAddCompInitialExpanded(), extStackGetOutEdgesStart(), extStackTopGetInitalDataStart(), extTreeAddEdge(), extTreeStackTopRootRemove(), and extUnhashInitialComponent().
◆ extIsAtInitialStar()
currently at initial star?
- Parameters
-
extdata extension data
Definition at line 305 of file extreducedefs.h.
References extInitialCompIsStar(), and extIsAtInitialComp().
Referenced by extreduce_redcostAddEdge(), extTreeFindExtensions(), and mstCompLeafGetSDsToSiblings().
◆ extIsAtInitialGenStar()
currently at initial general star?
- Parameters
-
extdata extension data
Definition at line 315 of file extreducedefs.h.
References extInitialCompIsGenStar(), and extIsAtInitialComp().
Referenced by bottleneckMarkEqualityEdges(), extreduce_redcostAddEdge(), mstCompLeafGetSDsToAncestors(), mstCompLeafGetSDsToSiblings(), mstCompLeafToAncestorsBiasedRuleOut(), and mstCompLeafToSiblingsBiasedRuleOut().
◆ extStackGetPosition()
|
inlinestatic |
returns current position in the stack
- Parameters
-
extdata extension data
Definition at line 325 of file extreducedefs.h.
References extension_data::extstack_ncomponents.
Referenced by addComponentUpdateLeavesStarts(), addComponentUpdateTreeCosts(), compUpDistUpdateLeavesDists(), extBacktrack(), extExtend(), extProcessComponent(), extProcessInitialComponent(), extreduce_nodeIsInStackTop(), extreduce_sdshorizontalInSync(), extreduce_stackTopIsHashed(), extStackAddCompsExpanded(), extStackAddCompsExpandedSing(), extStackAddCompsNonExpanded(), extStackGetLastMarked(), extStackGetOutEdgesEnd(), extStackGetOutEdgesStart(), extStackGetPrevMarked(), extStackGetTopOutEdgesEnd(), extStackGetTopOutEdgesStart(), extStackGetTopRoot(), extStackGetTopSize(), extStackIsExtendable(), extStackTopCollectExtEdges(), extStackTopCollectExtEdgesSing(), extStackTopExpandInitial(), extStackTopExpandSingletons(), extStackTopExpandWrapped(), extStackTopGetInitalDataStart(), extStackTopIsSingleton(), extStackTopIsWrapped(), extStackTopProcessInitialEdges(), extTreeFindExtensions(), extTreeRuleOutSingletonFull(), extTreeRuleOutSingletonImplied(), extTreeStackTopAdd(), extTreeStackTopRemove(), extTreeSyncWithStack(), extTruncate(), mst3LeafTreeGetSds(), mstCompBuildMst(), mstCompLeafGetSDsToSiblings(), and mstCompLeafToSiblingsBiasedRuleOut().
◆ extStackGetTopRoot()
returns root of top component on the stack
- Parameters
-
graph graph data structure extdata extension data
Definition at line 338 of file extreducedefs.h.
References extension_data::extstack_data, extension_data::extstack_start, extStackGetPosition(), GRAPH::tail, extension_data::tree_deg, and extension_data::tree_root.
Referenced by compRootDistsUpdateLeavesDists(), extreduce_redcostInitExpansion(), extTreeStackTopRemove(), and extTreeStackTopRootRemove().
◆ extStackGetOutEdgesStart()
|
inlinestatic |
returns start of outgoing edges
- Parameters
-
extdata extension data stackpos current position
Definition at line 355 of file extreducedefs.h.
References extInitialCompIsGenStar(), extInitialCompIsStar(), extension_data::extstack_start, and extStackGetPosition().
Referenced by baseMstGetOrderedParentNodes(), extLeafRemoveTop(), and extStackGetTopOutEdgesStart().
◆ extStackGetOutEdgesEnd()
|
inlinestatic |
returns end of outgoing edges
- Parameters
-
extdata extension data stackpos current position
Definition at line 384 of file extreducedefs.h.
References extension_data::extstack_start, and extStackGetPosition().
Referenced by baseMstGetOrderedParentNodes(), extLeafRemoveTop(), and extStackGetTopOutEdgesEnd().
◆ extStackGetTopOutEdgesStart()
|
inlinestatic |
returns start of outgoing edges of top
- Parameters
-
extdata extension data stackpos current position
Definition at line 398 of file extreducedefs.h.
References extStackGetOutEdgesStart(), and extStackGetPosition().
Referenced by addComponentUpdateLeavesStarts(), addComponentUpdateTreeCosts(), compUpDistUpdateLeavesDists(), extreduce_sdshorizontalInSync(), extTreeFindExtensions(), mst3LeafTreeGetSds(), mstCompBuildMst(), mstCompLeafGetSDsToSiblings(), and mstCompLeafToSiblingsBiasedRuleOut().
◆ extStackGetTopOutEdgesEnd()
|
inlinestatic |
returns end of outgoing edges of top
- Parameters
-
extdata extension data stackpos current position
Definition at line 412 of file extreducedefs.h.
References extStackGetOutEdgesEnd(), and extStackGetPosition().
Referenced by addComponentUpdateLeavesStarts(), addComponentUpdateTreeCosts(), compUpDistUpdateLeavesDists(), extreduce_sdshorizontalInSync(), extTreeFindExtensions(), mst3LeafTreeGetSds(), mstCompBuildMst(), mstCompLeafGetSDsToSiblings(), and mstCompLeafToSiblingsBiasedRuleOut().
◆ extStackTopIsWrapped()
is component at top position wrapped?
- Parameters
-
extdata extension data
Definition at line 426 of file extreducedefs.h.
References EXT_EDGE_WRAPPED, extension_data::extstack_data, extension_data::extstack_start, extStackGetPosition(), FALSE, and TRUE.
Referenced by extProcessComponent(), extStackTopExpand(), extStackTopExpandWrapped(), and extTreeSyncWithStack().
◆ extStackTopIsSingleton()
is component at top position a singleton edge?
- Parameters
-
extdata extension data
Definition at line 448 of file extreducedefs.h.
References extension_data::extstack_start, and extStackGetPosition().
Referenced by extTreeRuleOutPeriph().
◆ extLeafFindPos()
|
inlinestatic |
Finds position of given leaf in leaves data. Returns -1 if leaf could not be found.
- Parameters
-
extdata extension data leaf leaf to find
Definition at line 462 of file extreducedefs.h.
References extension_data::tree_deg, extension_data::tree_leaves, and extension_data::tree_nleaves.
Referenced by baseMstGetOrderedParentNodes(), extLeafRemove(), extLeafRemoveTop(), and mstLevelLeafAdjustVerticalSDs().
◆ extLeafIsExtendable()
|
inlinestatic |
can we extend the tree from given leaf?
- Parameters
-
graph graph data structure isterm marks whether node is a terminal (or proper terminal for PC) leaf the leaf
Definition at line 488 of file extreducedefs.h.
References GRAPH::grad, and STP_EXT_MAXGRAD.
Referenced by extreduce_checkArc(), extreduce_checkEdge(), extreduce_extCompFullIsPromising(), extreduce_extCompIsPromising(), extTreeFindExtensions(), and extTruncate().
◆ extSdGetProper()
Gets proper SD value. I.e., non-negative, but possible FARAWAY
- Parameters
-
sd_in the special distance
Definition at line 503 of file extreducedefs.h.
References EQ, FARAWAY, GE, and LE.
Referenced by extreduce_extGetSdProper(), extreduce_extGetSdProperDouble(), and mstLevelLeafSetVerticalSDsBoth().
◆ extSdIsNonTrivial()
is given SD non-trivial?
- Parameters
-
specialDist SD
Definition at line 516 of file extreducedefs.h.
References EQ, FARAWAY, and LT.
Referenced by extreduce_bottleneckIsDominated(), extreduce_bottleneckIsDominatedBiased(), extreduce_bottleneckWithExtedgeIsDominated(), and extreduce_bottleneckWithExtedgeIsDominatedBiased().
◆ extReddataHasBiasedSds()
does reduction data have biased SD information?
- Parameters
-
reddata reduction data
Definition at line 529 of file extreducedefs.h.
References NULL, reduction_data::sdsbias_horizontal, reduction_data::sdsbias_use, and reduction_data::sdsbias_vertical.
Referenced by baseMstInitExtComp(), extreduce_extCompClean(), extreduce_mstLevelHorizontalAdd(), extreduce_mstLevelHorizontalAddEmpty(), extreduce_mstLevelHorizontalRemove(), extreduce_mstLevelInitialInit(), extreduce_mstLevelRemove(), extreduce_mstLevelVerticalAddEmpty(), extreduce_mstLevelVerticalClose(), extreduce_mstLevelVerticalRemove(), extreduce_mstLevelVerticalReopen(), mstAddRootLevelSDs(), mstCompLeafGetSDs(), mstCompLeafToSiblingsBiasedRuleOut(), mstCompRuleOut(), mstLevelLeafExit(), mstLevelLeafInit(), and mstLevelLeafSetVerticalSDsBoth().