|
|
@@ -11,14 +11,26 @@
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
+#include <boost/version.hpp>
|
|
|
#include <boost/random/mersenne_twister.hpp>
|
|
|
+
|
|
|
+#if BOOST_VERSION >= 104700
|
|
|
#include <boost/random/uniform_int_distribution.hpp>
|
|
|
#include <boost/random/uniform_real_distribution.hpp>
|
|
|
+#else
|
|
|
+#include <boost/random/uniform_int.hpp>
|
|
|
+#include <boost/random/uniform_real.hpp>
|
|
|
+#endif
|
|
|
#include <boost/random/variate_generator.hpp>
|
|
|
|
|
|
typedef boost::mt19937 TGenerator;
|
|
|
+#if BOOST_VERSION >= 104700
|
|
|
typedef boost::random::uniform_int_distribution<int> TIntDist;
|
|
|
typedef boost::random::uniform_real_distribution<double> TRealDist;
|
|
|
+#else
|
|
|
+typedef boost::uniform_int<int> TIntDist;
|
|
|
+typedef boost::uniform_real<double> TRealDist;
|
|
|
+#endif
|
|
|
typedef boost::variate_generator<TGenerator &, TIntDist> TRandI;
|
|
|
typedef boost::variate_generator<TGenerator &, TRealDist> TRand;
|
|
|
|