Commit 858e0b09 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Ran clang-format on whole repo

parent 6fa5cf3c
......@@ -45,8 +45,8 @@
//|
#include <limbo/limbo.hpp>
#include <limbo/experimental/bayes_opt/cboptimizer.hpp>
#include <limbo/experimental/acqui/eci.hpp>
#include <limbo/experimental/bayes_opt/cboptimizer.hpp>
using namespace limbo;
......
......@@ -43,29 +43,29 @@
//| The fact that you are presently reading this means that you have had
//| knowledge of the CeCILL-C license and that you accept its terms.
//|
#include <cmath>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <iostream>
#include <vector>
#include <Eigen/Core>
#ifdef USE_TBB
#include <tbb/task_scheduler_init.h>
#include <tbb/parallel_for.h>
#include <tbb/concurrent_hash_map.h>
#include <tbb/parallel_for.h>
#include <tbb/task_scheduler_init.h>
#else
#include <map>
#endif
#include <limbo/tools/macros.hpp>
#include <limbo/experimental/bayes_opt/imgpo.hpp>
#include <limbo/experimental/acqui/ucb_imgpo.hpp>
#include <limbo/tools/parallel.hpp>
#include <limbo/mean/constant.hpp>
#include <limbo/experimental/bayes_opt/imgpo.hpp>
#include <limbo/init/no_init.hpp>
#include <limbo/mean/constant.hpp>
#include <limbo/tools/macros.hpp>
#include <limbo/tools/parallel.hpp>
using namespace limbo;
......@@ -332,7 +332,7 @@ int main(int argc, char** argv)
if (!is_in_argv(argc, argv, "--only") || is_in_argv(argc, argv, "sphere"))
tools::par::replicate(nb_replicates, [&]() {
// clang-format off
// clang-format off
Opt_t opt;
opt.optimize(Sphere());
Eigen::Vector2d s_val(0.5, 0.5);
......@@ -343,7 +343,7 @@ int main(int argc, char** argv)
if (!is_in_argv(argc, argv, "--only") || is_in_argv(argc, argv, "ellipsoid"))
tools::par::replicate(nb_replicates, [&]() {
// clang-format off
// clang-format off
Opt_t opt;
opt.optimize(Ellipsoid());
Eigen::Vector2d s_val(0.5, 0.5);
......@@ -354,7 +354,7 @@ int main(int argc, char** argv)
if (!is_in_argv(argc, argv, "--only") || is_in_argv(argc, argv, "rastrigin"))
tools::par::replicate(nb_replicates, [&]() {
// clang-format off
// clang-format off
Opt_t opt;
opt.optimize(Rastrigin());
Eigen::Vector4d s_val(0, 0, 0, 0);
......@@ -365,7 +365,7 @@ int main(int argc, char** argv)
if (!is_in_argv(argc, argv, "--only") || is_in_argv(argc, argv, "hartman3"))
tools::par::replicate(nb_replicates, [&]() {
// clang-format off
// clang-format off
Opt_t opt;
opt.optimize(Hartman3());
// double s_max = 3.86278;
......@@ -377,7 +377,7 @@ int main(int argc, char** argv)
if (!is_in_argv(argc, argv, "--only") || is_in_argv(argc, argv, "hartman6"))
tools::par::replicate(nb_replicates, [&]() {
// clang-format off
// clang-format off
Opt_t opt;
opt.optimize(Hartman6());
Eigen::Matrix<double, 6, 1> s_val;
......@@ -390,7 +390,7 @@ int main(int argc, char** argv)
if (!is_in_argv(argc, argv, "--only") || is_in_argv(argc, argv, "golden_price"))
tools::par::replicate(nb_replicates, [&]() {
// clang-format off
// clang-format off
Opt_t opt;
opt.optimize(GoldenPrice());
// double s_max = -log(3);
......
......@@ -43,10 +43,10 @@
//| The fact that you are presently reading this means that you have had
//| knowledge of the CeCILL-C license and that you accept its terms.
//|
#include <limbo/limbo.hpp>
#include <limbo/experimental/bayes_opt/parego.hpp>
#include <limbo/experimental/stat/pareto_front.hpp>
#include <limbo/experimental/stat/hyper_volume.hpp>
#include <limbo/experimental/stat/pareto_front.hpp>
#include <limbo/limbo.hpp>
using namespace limbo;
......
......@@ -43,12 +43,12 @@
//| The fact that you are presently reading this means that you have had
//| knowledge of the CeCILL-C license and that you accept its terms.
//|
#include <limbo/tools/macros.hpp>
#include <limbo/bayes_opt/boptimizer.hpp>
#include <limbo/kernel/squared_exp_ard.hpp>
#include <limbo/mean/function_ard.hpp>
#include <limbo/model/gp.hpp>
#include <limbo/model/gp/kernel_mean_lf_opt.hpp>
#include <limbo/bayes_opt/boptimizer.hpp>
#include <limbo/tools/macros.hpp>
using namespace limbo;
......
......@@ -49,8 +49,8 @@
///@defgroup acqui
///@defgroup acqui_defaults
#include <limbo/acqui/ucb.hpp>
#include <limbo/acqui/gp_ucb.hpp>
#include <limbo/acqui/ei.hpp>
#include <limbo/acqui/gp_ucb.hpp>
#include <limbo/acqui/ucb.hpp>
#endif
......@@ -46,12 +46,12 @@
#ifndef LIMBO_ACQUI_EI_HPP
#define LIMBO_ACQUI_EI_HPP
#include <Eigen/Core>
#include <cmath>
#include <vector>
#include <Eigen/Core>
#include <limbo/tools/macros.hpp>
#include <limbo/opt/optimizer.hpp>
#include <limbo/tools/macros.hpp>
namespace limbo {
namespace defaults {
......
......@@ -48,8 +48,8 @@
#include <Eigen/Core>
#include <limbo/tools/macros.hpp>
#include <limbo/opt/optimizer.hpp>
#include <limbo/tools/macros.hpp>
namespace limbo {
namespace defaults {
......
......@@ -48,8 +48,8 @@
#include <Eigen/Core>
#include <limbo/tools/macros.hpp>
#include <limbo/opt/optimizer.hpp>
#include <limbo/tools/macros.hpp>
namespace limbo {
namespace defaults {
......
......@@ -46,9 +46,9 @@
#ifndef LIMBO_ACQUI_ECI_HPP
#define LIMBO_ACQUI_ECI_HPP
#include <Eigen/Core>
#include <cmath>
#include <vector>
#include <Eigen/Core>
#include <limbo/tools/macros.hpp>
......
......@@ -59,13 +59,13 @@
#endif
// Quick hack for definition of 'I' in <complex.h>
#undef I
#include <sferes/phen/parameters.hpp>
#include <sferes/gen/evo_float.hpp>
#include <sferes/phen/parameters.hpp>
#ifdef USE_TBB
#include <sferes/eval/parallel.hpp>
#endif
#include <sferes/modif/dummy.hpp>
#include <sferes/ea/nsga2.hpp>
#include <sferes/modif/dummy.hpp>
#endif
namespace limbo {
......
......@@ -46,17 +46,17 @@
#ifndef LIMBO_BAYES_OPT_CBOPTIMIZER_HPP
#define LIMBO_BAYES_OPT_CBOPTIMIZER_HPP
#include <iostream>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <boost/parameter/aux_/void.hpp>
#include <Eigen/Core>
#include <limbo/bayes_opt/bo_base.hpp>
#include <limbo/tools/macros.hpp>
#include <limbo/tools/random_generator.hpp>
#include <limbo/bayes_opt/bo_base.hpp>
#ifdef USE_NLOPT
#include <limbo/opt/nlopt_no_grad.hpp>
#elif defined USE_LIBCMAES
......@@ -171,7 +171,7 @@ namespace limbo {
acquisition_function_t acqui(_model, _constraint_model, this->_current_iteration);
auto acqui_optimization =
[&](const Eigen::VectorXd& x, bool g) { return acqui(x,afun,g); };
[&](const Eigen::VectorXd& x, bool g) { return acqui(x, afun, g); };
Eigen::VectorXd starting_point = tools::random_vector(StateFunction::dim_in(), Params::bayes_opt_cboptimizer::bounded());
Eigen::VectorXd new_sample = acqui_optimizer(acqui_optimization, starting_point, Params::bayes_opt_cboptimizer::bounded());
this->eval_and_add(sfun, new_sample);
......
......@@ -53,8 +53,8 @@
#include <limbo/tools/macros.hpp>
#include <limbo/experimental/bayes_opt/bo_multi.hpp>
#include <limbo/experimental/acqui/ehvi.hpp>
#include <limbo/experimental/bayes_opt/bo_multi.hpp>
namespace limbo {
namespace defaults {
......
......@@ -46,18 +46,18 @@
#ifndef LIMBO_BAYES_OPT_IMGPO_HPP
#define LIMBO_BAYES_OPT_IMGPO_HPP
#include <iostream>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <iostream>
#include <iterator>
#include <boost/parameter/aux_/void.hpp>
#include <Eigen/Core>
#include <limbo/bayes_opt/bo_base.hpp>
#include <limbo/tools/macros.hpp>
#include <limbo/tools/random_generator.hpp>
#include <limbo/bayes_opt/bo_base.hpp>
namespace limbo {
namespace defaults {
......
......@@ -48,10 +48,10 @@
#include <algorithm>
#include <limbo/tools/macros.hpp>
#include <limbo/experimental/model/gp_parego.hpp>
#include <limbo/bayes_opt/bo_base.hpp>
#include <limbo/bayes_opt/boptimizer.hpp>
#include <limbo/experimental/model/gp_parego.hpp>
#include <limbo/tools/macros.hpp>
namespace limbo {
namespace experimental {
......
......@@ -46,14 +46,14 @@
#ifndef LIMBO_MODEL_GP_PAREGO_HPP
#define LIMBO_MODEL_GP_PAREGO_HPP
#include <iostream>
#include <cassert>
#include <iostream>
#include <limits>
#include <vector>
#include <Eigen/Cholesky>
#include <Eigen/Core>
#include <Eigen/LU>
#include <Eigen/Cholesky>
#include <limbo/model/gp/no_lf_opt.hpp>
......
......@@ -44,7 +44,6 @@
//| knowledge of the CeCILL-C license and that you accept its terms.
//|
#ifndef LIMBO_MODEL_SPGP_HPP
#define LIMBO_MODEL_SPGP_HPP
......
......@@ -46,9 +46,9 @@
#ifndef LIMBO_STAT_HYPER_VOLUME_HPP
#define LIMBO_STAT_HYPER_VOLUME_HPP
#include <limbo/stat/stat_base.hpp>
#include <limbo/experimental/tools/pareto.hpp>
#include <hv/hypervol.h>
#include <limbo/experimental/tools/pareto.hpp>
#include <limbo/stat/stat_base.hpp>
namespace limbo {
namespace experimental {
......@@ -69,7 +69,7 @@ namespace limbo {
if (!bo.stats_enabled())
return;
// convert the data to C arrays
double** data = new double* [bo.observations().size()];
double** data = new double*[bo.observations().size()];
for (size_t i = 0; i < bo.observations().size(); ++i) {
size_t dim = bo.observations()[i].size();
data[i] = new double[dim];
......
......@@ -46,8 +46,8 @@
#ifndef LIMBO_STAT_PARETO_FRONT_HPP
#define LIMBO_STAT_PARETO_FRONT_HPP
#include <limbo/stat/stat_base.hpp>
#include <limbo/experimental/tools/pareto.hpp>
#include <limbo/stat/stat_base.hpp>
namespace limbo {
namespace experimental {
......@@ -90,7 +90,7 @@ namespace limbo {
assert(sigma.size() == objs.size());
pareto_t p(points.size());
tools::par::loop(0, p.size(), [&](size_t k) {
// clang-format off
// clang-format off
p[k] = std::make_tuple(points[k], objs[k], sigma[k]);
// clang-format on
});
......
......@@ -49,8 +49,8 @@
///@defgroup kernel
///@defgroup kernel_defaults
#include <limbo/kernel/kernel.hpp>
#include <limbo/kernel/exp.hpp>
#include <limbo/kernel/kernel.hpp>
#include <limbo/kernel/matern_five_halves.hpp>
#include <limbo/kernel/matern_three_halves.hpp>
#include <limbo/kernel/squared_exp_ard.hpp>
......
......@@ -49,10 +49,10 @@
///@defgroup mean
///@defgroup mean_defaults
#include <limbo/mean/mean.hpp>
#include <limbo/mean/constant.hpp>
#include <limbo/mean/data.hpp>
#include <limbo/mean/function_ard.hpp>
#include <limbo/mean/mean.hpp>
#include <limbo/mean/null_function.hpp>
#endif
Markdown is supported
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