Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
6e0dae51
Commit
6e0dae51
authored
Dec 17, 2015
by
Federico Allocati
Browse files
Merge pull request #61 from resibots/conditional_includes
Conditional includes and minor bug fix
parents
4a8df077
42b78b7b
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/limbo/bayes_opt.hpp
View file @
6e0dae51
...
...
@@ -2,8 +2,10 @@
#define LIMBO_BAYES_OPT_HPP
#include
<limbo/bayes_opt/boptimizer.hpp>
#ifdef USE_SFERES
#include
<limbo/bayes_opt/ehvi.hpp>
#include
<limbo/bayes_opt/nsbo.hpp>
#include
<limbo/bayes_opt/parego.hpp>
#endif
#endif
src/limbo/bayes_opt/bo_base.hpp
View file @
6e0dae51
...
...
@@ -25,9 +25,13 @@
#include
<limbo/kernel/squared_exp_ard.hpp>
#include
<limbo/acqui/gp_ucb.hpp>
#include
<limbo/mean/data.hpp>
#i
nclude
<limbo/opt/grid_search.hpp>
#i
fdef USE_LIBCMAES
#include
<limbo/opt/cmaes.hpp>
#elif defined USE_NLOPT
#include
<limbo/opt/nlopt_no_grad.hpp>
#else
#include
<limbo/opt/grid_search.hpp>
#endif
#include
<limbo/model/gp.hpp>
#include
<limbo/model/gp/kernel_lf_opt.hpp>
#include
<limbo/init/random_sampling.hpp>
...
...
@@ -107,7 +111,7 @@ namespace limbo {
#ifdef USE_LIBCMAES
typedef
opt
::
Cmaes
<
Params
>
acquiopt_t
;
// 2
#elif defined(USE_NLOPT)
typedef
opt
::
NLOptNoGrad
<
Params
,
NLOPT_GLOBAL
_DIRECT_L_RAND
>
aquiopt_t
;
typedef
opt
::
NLOptNoGrad
<
Params
,
nlopt
::
GN
_DIRECT_L_RAND
>
a
c
quiopt_t
;
#else
#warning NO NLOpt, and NO Libcmaes: the acquisition function will be optimized by a grid search algorithm (which is usually bad). Please install at least NLOpt or libcmaes to use limbo!.
typedef
opt
::
GridSearch
<
Params
>
acquiopt_t
;
...
...
src/limbo/opt.hpp
View file @
6e0dae51
#ifndef LIMBO_OPT_HPP
#define LIMBO_OPT_HPP
#ifdef USE_LIBCMAES
#include
<limbo/opt/cmaes.hpp>
#endif
#include
<limbo/opt/grid_search.hpp>
#ifdef USE_NLOPT
#include
<limbo/opt/nlopt_grad.hpp>
...
...
src/tests/wscript
View file @
6e0dae51
...
...
@@ -15,13 +15,13 @@ def build(bld):
source
=
'test_gp.cpp'
,
includes
=
'. .. ../../'
,
target
=
'test_gp'
,
uselib
=
'BOOST EIGEN TBB
LIBCMAES
'
,
uselib
=
'BOOST EIGEN TBB'
,
use
=
'limbo'
)
bld
.
program
(
features
=
'cxx test'
,
source
=
'test_init_functions.cpp'
,
includes
=
'. .. ../../'
,
target
=
'test_init_functions'
,
uselib
=
'BOOST EIGEN TBB
LIBCMAES
'
,
uselib
=
'BOOST EIGEN TBB'
,
use
=
'limbo'
)
bld
.
program
(
features
=
'cxx test'
,
source
=
'test_optimizers.cpp'
,
...
...
@@ -33,22 +33,22 @@ def build(bld):
source
=
'test_macros.cpp'
,
includes
=
'. .. ../../'
,
target
=
'test_macros'
,
uselib
=
'BOOST EIGEN TBB
LIBCMAES
'
,
uselib
=
'BOOST EIGEN TBB'
,
use
=
'limbo'
)
bld
.
program
(
features
=
'cxx'
,
source
=
'boptimizer.cpp'
,
includes
=
'. .. ../../'
,
target
=
'boptimizer'
,
uselib
=
'BOOST EIGEN TBB
SFERES
LIBCMAES'
,
uselib
=
'BOOST EIGEN TBB LIBCMAES'
,
use
=
'limbo'
)
if
bld
.
env
.
DEFINES_NLOPT
:
bld
.
program
(
features
=
'cxx test'
,
source
=
'test_nlopt.cpp'
,
includes
=
'. .. ../../'
,
target
=
'test_nlopt'
,
uselib
=
'BOOST EIGEN TBB NLOPT
LIBCMAES
'
,
uselib
=
'BOOST EIGEN TBB NLOPT'
,
use
=
'limbo'
)
if
bld
.
env
.
DEFINES_
NLOPT
:
if
bld
.
env
.
DEFINES_
LIBCMAES
:
bld
.
program
(
features
=
'cxx test'
,
source
=
'test_cmaes.cpp'
,
includes
=
'. .. ../../'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment