BayesOpt
bayesopt.h
Go to the documentation of this file.
1 
2 /*
3 -----------------------------------------------------------------------------
4  This file is part of BayesOptimization, an efficient C++ library for
5  Bayesian optimization.
6 
7  Copyright (C) 2011-2015 Ruben Martinez-Cantin <rmcantin@unizar.es>
8 
9  BayesOptimization is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Affero General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  BayesOptimization is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Affero General Public License for more details.
18 
19  You should have received a copy of the GNU Affero General Public License
20  along with BayesOptimization. If not, see <http://www.gnu.org/licenses/>.
21 -----------------------------------------------------------------------------
22 */
23 
24 #ifndef _BAYESOPTWPR_H_
25 #define _BAYESOPTWPR_H_
26 
27 #include "bayesopt/parameters.h"
28 
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36  typedef double (*eval_func)(unsigned int n, const double *x,
37  double *gradient, /* NULL if not needed */
38  void *func_data);
39 
40 
56  BAYESOPT_API int bayes_optimization(int nDim, eval_func f, void* f_data,
57  const double *lb, const double *ub,
58  double *x, double *minf,
59  bopt_params parameters);
60 
61 
77  BAYESOPT_API int bayes_optimization_disc(int nDim, eval_func f, void* f_data,
78  double *valid_x, size_t n_points,
79  double *x, double *minf,
80  bopt_params parameters);
81 
97  BAYESOPT_API int bayes_optimization_categorical(int nDim, eval_func f,
98  void* f_data,
99  int *categories,
100  double *x,
101  double *minf,
102  bopt_params parameters);
103 
104 
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
112 #endif
BAYESOPT_API int bayes_optimization(int nDim, eval_func f, void *f_data, const double *lb, const double *ub, double *x, double *minf, bopt_params parameters)
C wrapper for the Bayesian optimization algorithm.
Definition: bayesoptwpr.cpp:98
BAYESOPT_API int bayes_optimization_disc(int nDim, eval_func f, void *f_data, double *valid_x, size_t n_points, double *x, double *minf, bopt_params parameters)
C wrapper for the Bayesian optimization algorithm.
Configuration parameters.
Definition: parameters.h:83
BAYESOPT_API int bayes_optimization_categorical(int nDim, eval_func f, void *f_data, int *categories, double *x, double *minf, bopt_params parameters)
C wrapper for the Bayesian optimization algorithm.
Parameter definitions.