Scippy

SCIP

Solving Constraint Integer Programs

scip_randnumgen.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_randnumgen.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for random numbers
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Robert Lion Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_RANDNUMGEN_H__
32 #define __SCIP_SCIP_RANDNUMGEN_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_misc.h"
37 #include "scip/type_retcode.h"
38 #include "scip/type_scip.h"
39 
40 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
41  * this structure except the interface methods in scip.c.
42  * In optimized mode, the structure is included in scip.h, because some of the methods
43  * are implemented as defines for performance reasons (e.g. the numerical comparisons).
44  * Additionally, the internal "set.h" is included, such that the defines in set.h are
45  * available in optimized mode.
46  */
47 #ifdef NDEBUG
48 #include "scip/struct_scip.h"
49 #include "scip/struct_stat.h"
50 #include "scip/set.h"
51 #include "scip/tree.h"
52 #include "scip/misc.h"
53 #include "scip/var.h"
54 #include "scip/cons.h"
55 #include "scip/solve.h"
56 #include "scip/debug.h"
57 #endif
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 /**@addtogroup RandomNumbers
64  *
65  * @{
66  */
67 
68 /** creates and initializes a random number generator
69  *
70  * @note The initial seed is changed using SCIPinitializeRandomSeed()
71  */
72 extern
74  SCIP* scip, /**< SCIP data structure */
75  SCIP_RANDNUMGEN** randnumgen, /**< random number generator */
76  unsigned int initialseed, /**< initial random seed */
77  SCIP_Bool useglobalseed /**< should SCIP's global seed be used to initialise the supplied seed? */
78  );
79 
80 /** frees a random number generator */
81 extern
82 void SCIPfreeRandom(
83  SCIP* scip, /**< SCIP data structure */
84  SCIP_RANDNUMGEN** randnumgen /**< random number generator */
85  );
86 
87 /** initializes a random number generator with a given seed
88  *
89  * @note The seed is changed using SCIPinitializeRandomSeed()
90  */
91 extern
93  SCIP* scip, /**< SCIP data structure */
94  SCIP_RANDNUMGEN* randnumgen, /**< random number generator */
95  unsigned int seed /**< new random seed */
96  );
97 
98 
99 /** modifies an initial seed value with the global shift of random seeds */
100 extern
101 unsigned int SCIPinitializeRandomSeed(
102  SCIP* scip, /**< SCIP data structure */
103  unsigned int initialseedvalue /**< initial seed value to be modified */
104  );
105 
106 /**@} */
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
internal methods for branch and bound tree
type definitions for miscellaneous datastructures
void SCIPsetRandomSeed(SCIP *scip, SCIP_RANDNUMGEN *randnumgen, unsigned int seed)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
internal miscellaneous methods
internal methods for global SCIP settings
SCIP main data structure.
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
internal methods for problem variables
#define SCIP_Bool
Definition: def.h:69
methods for debugging
datastructures for problem statistics
internal methods for main solving loop and node processing
internal methods for constraints and constraint handlers
unsigned int SCIPinitializeRandomSeed(SCIP *scip, unsigned int initialseedvalue)
common defines and data types used in all packages of SCIP