Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

structures and methods for pseudo random number generation

Functions

int SCIPrandomGetInt (SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
 
SCIP_RETCODE SCIPrandomGetSubset (SCIP_RANDNUMGEN *randnumgen, void **set, int nelems, void **subset, int nsubelems)
 
SCIP_Real SCIPrandomGetReal (SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
 
SCIP_RETCODE SCIPcreateRandom (SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
 
void SCIPfreeRandom (SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
 
void SCIPsetRandomSeed (SCIP *scip, SCIP_RANDNUMGEN *randnumgen, unsigned int seed)
 
unsigned int SCIPinitializeRandomSeed (SCIP *scip, unsigned int initialseedvalue)
 

Function Documentation

◆ SCIPrandomGetInt()

◆ SCIPrandomGetSubset()

SCIP_RETCODE SCIPrandomGetSubset ( SCIP_RANDNUMGEN randnumgen,
void **  set,
int  nelems,
void **  subset,
int  nsubelems 
)

draws a random subset of disjoint elements from a given set of disjoint elements; this implementation is suited for the case that nsubelems is considerably smaller then nelems

Parameters
randnumgenrandom number generator
setoriginal set, from which elements should be drawn
nelemsnumber of elements in original set
subsetsubset in which drawn elements should be stored
nsubelemsnumber of elements that should be drawn and stored

Definition at line 10326 of file misc.c.

References BMScopyMemoryArray, r, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, and SCIPrandomGetInt().

◆ SCIPrandomGetReal()

◆ SCIPcreateRandom()

SCIP_RETCODE SCIPcreateRandom ( SCIP scip,
SCIP_RANDNUMGEN **  randnumgen,
unsigned int  initialseed,
SCIP_Bool  useglobalseed 
)

◆ SCIPfreeRandom()

◆ SCIPsetRandomSeed()

void SCIPsetRandomSeed ( SCIP scip,
SCIP_RANDNUMGEN randnumgen,
unsigned int  seed 
)

initializes a random number generator with a given seed

Note
The seed is changed using SCIPinitializeRandomSeed()

initializes a random number generator with a given start seed

Note
The seed is changed using SCIPinitializeRandomSeed()
Parameters
scipSCIP data structure
randnumgenrandom number generator
seednew random seed

Definition at line 94 of file scip_randnumgen.c.

References NULL, SCIPinitializeRandomSeed(), and SCIPrandomSetSeed().

Referenced by SCIP_DECL_BRANCHINIT(), and SCIP_DECL_HEURINIT().

◆ SCIPinitializeRandomSeed()

unsigned int SCIPinitializeRandomSeed ( SCIP scip,
unsigned int  initialseedvalue 
)

modifies an initial seed value with the global shift of random seeds

Parameters
scipSCIP data structure
initialseedvalueinitial seed value to be modified

Definition at line 111 of file scip_randnumgen.c.

References NULL, and SCIPsetInitializeRandomSeed().

Referenced by SCIPcreateBanditEpsgreedy(), SCIPcreateBanditExp3(), SCIPcreateBanditExp3IX(), SCIPcreateBanditUcb(), SCIPcreateRandom(), SCIPresetBandit(), SCIPsetRandomSeed(), and setupAndSolveSubscipCrossover().