Scippy

SCIP

Solving Constraint Integer Programs

scip_bandit.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_bandit.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for bandit algorithms
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_BANDIT_H__
32 #define __SCIP_SCIP_BANDIT_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_bandit.h"
37 #include "scip/type_retcode.h"
38 #include "scip/type_scip.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /**@addtogroup PublicBanditMethods
45  *
46  * @{
47  */
48 
49 /** includes a bandit algorithm virtual function table */
52  SCIP* scip, /**< SCIP data structure */
53  SCIP_BANDITVTABLE** banditvtable, /**< bandit algorithm virtual function table */
54  const char* name, /**< a name for the algorithm represented by this vtable */
55  SCIP_DECL_BANDITFREE ((*banditfree)), /**< callback to free bandit specific data structures */
56  SCIP_DECL_BANDITSELECT((*banditselect)), /**< selection callback for bandit selector */
57  SCIP_DECL_BANDITUPDATE((*banditupdate)), /**< update callback for bandit algorithms */
58  SCIP_DECL_BANDITRESET ((*banditreset)) /**< update callback for bandit algorithms */
59  );
60 
61 /** returns the bandit virtual function table of the given name, or NULL if not existing */
64  SCIP* scip, /**< SCIP data structure */
65  const char* name /**< name of bandit algorithm virtual function table */
66  );
67 
68 /** calls destructor and frees memory of bandit algorithm */
71  SCIP* scip, /**< SCIP data structure */
72  SCIP_BANDIT** bandit /**< pointer to bandit algorithm data structure */
73  );
74 
75 /** reset the bandit algorithm */
78  SCIP* scip, /**< SCIP data structure */
79  SCIP_BANDIT* bandit, /**< pointer to bandit algorithm data structure */
80  SCIP_Real* priorities, /**< priorities for every action, or NULL if not needed */
81  unsigned int seed /**< initial random seed for bandit selection */
82  );
83 
84 /* @} */
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif
SCIP_EXPORT SCIP_RETCODE SCIPfreeBandit(SCIP *scip, SCIP_BANDIT **bandit)
Definition: scip_bandit.c:97
#define SCIP_EXPORT
Definition: def.h:98
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
#define SCIP_DECL_BANDITRESET(x)
Definition: type_bandit.h:73
SCIP_EXPORT SCIP_BANDITVTABLE * SCIPfindBanditvtable(SCIP *scip, const char *name)
Definition: scip_bandit.c:70
type definitions for bandit selection algorithms
SCIP_EXPORT SCIP_RETCODE SCIPresetBandit(SCIP *scip, SCIP_BANDIT *bandit, SCIP_Real *priorities, unsigned int seed)
Definition: scip_bandit.c:81
SCIP_EXPORT SCIP_RETCODE SCIPincludeBanditvtable(SCIP *scip, SCIP_BANDITVTABLE **banditvtable, const char *name, SCIP_DECL_BANDITFREE((*banditfree)), SCIP_DECL_BANDITSELECT((*banditselect)), SCIP_DECL_BANDITUPDATE((*banditupdate)), SCIP_DECL_BANDITRESET((*banditreset)))
Definition: scip_bandit.c:38
#define SCIP_DECL_BANDITFREE(x)
Definition: type_bandit.h:54
#define SCIP_Real
Definition: def.h:164
#define SCIP_DECL_BANDITUPDATE(x)
Definition: type_bandit.h:66
#define SCIP_DECL_BANDITSELECT(x)
Definition: type_bandit.h:60
common defines and data types used in all packages of SCIP