Scippy

SCIP

Solving Constraint Integer Programs

struct_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-2022 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 scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file struct_bandit.h
17  * @ingroup INTERNALAPI
18  * @brief data structures for bandit selection algorithms
19  * @author Gregor Hendel
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_STRUCT_BANDIT_H__
25 #define __SCIP_STRUCT_BANDIT_H__
26 
27 
28 #include "scip/def.h"
29 #include "misc.h"
30 #include "scip/type_clock.h"
31 #include "scip/type_bandit.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /** virtual function table for bandit selection algorithms */
39 {
40  const char* name; /**< name of the represented bandit algorithm */
41  SCIP_DECL_BANDITFREE ((*banditfree)); /**< callback to free bandit specific data structures */
42  SCIP_DECL_BANDITSELECT((*banditselect)); /**< selection callback for bandit selector */
43  SCIP_DECL_BANDITUPDATE((*banditupdate)); /**< update callback for bandit algorithms */
44  SCIP_DECL_BANDITRESET ((*banditreset)); /**< update callback for bandit algorithms */
45 };
46 
47 /** data structure for bandit algorithms */
49 {
50  SCIP_BANDITVTABLE* vtable; /**< virtual function table for callbacks */
51  SCIP_RANDNUMGEN* rng; /**< random number generator for randomized selection */
52  int nactions; /**< the number of actions to select from */
53  SCIP_BANDITDATA* data; /**< specific data for bandit algorithm implementations */
54 };
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif
SCIP_DECL_BANDITFREE((*banditfree))
SCIP_RANDNUMGEN * rng
Definition: struct_bandit.h:51
SCIP_DECL_BANDITRESET((*banditreset))
internal miscellaneous methods
type definitions for bandit selection algorithms
SCIP_BANDITDATA * data
Definition: struct_bandit.h:53
SCIP_BANDITVTABLE * vtable
Definition: struct_bandit.h:50
type definitions for clocks and timing issues
SCIP_DECL_BANDITSELECT((*banditselect))
struct SCIP_BanditData SCIP_BANDITDATA
Definition: type_bandit.h:47
const char * name
Definition: struct_bandit.h:40
SCIP_DECL_BANDITUPDATE((*banditupdate))
common defines and data types used in all packages of SCIP