From 18bf35609ce2c6f8b9cdacd5edc93d79d214a54b Mon Sep 17 00:00:00 2001 From: Ruben Martinez-Cantin Date: Tue, 7 Oct 2014 18:35:35 +0200 Subject: [PATCH] Fixing minor bugs and typos --- README.md | 9 +++++---- matplotpp/matplotpp.cc | 8 ++++---- matplotpp/matplotpp.h | 14 +++++++++----- src/bayesoptbase.cpp | 1 + utils/lhs.hpp | 6 +----- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9473a8f..898bbab 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,8 @@ The library can be download from any of this sources: - Mirror: The install guide and documentation for Windows, Linux and MacOS: -- [Online install guide](http://rmcantin.bitbucket.org/html/install.html) or [Local install guide](@ref install) +- [Online install guide](http://rmcantin.bitbucket.org/html/install.html) + or [Local install guide](@ref install) Getting involved @@ -53,9 +54,9 @@ please consider these recomentations when using BayesOpt: publication, we would appreciate it if you would kindly cite BayesOpt in your manuscript. Cite BayesOpt as: -> Ruben Martinez-Cantin, **BayesOpt: A Bayesian Optimization Library for Nonlinear -> Optimization, Experimental Design and Bandits**, -> +> Ruben Martinez-Cantin, **BayesOpt: A Bayesian Optimization +> Library for Nonlinear Optimization, Experimental Design and +> Bandits**. Journal of Machine Learning Research, 2014 - In addition, if you use a specific algorithm (REMBO, GP-Hedge, etc.), please also cite the corresponding work. The reference for each diff --git a/matplotpp/matplotpp.cc b/matplotpp/matplotpp.cc index 48da8e1..bc675fb 100644 --- a/matplotpp/matplotpp.cc +++ b/matplotpp/matplotpp.cc @@ -12,10 +12,10 @@ using namespace std; #include "matplotpp.h" #if defined(_WIN32) || defined(_WIN64) -#define fmax max -#define fmin min -#pragma warning (disable:4996) -#define snprintf sprintf_s +# define fmax max +# define fmin min +# pragma warning (disable:4996) +# define snprintf sprintf_s #endif /// Figure diff --git a/matplotpp/matplotpp.h b/matplotpp/matplotpp.h index 7785701..4c3cb8d 100644 --- a/matplotpp/matplotpp.h +++ b/matplotpp/matplotpp.h @@ -10,12 +10,16 @@ Modified: Ruben Martinez-Cantin (2013) - Fixed bugs ****************************************************************************/ +//FreeGLUT does not need this. But Nate's GLUT for Windows does. +#if defined(_WIN32) || defined(_WIN64) +# include +#endif + +//Using default GLUT in Mac OS #ifdef __APPLE__ -//#include //OS x libs -//#include -#include +# include #else -#include +# include #endif #include @@ -24,7 +28,7 @@ Modified: Ruben Martinez-Cantin (2013) #include #include #include -#include +#include #include "gl2ps.h" #define PI 3.14159265358979323846264 diff --git a/src/bayesoptbase.cpp b/src/bayesoptbase.cpp index 339d892..902a7f8 100644 --- a/src/bayesoptbase.cpp +++ b/src/bayesoptbase.cpp @@ -20,6 +20,7 @@ ------------------------------------------------------------------------ */ +#include #include "bayesoptbase.hpp" #include "log.hpp" diff --git a/utils/lhs.hpp b/utils/lhs.hpp index d66ccb2..ca1f14e 100644 --- a/utils/lhs.hpp +++ b/utils/lhs.hpp @@ -127,15 +127,11 @@ namespace bayesopt randEngine& mtRandom) { randFloat sample( mtRandom, realUniformDist(0,1) ); - // sample.engine().seed(std::time(0)); - // std::cout << &mtRandom; - // mtRandom.seed(std::time(0)); - // sample.distribution().reset(); size_t nA = Result.size1(); size_t nB = Result.size2(); - // std::generate(Result.begin2(),Result.end2(),sample); // TODO: Improve with iterators + // std::generate(Result.begin2(),Result.end2(),sample); for (size_t i = 0; i < nA; i++) for (size_t j = 0; j < nB; j++) Result(i,j) = sample();