Scippy

SCIP

Solving Constraint Integer Programs

type_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-2020 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 type_bandit.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for bandit selection algorithms
19  * @author Gregor Hendel
20  *
21  * This file defines the interface for bandit selection algorithms implemented in C.
22  * see \ref PublicBanditMethods for all publicly available bandit methods.
23  */
24 
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
26 
27 #ifndef __SCIP_TYPE_BANDIT_H__
28 #define __SCIP_TYPE_BANDIT_H__
29 
30 #include "scip/def.h"
31 #include "scip/type_scip.h"
32 #include "scip/type_result.h"
33 #include "scip/type_timing.h"
34 #include "blockmemshell/memory.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /** data structure for bandit algorithms */
41 typedef struct SCIP_Bandit SCIP_BANDIT;
42 
43 /** virtual function table for bandit callbacks */
45 
46 /** data structure for specific bandit algorithm implementation */
47 typedef struct SCIP_BanditData SCIP_BANDITDATA;
48 
49 /*
50  * callbacks for bandit virtual function table
51  */
52 
53 /** callback to free bandit specific data structures */
54 #define SCIP_DECL_BANDITFREE(x) SCIP_RETCODE x ( \
55  BMS_BLKMEM* blkmem, \
56  SCIP_BANDIT* bandit \
57 )
58 
59 /** selection callback for bandit selector */
60 #define SCIP_DECL_BANDITSELECT(x) SCIP_RETCODE x ( \
61  SCIP_BANDIT* bandit, \
62  int* selection \
63 )
64 
65 /** update callback for bandit algorithms */
66 #define SCIP_DECL_BANDITUPDATE(x) SCIP_RETCODE x ( \
67  SCIP_BANDIT* bandit, \
68  int selection, \
69  SCIP_Real score \
70 )
71 
72 /** reset callback for bandit algorithms */
73 #define SCIP_DECL_BANDITRESET(x) SCIP_RETCODE x ( \
74  BMS_BUFMEM* bufmem, \
75  SCIP_BANDIT* bandit, \
76  SCIP_Real* priorities \
77 )
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif
timing definitions for SCIP
type definitions for SCIP's main datastructure
struct SCIP_BanditData SCIP_BANDITDATA
Definition: type_bandit.h:47
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
memory allocation routines