1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*  Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB)                      */
7    	/*                                                                           */
8    	/*  Licensed under the Apache License, Version 2.0 (the "License");          */
9    	/*  you may not use this file except in compliance with the License.         */
10   	/*  You may obtain a copy of the License at                                  */
11   	/*                                                                           */
12   	/*      http://www.apache.org/licenses/LICENSE-2.0                           */
13   	/*                                                                           */
14   	/*  Unless required by applicable law or agreed to in writing, software      */
15   	/*  distributed under the License is distributed on an "AS IS" BASIS,        */
16   	/*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17   	/*  See the License for the specific language governing permissions and      */
18   	/*  limitations under the License.                                           */
19   	/*                                                                           */
20   	/*  You should have received a copy of the Apache-2.0 license                */
21   	/*  along with SCIP; see the file LICENSE. If not visit scipopt.org.         */
22   	/*                                                                           */
23   	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24   	
25   	/**@file   scip_bandit.h
26   	 * @ingroup PUBLICCOREAPI
27   	 * @brief  public methods for bandit algorithms
28   	 * @author Tobias Achterberg
29   	 * @author Timo Berthold
30   	 * @author Thorsten Koch
31   	 * @author Alexander Martin
32   	 * @author Marc Pfetsch
33   	 * @author Kati Wolter
34   	 * @author Gregor Hendel
35   	 * @author Leona Gottwald
36   	 */
37   	
38   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
39   	
40   	#ifndef __SCIP_SCIP_BANDIT_H__
41   	#define __SCIP_SCIP_BANDIT_H__
42   	
43   	
44   	#include "scip/def.h"
45   	#include "scip/type_bandit.h"
46   	#include "scip/type_retcode.h"
47   	#include "scip/type_scip.h"
48   	
49   	#ifdef __cplusplus
50   	extern "C" {
51   	#endif
52   	
53   	/**@addtogroup PublicBanditMethods
54   	 *
55   	 * @{
56   	 */
57   	
58   	/** includes a bandit algorithm virtual function table  */
59   	SCIP_EXPORT
60   	SCIP_RETCODE SCIPincludeBanditvtable(
61   	   SCIP*                 scip,               /**< SCIP data structure */
62   	   SCIP_BANDITVTABLE**   banditvtable,       /**< bandit algorithm virtual function table */
63   	   const char*           name,               /**< a name for the algorithm represented by this vtable */
64   	   SCIP_DECL_BANDITFREE  ((*banditfree)),    /**< callback to free bandit specific data structures */
65   	   SCIP_DECL_BANDITSELECT((*banditselect)),  /**< selection callback for bandit selector */
66   	   SCIP_DECL_BANDITUPDATE((*banditupdate)),  /**< update callback for bandit algorithms */
67   	   SCIP_DECL_BANDITRESET ((*banditreset))    /**< update callback for bandit algorithms */
68   	   );
69   	
70   	/** returns the bandit virtual function table of the given name, or NULL if not existing */
71   	SCIP_EXPORT
72   	SCIP_BANDITVTABLE* SCIPfindBanditvtable(
73   	   SCIP*                 scip,               /**< SCIP data structure */
74   	   const char*           name                /**< name of bandit algorithm virtual function table */
75   	   );
76   	
77   	/** calls destructor and frees memory of bandit algorithm */
78   	SCIP_EXPORT
79   	SCIP_RETCODE SCIPfreeBandit(
80   	   SCIP*                 scip,               /**< SCIP data structure */
81   	   SCIP_BANDIT**         bandit              /**< pointer to bandit algorithm data structure */
82   	   );
83   	
84   	/** reset the bandit algorithm */
85   	SCIP_EXPORT
86   	SCIP_RETCODE SCIPresetBandit(
87   	   SCIP*                 scip,               /**< SCIP data structure */
88   	   SCIP_BANDIT*          bandit,             /**< pointer to bandit algorithm data structure */
89   	   SCIP_Real*            priorities,         /**< priorities for every action, or NULL if not needed */
90   	   unsigned int          seed                /**< initial random seed for bandit selection */
91   	   );
92   	
93   	/** @} */
94   	
95   	#ifdef __cplusplus
96   	}
97   	#endif
98   	
99   	#endif
100