Scippy

SCIP

Solving Constraint Integer Programs

dpborder_util.c File Reference

Detailed Description

Utility methods for dynamic programming solver for Steiner tree (sub-) problems with small border.

Author
Daniel Rehfeldt

Implements utility methods.

Definition in file dpborder_util.c.

#include "dpborder.h"
#include "dpborderinterns.h"

Go to the source code of this file.

Functions

static SCIP_Bool partitionIsIncluded (const DPBORDER *dpborder, const DPB_Ptype *partition, int size)
 
static SCIP_Bool partitionIsSorted (const DPB_Ptype *partition, DPB_Ptype delimiter, int size)
 
static void partitionSortSubsets (DPB_Ptype *RESTRICT partition, DPB_Ptype delimiter, int size)
 
SCIP_Bool dpborder_partIsValid (const DPBPART *borderpartition)
 
void dpborder_partPrint (const DPBPART *borderpartition)
 
 STP_Vectype (int)
 
int dpborder_partglobalGetCard (int globalindex, int delimiter, const DPBORDER *dpborder)
 
SCIP_Real dpborder_partGetConnectionCost (const DPBORDER *dpborder, const DPBPART *borderpartition, const int *candstarts_sub, int ncandstarts_sub)
 
int dpborder_partGetIdxNew (SCIP *scip, const DPBPART *borderpartition, const int *candstarts_sub, int ncandstarts_sub, DPBORDER *dpborder)
 
int dpborder_partGetIdxNewExclusive (SCIP *scip, const DPBPART *borderpartition, DPBORDER *dpborder)
 
void dpborder_markSolNodes (const DPBORDER *dpborder, STP_Bool *RESTRICT nodes_isSol)
 

Function Documentation

◆ partitionIsIncluded()

static SCIP_Bool partitionIsIncluded ( const DPBORDER dpborder,
const DPB_Ptype partition,
int  size 
)
static

◆ partitionIsSorted()

static SCIP_Bool partitionIsSorted ( const DPB_Ptype partition,
DPB_Ptype  delimiter,
int  size 
)
static

fully sorted?

Parameters
partitionarray of size 'size' with delimiter at [size]
delimiterdelimiter
sizesize

Definition at line 68 of file dpborder_util.c.

References BPBORDER_MAXBORDERSIZE, FALSE, SCIPdebugMessage, hashmap_s::size, and TRUE.

Referenced by partitionSortSubsets().

◆ partitionSortSubsets()

static void partitionSortSubsets ( DPB_Ptype *RESTRICT  partition,
DPB_Ptype  delimiter,
int  size 
)
inlinestatic

sorts all subsets NOTE: partition needs to have allocated entry [-1] and [size]

Parameters
partitionarray of size 'size'
delimiterdelimiter
sizesize

Definition at line 130 of file dpborder_util.c.

References BPBORDER_MAXBORDERSIZE, DPB_Ptype, partitionIsSorted(), and hashmap_s::size.

Referenced by dpborder_partGetIdxNew(), and dpborder_partGetIdxNewExclusive().

◆ dpborder_partIsValid()

◆ dpborder_partPrint()

◆ STP_Vectype()

STP_Vectype ( int  )

◆ dpborder_partglobalGetCard()

int dpborder_partglobalGetCard ( int  globalindex,
int  delimiter,
const DPBORDER dpborder 
)

gets cardinality from global index of new global partition.

Parameters
globalindexglobal index
delimiterdelimiter
dpborderborder

Definition at line 363 of file dpborder_util.c.

References DPB_Ptype, and dynamic_programming_border::global_partitions.

Referenced by dpborder_getPredLevel(), and updateFromPartition().

◆ dpborder_partGetConnectionCost()

SCIP_Real dpborder_partGetConnectionCost ( const DPBORDER dpborder,
const DPBPART borderpartition,
const int *  candstarts_sub,
int  ncandstarts_sub 
)

gets minimum connection cost of connection selected sets of partition to extension vertex

Parameters
dpborderborder
borderpartitionbase partition
candstarts_subcandidate starts from which to construct new partition
ncandstarts_subnumber of candidate starts

Definition at line 389 of file dpborder_util.c.

References dynamic_programming_border::borderchardists, dynamic_programming_border_partition::delimiter, DPB_Ptype, dpborder_partIsValid(), FARAWAY, GE, LT, dynamic_programming_border_partition::partchars, dynamic_programming_border_partition::partsize, and SCIP_Real.

Referenced by dpborder_getPredLevel(), and updateFromPartition().

◆ dpborder_partGetIdxNew()

int dpborder_partGetIdxNew ( SCIP scip,
const DPBPART borderpartition,
const int *  candstarts_sub,
int  ncandstarts_sub,
DPBORDER dpborder 
)

◆ dpborder_partGetIdxNewExclusive()

int dpborder_partGetIdxNewExclusive ( SCIP scip,
const DPBPART borderpartition,
DPBORDER dpborder 
)

◆ dpborder_markSolNodes()

void dpborder_markSolNodes ( const DPBORDER dpborder,
STP_Bool *RESTRICT  nodes_isSol 
)