Commit 7cfeffce authored by Federico Allocati's avatar Federico Allocati
Browse files

Fixed basic example

parent 8f88c218
......@@ -48,29 +48,29 @@ To begin, the ``main`` file has to include the necessary files, and declare the
using namespace limbo;
struct Params {
struct boptimizer {
struct bayes_opt_boptimizer {
BO_PARAM(double, noise, 0.0);
BO_PARAM(int, dump_period, -1);
};
struct init {
BO_PARAM(int, nb_samples, 10);
struct bayes_opt_bobase {
BO_PARAM(int, stats_enabled, false);
};
struct maxiterations {
BO_PARAM(int, n_iterations, 40);
struct init_randomsampling {
BO_PARAM(int, nb_samples, 10);
};
struct gp_ucb : public defaults::gp_ucb {
struct stop_maxiterations {
BO_PARAM(int, n_iterations, 40);
};
struct cmaes : public defaults::cmaes {
struct opt_cmaes : public defaults::opt_cmaes {
};
struct rprop : public defaults::rprop {
struct opt_rprop : public defaults::opt_rprop {
};
struct parallel_repeater : public defaults::parallel_repeater {
struct opt_parallelrepeater : public defaults::opt_parallelrepeater {
};
};
......@@ -118,29 +118,29 @@ Full ``main.cpp``::
using namespace limbo;
struct Params {
struct boptimizer {
struct bayes_opt_boptimizer {
BO_PARAM(double, noise, 0.0);
BO_PARAM(int, dump_period, -1);
};
struct init {
BO_PARAM(int, nb_samples, 10);
struct bayes_opt_bobase {
BO_PARAM(int, stats_enabled, false);
};
struct maxiterations {
BO_PARAM(int, n_iterations, 40);
struct init_randomsampling {
BO_PARAM(int, nb_samples, 10);
};
struct gp_ucb : public defaults::gp_ucb {
struct stop_maxiterations {
BO_PARAM(int, n_iterations, 40);
};
struct cmaes : public defaults::cmaes {
struct opt_cmaes : public defaults::opt_cmaes {
};
struct rprop : public defaults::rprop {
struct opt_rprop : public defaults::opt_rprop {
};
struct parallel_repeater : public defaults::parallel_repeater {
struct opt_parallelrepeater : public defaults::opt_parallelrepeater {
};
};
......
......@@ -15,6 +15,8 @@ import subprocess
import limbo
from waflib.Build import BuildContext
import inspect
def options(opt):
opt.load('compiler_cxx boost waf_unit_test')
......@@ -34,7 +36,8 @@ def options(opt):
opt.add_option('--experimental', type='string', help='experimental should be compiled? (yes/no)', dest='experimental')
opt.load('xcode')
for i in glob.glob('exp/*'):
opt.recurse(i)
if os.path.isdir(i):
opt.recurse(i)
def configure(conf):
......@@ -70,6 +73,8 @@ def configure(conf):
conf.check_nlopt()
conf.check_libcmaes()
conf.env.INCLUDES_LIMBO = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + "/src"
if conf.env['CXXFLAGS_ODE']:
common_flags += ' ' + conf.env['CXXFLAGS_ODE']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment