BayesOpt
randgen.hpp
Go to the documentation of this file.
1 
3 /*
4 -------------------------------------------------------------------------
5  This file is part of BayesOpt, an efficient C++ library for
6  Bayesian optimization.
7 
8  Copyright (C) 2011-2015 Ruben Martinez-Cantin <rmcantin@unizar.es>
9 
10  BayesOpt is free software: you can redistribute it and/or modify it
11  under the terms of the GNU Affero General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  BayesOpt is distributed in the hope that it will be useful, but
16  WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Affero General Public License for more details.
19 
20  You should have received a copy of the GNU Affero General Public License
21  along with BayesOpt. If not, see <http://www.gnu.org/licenses/>.
22 ------------------------------------------------------------------------
23 */
24 
25 #ifndef _RANDGEN_HPP_
26 #define _RANDGEN_HPP_
27 
28 //#include <boost/version.hpp>
29 #include <boost/random.hpp>
30 
31 // Types for pseudorandom number generators.
32 
33 typedef boost::mt19937 randEngine;
34 
35 typedef boost::uniform_real<> realUniformDist;
36 typedef boost::uniform_int<> intUniformDist;
37 typedef boost::normal_distribution<> normalDist;
38 typedef boost::gamma_distribution<> gammaDist;
39 
40 typedef boost::variate_generator<randEngine&, intUniformDist> randInt;
41 typedef boost::variate_generator<randEngine&, normalDist> randNFloat;
42 typedef boost::variate_generator<randEngine&, gammaDist> randGFloat;
43 typedef boost::variate_generator<randEngine&, realUniformDist> randFloat;
44 
45 #endif