diff --git a/extra/haertel.hpp b/extra/haertel.hpp index c318d805b..ff346f871 100644 --- a/extra/haertel.hpp +++ b/extra/haertel.hpp @@ -18,7 +18,7 @@ #ifndef BOOST_RANDOM_HAERTEL_HPP #define BOOST_RANDOM_HAERTEL_HPP -#include +#include #include #include @@ -127,29 +127,29 @@ class lagged_fibonacci_int // distributions from Haertel's dissertation // (additional parameterizations of the basic templates) namespace Haertel { - typedef boost::random::linear_congruential LCG_Af2; - typedef boost::random::linear_congruential LCG_Die1; - typedef boost::random::linear_congruential LCG_Af2; + typedef boost::random::linear_congruential LCG_Die1; + typedef boost::random::linear_congruential LCG_Fis; - typedef boost::random::linear_congruential LCG_FM; - typedef boost::random::linear_congruential LCG_FM; + typedef boost::random::linear_congruential LCG_Hae; - typedef boost::random::linear_congruential LCG_VAX; - typedef boost::random::inversive_congruential NLG_Inv1; - typedef boost::random::inversive_congruential NLG_Inv2; - typedef boost::random::inversive_congruential NLG_Inv4; - typedef boost::random::inversive_congruential NLG_Inv5; - typedef boost::random::additive_congruential MRG_Acorn7; - typedef boost::random::lagged_fibonacci_int MRG_Fib2; } // namespace Haertel diff --git a/include/boost/random/additive_combine.hpp b/include/boost/random/additive_combine.hpp index ba045aded..94c2b489f 100644 --- a/include/boost/random/additive_combine.hpp +++ b/include/boost/random/additive_combine.hpp @@ -16,11 +16,11 @@ #ifndef BOOST_RANDOM_ADDITIVE_COMBINE_HPP #define BOOST_RANDOM_ADDITIVE_COMBINE_HPP +#include #include #include #include // for std::min and std::max #include -#include #include #include #include @@ -196,7 +196,7 @@ class additive_combine_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { _mlcg1.discard(z); _mlcg2.discard(z); diff --git a/include/boost/random/binomial_distribution.hpp b/include/boost/random/binomial_distribution.hpp index a98d53b51..53b0b57d8 100644 --- a/include/boost/random/binomial_distribution.hpp +++ b/include/boost/random/binomial_distribution.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/include/boost/random/cauchy_distribution.hpp b/include/boost/random/cauchy_distribution.hpp index 998e52344..864bdf3a7 100644 --- a/include/boost/random/cauchy_distribution.hpp +++ b/include/boost/random/cauchy_distribution.hpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/random/chi_squared_distribution.hpp b/include/boost/random/chi_squared_distribution.hpp index f0fcce5c5..198b3d0be 100644 --- a/include/boost/random/chi_squared_distribution.hpp +++ b/include/boost/random/chi_squared_distribution.hpp @@ -14,7 +14,7 @@ #define BOOST_RANDOM_CHI_SQUARED_DISTRIBUTION_HPP_INCLUDED #include -#include +#include #include #include diff --git a/include/boost/random/detail/const_mod.hpp b/include/boost/random/detail/const_mod.hpp index e0a43ab24..557d56596 100644 --- a/include/boost/random/detail/const_mod.hpp +++ b/include/boost/random/detail/const_mod.hpp @@ -16,6 +16,8 @@ #ifndef BOOST_RANDOM_CONST_MOD_HPP #define BOOST_RANDOM_CONST_MOD_HPP +#include +#include #include #include #include @@ -84,7 +86,7 @@ class const_mod return add(mult(a, x), c); } - static IntType pow(IntType a, boost::uintmax_t exponent) + static IntType pow(IntType a, std::uintmax_t exponent) { IntType result = 1; while(exponent != 0) { @@ -129,10 +131,10 @@ class const_mod BOOST_ASSERT(suppress_warnings == 0); IntType modulus = m + suppress_warnings; BOOST_ASSERT(modulus == m); - if(::boost::uintmax_t(modulus) <= - (::std::numeric_limits< ::boost::uintmax_t>::max)() / modulus) + if(std::uintmax_t(modulus) <= + (std::numeric_limits< std::uintmax_t>::max)() / modulus) { - return static_cast(boost::uintmax_t(a) * b % modulus); + return static_cast(std::uintmax_t(a) * b % modulus); } else { return static_cast(detail::mulmod(a, b, modulus)); } diff --git a/include/boost/random/detail/generator_bits.hpp b/include/boost/random/detail/generator_bits.hpp index 05276142c..4846ff255 100644 --- a/include/boost/random/detail/generator_bits.hpp +++ b/include/boost/random/detail/generator_bits.hpp @@ -14,7 +14,7 @@ #ifndef BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP #define BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP -#include +#include namespace boost { namespace random { diff --git a/include/boost/random/detail/gray_coded_qrng.hpp b/include/boost/random/detail/gray_coded_qrng.hpp index 1c0ccbf39..fdd42c367 100644 --- a/include/boost/random/detail/gray_coded_qrng.hpp +++ b/include/boost/random/detail/gray_coded_qrng.hpp @@ -13,6 +13,7 @@ #include // lsb #include +#include #include #include // bit_xor diff --git a/include/boost/random/detail/int_float_pair.hpp b/include/boost/random/detail/int_float_pair.hpp index 7ec2e2612..4f1f5105e 100644 --- a/include/boost/random/detail/int_float_pair.hpp +++ b/include/boost/random/detail/int_float_pair.hpp @@ -15,6 +15,7 @@ #ifndef BOOST_RANDOM_DETAIL_INT_FLOAT_PAIR_HPP #define BOOST_RANDOM_DETAIL_INT_FLOAT_PAIR_HPP +#include #include #include #include diff --git a/include/boost/random/detail/integer_log2.hpp b/include/boost/random/detail/integer_log2.hpp index 2e49f281f..dfb8ae131 100644 --- a/include/boost/random/detail/integer_log2.hpp +++ b/include/boost/random/detail/integer_log2.hpp @@ -14,8 +14,8 @@ #ifndef BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP #define BOOST_RANDOM_DETAIL_INTEGER_LOG2_HPP +#include #include -#include #include namespace boost { @@ -72,7 +72,7 @@ BOOST_RANDOM_DETAIL_CONSTEXPR int integer_log2(T t) { return integer_log2_impl< ::boost::detail::max_pow2_less< - ::std::numeric_limits::digits, 4 + std::numeric_limits::digits, 4 >::value >::apply(t, 0); } diff --git a/include/boost/random/detail/large_arithmetic.hpp b/include/boost/random/detail/large_arithmetic.hpp index 66f6b4e61..cfdc280b0 100644 --- a/include/boost/random/detail/large_arithmetic.hpp +++ b/include/boost/random/detail/large_arithmetic.hpp @@ -13,9 +13,9 @@ #ifndef BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP #define BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP -#include +#include +#include #include -#include #include #include @@ -25,18 +25,18 @@ namespace random { namespace detail { struct div_t { - boost::uintmax_t quotient; - boost::uintmax_t remainder; + std::uintmax_t quotient; + std::uintmax_t remainder; }; -inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) +inline div_t muldivmod(std::uintmax_t a, std::uintmax_t b, std::uintmax_t m) { const int bits = - ::std::numeric_limits< ::boost::uintmax_t>::digits / 2; - const ::boost::uintmax_t mask = (::boost::uintmax_t(1) << bits) - 1; + std::numeric_limits< std::uintmax_t>::digits / 2; + const std::uintmax_t mask = (std::uintmax_t(1) << bits) - 1; typedef ::boost::uint_t::fast digit_t; - int shift = std::numeric_limits< ::boost::uintmax_t>::digits - 1 + int shift = std::numeric_limits< std::uintmax_t>::digits - 1 - detail::integer_log2(m); a <<= shift; @@ -51,7 +51,7 @@ inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t for(int i = 0; i < 2; ++i) { digit_t carry = 0; for(int j = 0; j < 2; ++j) { - ::boost::uint64_t temp = ::boost::uintmax_t(a_[i]) * b_[j] + + std::uint64_t temp = std::uintmax_t(a_[i]) * b_[j] + carry + product[i + j]; product[i + j] = digit_t(temp & mask); carry = digit_t(temp >> bits); @@ -65,23 +65,23 @@ inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t if(m == 0) { div_t result = { - ((::boost::uintmax_t(product[3]) << bits) | product[2]), - ((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift, + ((std::uintmax_t(product[3]) << bits) | product[2]), + ((std::uintmax_t(product[1]) << bits) | product[0]) >> shift, }; return result; } // divide product / m for(int i = 3; i >= 2; --i) { - ::boost::uintmax_t temp = - ::boost::uintmax_t(product[i]) << bits | product[i - 1]; + std::uintmax_t temp = + std::uintmax_t(product[i]) << bits | product[i - 1]; digit_t q = digit_t((product[i] == m_[1]) ? mask : temp / m_[1]); - ::boost::uintmax_t rem = - ((temp - ::boost::uintmax_t(q) * m_[1]) << bits) + product[i - 2]; + std::uintmax_t rem = + ((temp - std::uintmax_t(q) * m_[1]) << bits) + product[i - 2]; - ::boost::uintmax_t diff = m_[0] * ::boost::uintmax_t(q); + std::uintmax_t diff = m_[0] * std::uintmax_t(q); int error = 0; if(diff > rem) { @@ -101,16 +101,16 @@ inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t } div_t result = { - ((::boost::uintmax_t(quotient[1]) << bits) | quotient[0]), - ((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift, + ((std::uintmax_t(quotient[1]) << bits) | quotient[0]), + ((std::uintmax_t(product[1]) << bits) | product[0]) >> shift, }; return result; } -inline boost::uintmax_t muldiv(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) +inline std::uintmax_t muldiv(std::uintmax_t a, std::uintmax_t b, std::uintmax_t m) { return detail::muldivmod(a, b, m).quotient; } -inline boost::uintmax_t mulmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) +inline std::uintmax_t mulmod(std::uintmax_t a, std::uintmax_t b, std::uintmax_t m) { return detail::muldivmod(a, b, m).remainder; } } // namespace detail diff --git a/include/boost/random/detail/polynomial.hpp b/include/boost/random/detail/polynomial.hpp index a8c4b269f..299d64abe 100644 --- a/include/boost/random/detail/polynomial.hpp +++ b/include/boost/random/detail/polynomial.hpp @@ -13,12 +13,12 @@ #ifndef BOOST_RANDOM_DETAIL_POLYNOMIAL_HPP #define BOOST_RANDOM_DETAIL_POLYNOMIAL_HPP +#include #include #include #include #include #include -#include namespace boost { namespace random { @@ -246,7 +246,7 @@ class polynomial_ops { // base should have the same number of bits as mod // base, and mod should both be able to hold a power // of 2 >= mod_bits. out needs to be twice as large. - static void mod_pow_x(boost::uintmax_t exponent, const digit_t * mod, std::size_t mod_bits, digit_t * out) + static void mod_pow_x(std::uintmax_t exponent, const digit_t * mod, std::size_t mod_bits, digit_t * out) { const std::size_t bits = std::numeric_limits::digits; const std::size_t n = (mod_bits + bits - 1) / bits; @@ -256,8 +256,8 @@ class polynomial_ops { std::fill_n(out + 1, n - 1, digit_t(0)); return; } - boost::uintmax_t i = std::numeric_limits::digits - 1; - while(((boost::uintmax_t(1) << i) & exponent) == 0) { + std::uintmax_t i = std::numeric_limits::digits - 1; + while(((std::uintmax_t(1) << i) & exponent) == 0) { --i; } out[0] = 2; @@ -266,7 +266,7 @@ class polynomial_ops { while(i--) { sqr(out, n); m(out, 2 * mod_bits - 1); - if((boost::uintmax_t(1) << i) & exponent) { + if((std::uintmax_t(1) << i) & exponent) { shift_left(out, n, 1); if(out[highbit / bits] & (digit_t(1) << highbit%bits)) add(n, out, mod, out); @@ -337,7 +337,7 @@ class polynomial _size = n; } friend polynomial operator*(const polynomial &lhs, const polynomial &rhs); - friend polynomial mod_pow_x(boost::uintmax_t exponent, polynomial mod); + friend polynomial mod_pow_x(std::uintmax_t exponent, polynomial mod); private: std::vector _storage; std::size_t _size; @@ -365,7 +365,7 @@ inline polynomial operator*(const polynomial &lhs, const polynomial &rhs) return result; } -inline polynomial mod_pow_x(boost::uintmax_t exponent, polynomial mod) +inline polynomial mod_pow_x(std::uintmax_t exponent, polynomial mod) { polynomial result; mod.normalize(); diff --git a/include/boost/random/detail/qrng_base.hpp b/include/boost/random/detail/qrng_base.hpp index 5eeacfb78..ffb03d4fb 100644 --- a/include/boost/random/detail/qrng_base.hpp +++ b/include/boost/random/detail/qrng_base.hpp @@ -9,6 +9,7 @@ #ifndef BOOST_RANDOM_DETAIL_QRNG_BASE_HPP #define BOOST_RANDOM_DETAIL_QRNG_BASE_HPP +#include #include #include #include @@ -17,7 +18,6 @@ #include #include -#include #include #include @@ -100,7 +100,7 @@ class qrng_base //!X::operator() invocations were executed. //! //!Throws: range_error. - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { const std::size_t dimension_value = dimension(); @@ -108,7 +108,7 @@ class qrng_base // statements. In fact, gcc does this even at -O1, so don't // be tempted to "optimize" % via subtraction and multiplication. - boost::uintmax_t vec_n = z / dimension_value; + std::uintmax_t vec_n = z / dimension_value; std::size_t carry = curr_elem + (z % dimension_value); vec_n += carry / dimension_value; @@ -119,7 +119,7 @@ class qrng_base const bool corr = (!carry) & static_cast(vec_n); // Discards vec_n (with correction) consecutive s-dimensional vectors - discard_vector(vec_n - static_cast(corr)); + discard_vector(vec_n - static_cast(corr)); #ifdef BOOST_MSVC #pragma warning(push) @@ -149,7 +149,7 @@ class qrng_base { std::size_t dim; size_type seed; - boost::uintmax_t z; + std::uintmax_t z; if (is >> dim >> std::ws >> seed >> std::ws >> z) // initialize iff success! { // Check seed sign before resizing the lattice and/or recomputing state @@ -234,9 +234,9 @@ class qrng_base // Discards z consecutive s-dimensional vectors, // and preserves the position of the element-to-read - void discard_vector(boost::uintmax_t z) + void discard_vector(std::uintmax_t z) { - const boost::uintmax_t max_z = (std::numeric_limits::max)() - seq_count; + const std::uintmax_t max_z = (std::numeric_limits::max)() - seq_count; // Don't allow seq_count + z overflows here if (max_z < z) diff --git a/include/boost/random/detail/seed_impl.hpp b/include/boost/random/detail/seed_impl.hpp index 5e79582a2..e4c2ba43d 100644 --- a/include/boost/random/detail/seed_impl.hpp +++ b/include/boost/random/detail/seed_impl.hpp @@ -13,8 +13,9 @@ #ifndef BOOST_RANDOM_DETAIL_SEED_IMPL_HPP #define BOOST_RANDOM_DETAIL_SEED_IMPL_HPP +#include +#include #include -#include #include #include #include @@ -42,7 +43,7 @@ struct seed_type { typedef typename boost::conditional::value, T, - boost::uint32_t + std::uint32_t >::type type; }; @@ -88,7 +89,7 @@ void generate_from_real(Engine& eng, Iter begin, Iter end) typedef typename Engine::result_type RealType; const int Bits = detail::generator_bits::value(); int remaining_bits = 0; - boost::uint_least32_t saved_bits = 0; + std::uint_least32_t saved_bits = 0; RealType multiplier = pow2( Bits); RealType mult32 = RealType(4294967296.0); // 2^32 while(true) { @@ -97,16 +98,16 @@ void generate_from_real(Engine& eng, Iter begin, Iter end) // Make sure the compiler can optimize this out // if it isn't possible. if(Bits < 32 && available_bits < 32 - remaining_bits) { - saved_bits |= boost::uint_least32_t(val) << remaining_bits; + saved_bits |= std::uint_least32_t(val) << remaining_bits; remaining_bits += Bits; } else { // If Bits < 32, then remaining_bits != 0, since // if remaining_bits == 0, available_bits < 32 - 0, // and we won't get here to begin with. if(Bits < 32 || remaining_bits != 0) { - boost::uint_least32_t divisor = - (boost::uint_least32_t(1) << (32 - remaining_bits)); - boost::uint_least32_t extra_bits = boost::uint_least32_t(fmod(val, mult32)) & (divisor - 1); + std::uint_least32_t divisor = + (std::uint_least32_t(1) << (32 - remaining_bits)); + std::uint_least32_t extra_bits = std::uint_least32_t(fmod(val, mult32)) & (divisor - 1); val = val / divisor; *begin++ = saved_bits | (extra_bits << remaining_bits); if(begin == end) return; @@ -116,14 +117,14 @@ void generate_from_real(Engine& eng, Iter begin, Iter end) // If Bits < 32 we should never enter this loop if(Bits >= 32) { for(; available_bits >= 32; available_bits -= 32) { - boost::uint_least32_t word = boost::uint_least32_t(fmod(val, mult32)); + std::uint_least32_t word = std::uint_least32_t(fmod(val, mult32)); val /= mult32; *begin++ = word; if(begin == end) return; } } remaining_bits = available_bits; - saved_bits = static_cast(val); + saved_bits = static_cast(val); } } } @@ -134,7 +135,7 @@ void generate_from_int(Engine& eng, Iter begin, Iter end) typedef typename Engine::result_type IntType; typedef typename boost::random::traits::make_unsigned::type unsigned_type; int remaining_bits = 0; - boost::uint_least32_t saved_bits = 0; + std::uint_least32_t saved_bits = 0; unsigned_type range = boost::random::detail::subtract()((eng.max)(), (eng.min)()); int bits = @@ -162,11 +163,11 @@ void generate_from_int(Engine& eng, Iter begin, Iter end) val &= mask; int available_bits = bits; if(available_bits == 32) { - *begin++ = static_cast(val) & 0xFFFFFFFFu; + *begin++ = static_cast(val) & 0xFFFFFFFFu; if(begin == end) return; } else if(available_bits % 32 == 0) { for(int i = 0; i < available_bits / 32; ++i) { - boost::uint_least32_t word = boost::uint_least32_t(val) & 0xFFFFFFFFu; + std::uint_least32_t word = std::uint_least32_t(val) & 0xFFFFFFFFu; int suppress_warning = (bits >= 32); BOOST_ASSERT(suppress_warning == 1); val >>= (32 * suppress_warning); @@ -174,11 +175,11 @@ void generate_from_int(Engine& eng, Iter begin, Iter end) if(begin == end) return; } } else if(bits < 32 && available_bits < 32 - remaining_bits) { - saved_bits |= boost::uint_least32_t(val) << remaining_bits; + saved_bits |= std::uint_least32_t(val) << remaining_bits; remaining_bits += bits; } else { if(bits < 32 || remaining_bits != 0) { - boost::uint_least32_t extra_bits = boost::uint_least32_t(val) & ((boost::uint_least32_t(1) << (32 - remaining_bits)) - 1); + std::uint_least32_t extra_bits = std::uint_least32_t(val) & ((std::uint_least32_t(1) << (32 - remaining_bits)) - 1); val >>= 32 - remaining_bits; *begin++ = saved_bits | (extra_bits << remaining_bits); if(begin == end) return; @@ -187,7 +188,7 @@ void generate_from_int(Engine& eng, Iter begin, Iter end) } if(bits >= 32) { for(; available_bits >= 32; available_bits -= 32) { - boost::uint_least32_t word = boost::uint_least32_t(val) & 0xFFFFFFFFu; + std::uint_least32_t word = std::uint_least32_t(val) & 0xFFFFFFFFu; int suppress_warning = (bits >= 32); BOOST_ASSERT(suppress_warning == 1); val >>= (32 * suppress_warning); @@ -196,7 +197,7 @@ void generate_from_int(Engine& eng, Iter begin, Iter end) } } remaining_bits = available_bits; - saved_bits = static_cast(val); + saved_bits = static_cast(val); } } } @@ -225,11 +226,11 @@ template IntType seed_one_int(SeedSeq& seq) { static const int log = ::boost::conditional<(m == 0), - ::boost::integral_constant::digits)>, + std::integral_constant::digits)>, ::boost::static_log2 >::type::value; static const int k = (log + ((~(static_cast(2) << (log - 1)) & m)? 32 : 31)) / 32; - ::boost::uint_least32_t array[log / 32 + 4]; + std::uint_least32_t array[log / 32 + 4]; seq.generate(&array[0], &array[0] + k + 3); IntType s = 0; for(int j = 0; j < k; ++j) { @@ -244,14 +245,14 @@ template IntType get_one_int(Iter& first, Iter last) { static const int log = ::boost::conditional<(m == 0), - ::boost::integral_constant::digits)>, + std::integral_constant::digits)>, ::boost::static_log2 >::type::value; static const int k = (log + ((~(static_cast(2) << (log - 1)) & m)? 32 : 31)) / 32; IntType s = 0; for(int j = 0; j < k; ++j) { if(first == last) { - boost::throw_exception(::std::invalid_argument("Not enough elements in call to seed.")); + boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); } IntType digit = const_mod::apply(IntType(*first++)); IntType mult = IntType(1) << 32*j; @@ -264,7 +265,7 @@ IntType get_one_int(Iter& first, Iter last) template void seed_array_int_impl(SeedSeq& seq, UIntType (&x)[n]) { - boost::uint_least32_t storage[((w+31)/32) * n]; + std::uint_least32_t storage[((w+31)/32) * n]; seq.generate(&storage[0], &storage[0] + ((w+31)/32) * n); for(std::size_t j = 0; j < n; j++) { UIntType val = 0; @@ -331,9 +332,9 @@ inline void fill_array_int(Iter& first, Iter last, IntType (&x)[n]) } template -void seed_array_real_impl(const boost::uint_least32_t* storage, RealType (&x)[n]) +void seed_array_real_impl(const std::uint_least32_t* storage, RealType (&x)[n]) { - boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32)); + std::uint_least32_t mask = ~((~std::uint_least32_t(0)) << (w%32)); RealType two32 = 4294967296.0; const RealType divisor = RealType(1)/detail::pow2(w); unsigned int j; @@ -356,8 +357,7 @@ void seed_array_real_impl(const boost::uint_least32_t* storage, RealType (&x)[n] template void seed_array_real(SeedSeq& seq, RealType (&x)[n]) { - using std::pow; - boost::uint_least32_t storage[((w+31)/32) * n]; + std::uint_least32_t storage[((w+31)/32) * n]; seq.generate(&storage[0], &storage[0] + ((w+31)/32) * n); seed_array_real_impl(storage, x); } @@ -365,7 +365,7 @@ void seed_array_real(SeedSeq& seq, RealType (&x)[n]) template void fill_array_real(Iter& first, Iter last, RealType (&x)[n]) { - boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32)); + std::uint_least32_t mask = ~((~std::uint_least32_t(0)) << (w%32)); RealType two32 = 4294967296.0; const RealType divisor = RealType(1)/detail::pow2(w); unsigned int j; diff --git a/include/boost/random/detail/signed_unsigned_tools.hpp b/include/boost/random/detail/signed_unsigned_tools.hpp index 1979908a3..fd09030d2 100644 --- a/include/boost/random/detail/signed_unsigned_tools.hpp +++ b/include/boost/random/detail/signed_unsigned_tools.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS #define BOOST_RANDOM_DETAIL_SIGNED_UNSIGNED_TOOLS -#include +#include #include #include diff --git a/include/boost/random/detail/uniform_int_float.hpp b/include/boost/random/detail/uniform_int_float.hpp index 393c455bc..e73031396 100644 --- a/include/boost/random/detail/uniform_int_float.hpp +++ b/include/boost/random/detail/uniform_int_float.hpp @@ -15,7 +15,8 @@ #ifndef BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP #define BOOST_RANDOM_DETAIL_UNIFORM_INT_FLOAT_HPP -#include +#include +#include #include #include #include @@ -35,9 +36,9 @@ class uniform_int_float typedef typename base_type::result_type base_result; typedef typename boost::uint_t< - (std::numeric_limits::digits < + (std::numeric_limits::digits < std::numeric_limits::digits)? - std::numeric_limits::digits : + std::numeric_limits::digits : std::numeric_limits::digits >::fast result_type; diff --git a/include/boost/random/discard_block.hpp b/include/boost/random/discard_block.hpp index b9b09ab8f..0258bb9b7 100644 --- a/include/boost/random/discard_block.hpp +++ b/include/boost/random/discard_block.hpp @@ -17,10 +17,9 @@ #ifndef BOOST_RANDOM_DISCARD_BLOCK_HPP #define BOOST_RANDOM_DISCARD_BLOCK_HPP +#include #include #include -#include -#include #include #include #include @@ -121,9 +120,9 @@ class discard_block_engine return _rng(); } - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } diff --git a/include/boost/random/exponential_distribution.hpp b/include/boost/random/exponential_distribution.hpp index b4b95c547..e3dbb12e2 100644 --- a/include/boost/random/exponential_distribution.hpp +++ b/include/boost/random/exponential_distribution.hpp @@ -20,8 +20,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/include/boost/random/extreme_value_distribution.hpp b/include/boost/random/extreme_value_distribution.hpp index 419c3da65..f3934b00a 100644 --- a/include/boost/random/extreme_value_distribution.hpp +++ b/include/boost/random/extreme_value_distribution.hpp @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/include/boost/random/faure.hpp b/include/boost/random/faure.hpp index 4301c301b..a03029306 100644 --- a/include/boost/random/faure.hpp +++ b/include/boost/random/faure.hpp @@ -11,6 +11,7 @@ #include +#include #include #include #include @@ -318,10 +319,10 @@ class faure_engine return base_t::operator()(); } - /** @copydoc boost::random::niederreiter_base2_engine::discard(boost::uintmax_t) + /** @copydoc boost::random::niederreiter_base2_engine::discard(std::uintmax_t) * Throws: bad_alloc. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { base_t::discard(z); } @@ -358,7 +359,7 @@ class faure_engine * * However, it is possible to provide your own prime table to \faure_engine should the default one be insufficient. */ -typedef faure_engine faure; +typedef faure_engine faure; } // namespace random diff --git a/include/boost/random/fisher_f_distribution.hpp b/include/boost/random/fisher_f_distribution.hpp index cdf14da8f..d96c69dd7 100644 --- a/include/boost/random/fisher_f_distribution.hpp +++ b/include/boost/random/fisher_f_distribution.hpp @@ -15,8 +15,8 @@ #include #include +#include #include -#include #include #include diff --git a/include/boost/random/gamma_distribution.hpp b/include/boost/random/gamma_distribution.hpp index 34d0452aa..d0bbd94ac 100644 --- a/include/boost/random/gamma_distribution.hpp +++ b/include/boost/random/gamma_distribution.hpp @@ -18,8 +18,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/include/boost/random/generalized_inverse_gaussian_distribution.hpp b/include/boost/random/generalized_inverse_gaussian_distribution.hpp index ce2154c8c..e6c44dd3e 100644 --- a/include/boost/random/generalized_inverse_gaussian_distribution.hpp +++ b/include/boost/random/generalized_inverse_gaussian_distribution.hpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/include/boost/random/generate_canonical.hpp b/include/boost/random/generate_canonical.hpp index 5f45b4e57..5d59135d9 100644 --- a/include/boost/random/generate_canonical.hpp +++ b/include/boost/random/generate_canonical.hpp @@ -15,9 +15,9 @@ #define BOOST_RANDOM_GENERATE_CANONICAL_HPP #include +#include #include #include -#include #include #include #include diff --git a/include/boost/random/geometric_distribution.hpp b/include/boost/random/geometric_distribution.hpp index 90374cff7..4ce8b6e22 100644 --- a/include/boost/random/geometric_distribution.hpp +++ b/include/boost/random/geometric_distribution.hpp @@ -20,6 +20,7 @@ #include // std::log #include #include +#include #include #include #include diff --git a/include/boost/random/independent_bits.hpp b/include/boost/random/independent_bits.hpp index 72a8ed71a..0a1c10a30 100644 --- a/include/boost/random/independent_bits.hpp +++ b/include/boost/random/independent_bits.hpp @@ -14,12 +14,12 @@ #ifndef BOOST_RANDOM_INDEPENDENT_BITS_HPP #define BOOST_RANDOM_INDEPENDENT_BITS_HPP +#include #include #include +#include #include -#include #include -#include #include #include #include @@ -194,9 +194,9 @@ class independent_bits_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t i = 0; i < z; ++i) { + for(std::uintmax_t i = 0; i < z; ++i) { (*this)(); } } diff --git a/include/boost/random/inverse_gaussian_distribution.hpp b/include/boost/random/inverse_gaussian_distribution.hpp index 7bb0f1ca3..f9b30f885 100644 --- a/include/boost/random/inverse_gaussian_distribution.hpp +++ b/include/boost/random/inverse_gaussian_distribution.hpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/include/boost/random/inversive_congruential.hpp b/include/boost/random/inversive_congruential.hpp index 493e51c94..d3728aa32 100644 --- a/include/boost/random/inversive_congruential.hpp +++ b/include/boost/random/inversive_congruential.hpp @@ -16,11 +16,11 @@ #ifndef BOOST_RANDOM_INVERSIVE_CONGRUENTIAL_HPP #define BOOST_RANDOM_INVERSIVE_CONGRUENTIAL_HPP +#include #include #include #include #include -#include #include #include #include @@ -171,9 +171,9 @@ class inversive_congruential_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } diff --git a/include/boost/random/lagged_fibonacci.hpp b/include/boost/random/lagged_fibonacci.hpp index 0c93bae4a..9e184d00e 100644 --- a/include/boost/random/lagged_fibonacci.hpp +++ b/include/boost/random/lagged_fibonacci.hpp @@ -17,14 +17,13 @@ #ifndef BOOST_RANDOM_LAGGED_FIBONACCI_HPP #define BOOST_RANDOM_LAGGED_FIBONACCI_HPP +#include #include #include #include // std::max #include #include // std::pow #include -#include -#include #include #include #include @@ -91,7 +90,7 @@ class lagged_fibonacci_engine BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(lagged_fibonacci_engine, UIntType, value) { - minstd_rand0 intgen(static_cast(value)); + minstd_rand0 intgen(static_cast(value)); detail::generator_seed_seq gen(intgen); seed(gen); } @@ -131,9 +130,9 @@ class lagged_fibonacci_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } @@ -266,7 +265,7 @@ class lagged_fibonacci_01_engine BOOST_STATIC_CONSTANT(unsigned int, long_lag = p); BOOST_STATIC_CONSTANT(unsigned int, short_lag = q); - BOOST_STATIC_CONSTANT(boost::uint32_t, default_seed = 331u); + BOOST_STATIC_CONSTANT(std::uint32_t, default_seed = 331u); /** Constructs a @c lagged_fibonacci_01 generator and calls @c seed(). */ lagged_fibonacci_01_engine() { seed(); } @@ -291,7 +290,7 @@ class lagged_fibonacci_01_engine * seeds will be equivalent to some seed within this range. See * \linear_congruential_engine for details. */ - BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(lagged_fibonacci_01_engine, boost::uint32_t, value) + BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(lagged_fibonacci_01_engine, std::uint32_t, value) { minstd_rand0 intgen(value); detail::generator_seed_seq gen(intgen); @@ -339,9 +338,9 @@ class lagged_fibonacci_01_engine { return detail::generate_from_real(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } @@ -412,7 +411,7 @@ const unsigned int lagged_fibonacci_01_engine::short_lag; template const int lagged_fibonacci_01_engine::word_size; template -const boost::uint32_t lagged_fibonacci_01_engine::default_seed; +const std::uint32_t lagged_fibonacci_01_engine::default_seed; #endif /// \cond show_private @@ -447,7 +446,7 @@ class lagged_fibonacci_01 : public lagged_fibonacci_01_engine typedef lagged_fibonacci_01_engine base_type; public: lagged_fibonacci_01() {} - BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(lagged_fibonacci_01, boost::uint32_t, val) + BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(lagged_fibonacci_01, std::uint32_t, val) { this->seed(val); } BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(lagged_fibonacci_01, SeedSeq, seq) { this->seed(seq); } diff --git a/include/boost/random/laplace_distribution.hpp b/include/boost/random/laplace_distribution.hpp index ec176a59c..d01c8c471 100644 --- a/include/boost/random/laplace_distribution.hpp +++ b/include/boost/random/laplace_distribution.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/include/boost/random/linear_congruential.hpp b/include/boost/random/linear_congruential.hpp index 62b05ec00..3265b9b2d 100644 --- a/include/boost/random/linear_congruential.hpp +++ b/include/boost/random/linear_congruential.hpp @@ -16,12 +16,12 @@ #ifndef BOOST_RANDOM_LINEAR_CONGRUENTIAL_HPP #define BOOST_RANDOM_LINEAR_CONGRUENTIAL_HPP +#include #include +#include #include #include #include -#include -#include #include #include #include @@ -190,7 +190,7 @@ class linear_congruential_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { typedef const_mod mod_type; IntType b_inv = mod_type::invert(a-1); @@ -204,7 +204,7 @@ class linear_congruential_engine // we're storing the intermediate result / b_gcd IntType a_zm1_over_gcd = 0; IntType a_km1_over_gcd = (a - 1) / b_gcd; - boost::uintmax_t exponent = z; + std::uintmax_t exponent = z; while(exponent != 0) { if(exponent % 2 == 1) { a_zm1_over_gcd = @@ -349,7 +349,7 @@ typedef linear_congruential_engine minstd_rand; class rand48 { public: - typedef boost::uint32_t result_type; + typedef std::uint32_t result_type; BOOST_STATIC_CONSTANT(bool, has_fixed_range = false); /** @@ -404,7 +404,7 @@ class rand48 uint32_t operator()() { return static_cast(lcf() >> 17); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) { lcf.discard(z); } + void discard(std::uintmax_t z) { lcf.discard(z); } /** Fills a range with random values */ template @@ -449,7 +449,7 @@ class rand48 0xB, uint64_t(1)<<48> lcf_t; lcf_t lcf; - static boost::uint64_t cnv(boost::uint32_t x) + static std::uint64_t cnv(std::uint32_t x) { return (static_cast(x) << 16) | 0x330e; } /// \endcond }; diff --git a/include/boost/random/linear_feedback_shift.hpp b/include/boost/random/linear_feedback_shift.hpp index a5c2ce7a2..347d0c78d 100644 --- a/include/boost/random/linear_feedback_shift.hpp +++ b/include/boost/random/linear_feedback_shift.hpp @@ -15,10 +15,10 @@ #ifndef BOOST_RANDOM_LINEAR_FEEDBACK_SHIFT_HPP #define BOOST_RANDOM_LINEAR_FEEDBACK_SHIFT_HPP +#include #include #include #include -#include #include #include #include @@ -128,9 +128,9 @@ class linear_feedback_shift_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } diff --git a/include/boost/random/lognormal_distribution.hpp b/include/boost/random/lognormal_distribution.hpp index 7ed1e13ab..a457d3540 100644 --- a/include/boost/random/lognormal_distribution.hpp +++ b/include/boost/random/lognormal_distribution.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/random/mersenne_twister.hpp b/include/boost/random/mersenne_twister.hpp index dfdc2d713..6665e208d 100644 --- a/include/boost/random/mersenne_twister.hpp +++ b/include/boost/random/mersenne_twister.hpp @@ -18,11 +18,11 @@ #ifndef BOOST_RANDOM_MERSENNE_TWISTER_HPP #define BOOST_RANDOM_MERSENNE_TWISTER_HPP +#include #include #include #include #include -#include #include #include #include @@ -200,7 +200,7 @@ class mersenne_twister_engine * } * @endcode */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { #ifndef BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD #define BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD 10000000 @@ -208,7 +208,7 @@ class mersenne_twister_engine if(z > BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD) { discard_many(z); } else { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } @@ -387,7 +387,7 @@ class mersenne_twister_engine * Sequences and Their Applications (SETA '08). * DOI=10.1007/978-3-540-85912-3_26 */ - void discard_many(boost::uintmax_t z) + void discard_many(std::uintmax_t z) { // Compute the minimal polynomial, phi(t) // This depends only on the transition function, diff --git a/include/boost/random/negative_binomial_distribution.hpp b/include/boost/random/negative_binomial_distribution.hpp index cbe26fad2..31dedb64c 100644 --- a/include/boost/random/negative_binomial_distribution.hpp +++ b/include/boost/random/negative_binomial_distribution.hpp @@ -14,8 +14,8 @@ #define BOOST_RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_HPP_INCLUDED #include +#include -#include #include #include #include diff --git a/include/boost/random/niederreiter_base2.hpp b/include/boost/random/niederreiter_base2.hpp index 5f0585087..b5aae3fec 100644 --- a/include/boost/random/niederreiter_base2.hpp +++ b/include/boost/random/niederreiter_base2.hpp @@ -9,6 +9,9 @@ #ifndef BOOST_RANDOM_NIEDERREITER_BASE2_HPP #define BOOST_RANDOM_NIEDERREITER_BASE2_HPP +#include +#include + #include #include @@ -181,7 +184,7 @@ struct niederreiter_base2_lattice for (unsigned r = 0; r != bit_count; ++r) { value_type& num = cj[dimension * r + dim]; // set the jth bit in num - num = (num & ~j) | (-v[r + u] & j); + num = (num & ~j) | (-static_cast(v[r + u]) & j); } } } while (j != 0); @@ -317,7 +320,7 @@ class niederreiter_base2_engine //!\endcode //! //!Throws: range_error. - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { base_t::discard(z); } @@ -351,7 +354,7 @@ class niederreiter_base2_engine * * However, it is possible to provide your own table to \niederreiter_base2_engine should the default one be insufficient. */ -typedef niederreiter_base2_engine niederreiter_base2; +typedef niederreiter_base2_engine niederreiter_base2; } // namespace random diff --git a/include/boost/random/non_central_chi_squared_distribution.hpp b/include/boost/random/non_central_chi_squared_distribution.hpp index 28c9ff6d9..4b4b3ae58 100644 --- a/include/boost/random/non_central_chi_squared_distribution.hpp +++ b/include/boost/random/non_central_chi_squared_distribution.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/boost/random/normal_distribution.hpp b/include/boost/random/normal_distribution.hpp index b7ff3eba9..7009c626d 100644 --- a/include/boost/random/normal_distribution.hpp +++ b/include/boost/random/normal_distribution.hpp @@ -20,8 +20,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/include/boost/random/poisson_distribution.hpp b/include/boost/random/poisson_distribution.hpp index 1281a7d85..33b5edd50 100644 --- a/include/boost/random/poisson_distribution.hpp +++ b/include/boost/random/poisson_distribution.hpp @@ -18,8 +18,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/include/boost/random/seed_seq.hpp b/include/boost/random/seed_seq.hpp index fc7adbbf1..6d6e9cd56 100644 --- a/include/boost/random/seed_seq.hpp +++ b/include/boost/random/seed_seq.hpp @@ -14,8 +14,8 @@ #ifndef BOOST_RANDOM_SEED_SEQ_HPP #define BOOST_RANDOM_SEED_SEQ_HPP +#include #include -#include #include #include #include @@ -36,7 +36,7 @@ namespace random { */ class seed_seq { public: - typedef boost::uint_least32_t result_type; + typedef std::uint_least32_t result_type; /** Initializes a seed_seq to hold an empty sequence. */ seed_seq() {} diff --git a/include/boost/random/shuffle_order.hpp b/include/boost/random/shuffle_order.hpp index 0dc6b26b6..a4b7c7cc1 100644 --- a/include/boost/random/shuffle_order.hpp +++ b/include/boost/random/shuffle_order.hpp @@ -15,13 +15,13 @@ #ifndef BOOST_RANDOM_SHUFFLE_ORDER_HPP #define BOOST_RANDOM_SHUFFLE_ORDER_HPP +#include #include #include // std::copy #include +#include #include -#include #include -#include #include #include #include @@ -149,8 +149,8 @@ class shuffle_order_engine static_cast(off) * k / (static_cast(brange) + 1)); } else { - boost::uintmax_t divisor = - static_cast(brange) + 1; + std::uintmax_t divisor = + static_cast(brange) + 1; j = static_cast(detail::muldiv(off, k, divisor)); } // assert(0 <= j && j < k); @@ -160,9 +160,9 @@ class shuffle_order_engine } /** Advances the generator by z steps. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { - for(boost::uintmax_t j = 0; j < z; ++j) { + for(std::uintmax_t j = 0; j < z; ++j) { (*this)(); } } diff --git a/include/boost/random/sobol.hpp b/include/boost/random/sobol.hpp index 042b3ba3a..6e177b1de 100644 --- a/include/boost/random/sobol.hpp +++ b/include/boost/random/sobol.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_RANDOM_SOBOL_HPP #define BOOST_RANDOM_SOBOL_HPP +#include +#include #include #include #include @@ -188,8 +190,8 @@ class sobol_engine return base_t::operator()(); } - /** @copydoc boost::random::niederreiter_base2_engine::discard(boost::uintmax_t) */ - void discard(boost::uintmax_t z) + /** @copydoc boost::random::niederreiter_base2_engine::discard(std::uintmax_t) */ + void discard(std::uintmax_t z) { base_t::discard(z); } @@ -229,7 +231,7 @@ class sobol_engine * * However, it is possible to provide your own table to \sobol_engine should the default one be insufficient. */ -typedef sobol_engine sobol; +typedef sobol_engine sobol; } // namespace random diff --git a/include/boost/random/student_t_distribution.hpp b/include/boost/random/student_t_distribution.hpp index e28b0e3bf..43919bfd8 100644 --- a/include/boost/random/student_t_distribution.hpp +++ b/include/boost/random/student_t_distribution.hpp @@ -15,8 +15,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/include/boost/random/subtract_with_carry.hpp b/include/boost/random/subtract_with_carry.hpp index 6497884fa..36cfb257b 100644 --- a/include/boost/random/subtract_with_carry.hpp +++ b/include/boost/random/subtract_with_carry.hpp @@ -17,12 +17,12 @@ #define BOOST_RANDOM_SUBTRACT_WITH_CARRY_HPP #include // std::pow +#include #include #include // std::equal +#include #include #include -#include -#include #include #include #include @@ -43,7 +43,7 @@ namespace detail { struct subtract_with_carry_discard { template - static void apply(Engine& eng, boost::uintmax_t z) + static void apply(Engine& eng, std::uintmax_t z) { typedef typename Engine::result_type IntType; const std::size_t short_lag = Engine::short_lag; @@ -161,7 +161,7 @@ class subtract_with_carry_engine IntType, value) { typedef linear_congruential_engine gen_t; - gen_t intgen(static_cast(value == 0 ? default_seed : value)); + gen_t intgen(static_cast(value == 0 ? default_seed : value)); detail::generator_seed_seq gen(intgen); seed(gen); } @@ -211,7 +211,7 @@ class subtract_with_carry_engine } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { detail::subtract_with_carry_discard::apply(*this, z); } @@ -343,7 +343,7 @@ class subtract_with_carry_01_engine BOOST_STATIC_CONSTANT(std::size_t, word_size = w); BOOST_STATIC_CONSTANT(std::size_t, long_lag = r); BOOST_STATIC_CONSTANT(std::size_t, short_lag = s); - BOOST_STATIC_CONSTANT(boost::uint32_t, default_seed = 19780503u); + BOOST_STATIC_CONSTANT(std::uint32_t, default_seed = 19780503u); BOOST_STATIC_ASSERT(!std::numeric_limits::is_integer); @@ -351,7 +351,7 @@ class subtract_with_carry_01_engine subtract_with_carry_01_engine() { init_modulus(); seed(); } /** Creates a new subtract_with_carry_01_engine and seeds it with value. */ BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(subtract_with_carry_01_engine, - boost::uint32_t, value) + std::uint32_t, value) { init_modulus(); seed(value); } /** * Creates a new \subtract_with_carry_01_engine and seeds with values @@ -389,7 +389,7 @@ class subtract_with_carry_01_engine /** Seeds the generator with @c value. */ BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(subtract_with_carry_01_engine, - boost::uint32_t, value) + std::uint32_t, value) { typedef linear_congruential_engine gen_t; gen_t intgen(value == 0 ? default_seed : value); @@ -443,7 +443,7 @@ class subtract_with_carry_01_engine } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { detail::subtract_with_carry_discard::apply(*this, z); } /** Fills a range with random values. */ diff --git a/include/boost/random/uniform_01.hpp b/include/boost/random/uniform_01.hpp index 37258f580..291a33915 100644 --- a/include/boost/random/uniform_01.hpp +++ b/include/boost/random/uniform_01.hpp @@ -17,8 +17,8 @@ #define BOOST_RANDOM_UNIFORM_01_HPP #include +#include #include -#include #include #include #include diff --git a/include/boost/random/uniform_int_distribution.hpp b/include/boost/random/uniform_int_distribution.hpp index a70c4d188..a0291444c 100644 --- a/include/boost/random/uniform_int_distribution.hpp +++ b/include/boost/random/uniform_int_distribution.hpp @@ -21,8 +21,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/include/boost/random/uniform_real.hpp b/include/boost/random/uniform_real.hpp index c98626e77..906652f8d 100644 --- a/include/boost/random/uniform_real.hpp +++ b/include/boost/random/uniform_real.hpp @@ -19,7 +19,6 @@ #include #include -#include #include namespace boost { diff --git a/include/boost/random/uniform_real_distribution.hpp b/include/boost/random/uniform_real_distribution.hpp index 9eab9f4bc..6bd9ccdca 100644 --- a/include/boost/random/uniform_real_distribution.hpp +++ b/include/boost/random/uniform_real_distribution.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/random/uniform_smallint.hpp b/include/boost/random/uniform_smallint.hpp index d8f0cd3ba..3448914e7 100644 --- a/include/boost/random/uniform_smallint.hpp +++ b/include/boost/random/uniform_smallint.hpp @@ -19,9 +19,9 @@ #include #include +#include #include #include -#include #include #include #include diff --git a/include/boost/random/weibull_distribution.hpp b/include/boost/random/weibull_distribution.hpp index 55e3c0490..1dd8e4ef9 100644 --- a/include/boost/random/weibull_distribution.hpp +++ b/include/boost/random/weibull_distribution.hpp @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/include/boost/random/xor_combine.hpp b/include/boost/random/xor_combine.hpp index 312fdb8db..5e5179132 100644 --- a/include/boost/random/xor_combine.hpp +++ b/include/boost/random/xor_combine.hpp @@ -14,13 +14,12 @@ #ifndef BOOST_RANDOM_XOR_COMBINE_HPP #define BOOST_RANDOM_XOR_COMBINE_HPP +#include #include #include #include #include // for std::min and std::max #include -#include -#include // uint32_t #include #include #include @@ -128,7 +127,7 @@ class xor_combine_engine { detail::generate_from_int(*this, first, last); } /** Advances the state of the generator by @c z. */ - void discard(boost::uintmax_t z) + void discard(std::uintmax_t z) { _rng1.discard(z); _rng2.discard(z); diff --git a/include/boost/random/xoshiro.hpp b/include/boost/random/xoshiro.hpp index 92c3bc38c..98626e995 100644 --- a/include/boost/random/xoshiro.hpp +++ b/include/boost/random/xoshiro.hpp @@ -17,6 +17,7 @@ #include #include #include +#include namespace boost { namespace random { diff --git a/performance/random_speed.cpp b/performance/random_speed.cpp index 7f51e4c5b..467e9a357 100644 --- a/performance/random_speed.cpp +++ b/performance/random_speed.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -327,10 +328,10 @@ int main(int argc, char*argv[]) #if !defined(BOOST_NO_INT64_T) && \ !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) run(iter, "rand48", boost::rand48()); - linear_congruential - lcg48(boost::uint64_t(1)<<16 | 0x330e, - boost::uint64_t(0xDEECE66DUL) | (boost::uint64_t(0x5) << 32), 0xB, - boost::uint64_t(1)<<48); + linear_congruential + lcg48(std::uint64_t(1)<<16 | 0x330e, + std::uint64_t(0xDEECE66DUL) | (std::uint64_t(0x5) << 32), 0xB, + std::uint64_t(1)<<48); timing(lcg48, iter, "lrand48 run-time"); #endif diff --git a/test/concepts.hpp b/test/concepts.hpp index 700036766..fd0eb1e61 100644 --- a/test/concepts.hpp +++ b/test/concepts.hpp @@ -33,8 +33,8 @@ #include #include #include -#include #include +#include #include #include @@ -78,7 +78,7 @@ struct SeedSeq } private: SSeq q; - mutable_random_access_iterator_archetype rb, re; + mutable_random_access_iterator_archetype rb, re; }; template @@ -157,7 +157,7 @@ struct RandomNumberEngine : typename boost::random::detail::seed_type::type s; uintmax_t z; - input_iterator_archetype sb, se; + input_iterator_archetype sb, se; }; template diff --git a/test/integrate.hpp b/test/integrate.hpp index 33766acd6..c98d731df 100644 --- a/test/integrate.hpp +++ b/test/integrate.hpp @@ -14,7 +14,7 @@ #ifndef INTEGRATE_HPP #define INTEGRATE_HPP -#include +#include template inline typename UnaryFunction::result_type diff --git a/test/multiprecision_float_test.cpp b/test/multiprecision_float_test.cpp index 0fd00bd72..2b59569a0 100644 --- a/test/multiprecision_float_test.cpp +++ b/test/multiprecision_float_test.cpp @@ -22,6 +22,7 @@ #include #include #include +#include typedef boost::multiprecision::number big_float; diff --git a/test/multiprecision_int_test.cpp b/test/multiprecision_int_test.cpp index 4842c5559..e837f4484 100644 --- a/test/multiprecision_int_test.cpp +++ b/test/multiprecision_int_test.cpp @@ -34,6 +34,7 @@ #include #include #include +#include typedef boost::mpl::list < boost::random::independent_bits_engine, diff --git a/test/statistic_tests.cpp b/test/statistic_tests.cpp index 717985b26..afdbac791 100644 --- a/test/statistic_tests.cpp +++ b/test/statistic_tests.cpp @@ -17,8 +17,8 @@ #include #include #include +#include -#include #include #include diff --git a/test/statistic_tests.hpp b/test/statistic_tests.hpp index ce25bb0f9..1b8c483f1 100644 --- a/test/statistic_tests.hpp +++ b/test/statistic_tests.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/test_beta_distribution.cpp b/test/test_beta_distribution.cpp index 4d66b017e..03c6bbb59 100644 --- a/test/test_beta_distribution.cpp +++ b/test/test_beta_distribution.cpp @@ -10,7 +10,6 @@ */ #include -#include #define BOOST_RANDOM_DISTRIBUTION boost::random::beta_distribution<> #define BOOST_RANDOM_ARG1 alpha diff --git a/test/test_const_mod.cpp b/test/test_const_mod.cpp index 5d18eba7e..cf5ef4991 100644 --- a/test/test_const_mod.cpp +++ b/test/test_const_mod.cpp @@ -11,15 +11,16 @@ #include -#include +#include +#include #include #define BOOST_TEST_MAIN #include typedef boost::mpl::vector< - boost::int8_t, - boost::uint8_t + std::int8_t, + std::uint8_t > int8_types; BOOST_AUTO_TEST_CASE_TEMPLATE(test_mult8, IntType, int8_types) { @@ -93,8 +94,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_invert8, IntType, int8_types) { } typedef boost::mpl::vector< - boost::int32_t, - boost::uint32_t + std::int32_t, + std::uint32_t > int32_types; BOOST_AUTO_TEST_CASE_TEMPLATE(test_mult32, IntType, int32_types) { @@ -134,8 +135,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_invert32, IntType, int32_types) { #if !defined(BOOST_NO_INT64_T) typedef boost::mpl::vector< - boost::int64_t, - boost::uint64_t + std::int64_t, + std::uint64_t > int64_types; BOOST_AUTO_TEST_CASE_TEMPLATE(test_mult64, IntType, int64_types) { diff --git a/test/test_generate_canonical.cpp b/test/test_generate_canonical.cpp index cc45f8a9e..002dca68d 100644 --- a/test/test_generate_canonical.cpp +++ b/test/test_generate_canonical.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #define BOOST_TEST_MAIN @@ -88,10 +88,10 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_long_double, Engine, engines) struct max_engine { - typedef boost::uint32_t result_type; + typedef std::uint32_t result_type; static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; } static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () - { return ~boost::uint32_t(0); } + { return ~std::uint32_t(0); } result_type operator()() { return (max)(); } }; diff --git a/test/test_generator.ipp b/test/test_generator.ipp index c8dc911c0..791a5035a 100644 --- a/test/test_generator.ipp +++ b/test/test_generator.ipp @@ -9,6 +9,7 @@ * */ +#include #include "concepts.hpp" #include #include @@ -73,7 +74,7 @@ void test_seed(seed_type value) test_seed_conversion(urng, value); #if !defined(BOOST_NO_INT64_T) test_seed_conversion(urng, value); - test_seed_conversion(urng, value); + test_seed_conversion(urng, value); #endif // floating point types @@ -196,8 +197,8 @@ BOOST_AUTO_TEST_CASE(test_discard2) #ifdef BOOST_RANDOM_DISCARD_MAX BOOST_AUTO_TEST_CASE(test_discard_max) { - boost::uintmax_t val = (std::numeric_limits::max)(); - boost::uintmax_t half = val / 2; + std::uintmax_t val = (std::numeric_limits::max)(); + std::uintmax_t half = val / 2; BOOST_RANDOM_URNG urng; BOOST_RANDOM_URNG urng2; urng.discard(half); @@ -288,9 +289,9 @@ BOOST_AUTO_TEST_CASE(validate_iter) BOOST_AUTO_TEST_CASE(test_generate) { BOOST_RANDOM_URNG urng; - boost::uint32_t expected[] = BOOST_RANDOM_GENERATE_VALUES; + std::uint32_t expected[] = BOOST_RANDOM_GENERATE_VALUES; static const std::size_t N = sizeof(expected)/sizeof(expected[0]); - boost::uint32_t actual[N]; + std::uint32_t actual[N]; urng.generate(&actual[0], &actual[0] + N); BOOST_CHECK_EQUAL_COLLECTIONS(actual, actual + N, expected, expected + N); } diff --git a/test/test_geometric_distribution.cpp b/test/test_geometric_distribution.cpp index bb54d0259..e3228d76b 100644 --- a/test/test_geometric_distribution.cpp +++ b/test/test_geometric_distribution.cpp @@ -10,6 +10,7 @@ */ #include +#include #define BOOST_RANDOM_DISTRIBUTION boost::random::geometric_distribution<> #define BOOST_RANDOM_ARG1 p diff --git a/test/test_independent_bits31.cpp b/test/test_independent_bits31.cpp index aaa3f10a4..50a6cb5b4 100644 --- a/test/test_independent_bits31.cpp +++ b/test/test_independent_bits31.cpp @@ -12,7 +12,7 @@ #include #include -typedef boost::random::independent_bits_engine independent_bits31; +typedef boost::random::independent_bits_engine independent_bits31; #define BOOST_RANDOM_URNG independent_bits31 #define BOOST_RANDOM_SEED_WORDS 1 diff --git a/test/test_independent_bits32.cpp b/test/test_independent_bits32.cpp index 6534e8647..f408204e6 100644 --- a/test/test_independent_bits32.cpp +++ b/test/test_independent_bits32.cpp @@ -12,7 +12,7 @@ #include #include -typedef boost::random::independent_bits_engine independent_bits32; +typedef boost::random::independent_bits_engine independent_bits32; #define BOOST_RANDOM_URNG independent_bits32 #define BOOST_RANDOM_SEED_WORDS 624 diff --git a/test/test_knuth_b.cpp b/test/test_knuth_b.cpp index 7e5b78b03..745f217ed 100644 --- a/test/test_knuth_b.cpp +++ b/test/test_knuth_b.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::knuth_b diff --git a/test/test_kreutzer1986.cpp b/test/test_kreutzer1986.cpp index 27035252d..6e768a6b0 100644 --- a/test/test_kreutzer1986.cpp +++ b/test/test_kreutzer1986.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::kreutzer1986 diff --git a/test/test_lagged_fibonacci.cpp b/test/test_lagged_fibonacci.cpp index 7f69bcdb9..279376b8f 100644 --- a/test/test_lagged_fibonacci.cpp +++ b/test/test_lagged_fibonacci.cpp @@ -11,7 +11,7 @@ #include -typedef boost::random::lagged_fibonacci_engine lagged_fibonacci; +typedef boost::random::lagged_fibonacci_engine lagged_fibonacci; #define BOOST_RANDOM_URNG lagged_fibonacci #define BOOST_RANDOM_SEED_WORDS 607 diff --git a/test/test_linear_feedback_shift.cpp b/test/test_linear_feedback_shift.cpp index 7ab70017b..d30138672 100644 --- a/test/test_linear_feedback_shift.cpp +++ b/test/test_linear_feedback_shift.cpp @@ -11,7 +11,7 @@ #include -typedef boost::random::linear_feedback_shift_engine linear_feedback_shift; +typedef boost::random::linear_feedback_shift_engine linear_feedback_shift; #define BOOST_RANDOM_URNG linear_feedback_shift #define BOOST_RANDOM_SEED_WORDS 1 diff --git a/test/test_minstd_rand.cpp b/test/test_minstd_rand.cpp index 1212c57f2..977d8282f 100644 --- a/test/test_minstd_rand.cpp +++ b/test/test_minstd_rand.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::minstd_rand diff --git a/test/test_minstd_rand0.cpp b/test/test_minstd_rand0.cpp index ec54e42af..823af1616 100644 --- a/test/test_minstd_rand0.cpp +++ b/test/test_minstd_rand0.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::minstd_rand0 diff --git a/test/test_mixmax.cpp b/test/test_mixmax.cpp index d6d62df51..c300637d1 100644 --- a/test/test_mixmax.cpp +++ b/test/test_mixmax.cpp @@ -29,16 +29,16 @@ struct seed_seq_0 { template void generate(It begin, It end) const { - std::fill(begin, end, boost::uint32_t(0xFFFFFFFF)); + std::fill(begin, end, std::uint32_t(0xFFFFFFFF)); } }; BOOST_AUTO_TEST_CASE(test_special_seed) { { seed_seq_0 seed; - std::vector vec(17); + std::vector vec(17); seed.generate(vec.begin(), vec.end()); // fill vec with ones - std::vector::iterator it = vec.begin(); + std::vector::iterator it = vec.begin(); boost::random::mixmax gen1(it, vec.end()); // init gen1 with vec iterator BOOST_CHECK_EQUAL(gen1(), 775778250716139533ULL); BOOST_CHECK_EQUAL(gen1(), 846264592759195742ULL); diff --git a/test/test_mt19937.cpp b/test/test_mt19937.cpp index 568d66891..5f2aa36a8 100644 --- a/test/test_mt19937.cpp +++ b/test/test_mt19937.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #define BOOST_RANDOM_URNG boost::random::mt19937 @@ -33,14 +33,14 @@ struct seed_seq_0 { template void generate(It begin, It end) const { - std::fill(begin, end, boost::uint32_t(0)); + std::fill(begin, end, std::uint32_t(0)); } }; struct seed_seq_1 { template void generate(It begin, It end) const { - std::fill(begin, end, boost::uint32_t(0)); + std::fill(begin, end, std::uint32_t(0)); *(end - 1) = 1; } }; @@ -48,10 +48,10 @@ struct seed_seq_1 { BOOST_AUTO_TEST_CASE(test_special_seed) { { seed_seq_1 seed; - std::vector vec(624); + std::vector vec(624); seed.generate(vec.begin(), vec.end()); - std::vector::iterator it = vec.begin(); + std::vector::iterator it = vec.begin(); boost::mt19937 gen1(it, vec.end()); BOOST_CHECK_EQUAL(gen1(), 0u); BOOST_CHECK_EQUAL(gen1(), 0u); @@ -64,10 +64,10 @@ BOOST_AUTO_TEST_CASE(test_special_seed) { } { seed_seq_0 seed; - std::vector vec(624); + std::vector vec(624); seed.generate(vec.begin(), vec.end()); - std::vector::iterator it = vec.begin(); + std::vector::iterator it = vec.begin(); boost::mt19937 gen1(it, vec.end()); BOOST_CHECK_EQUAL(gen1(), 1141379330u); BOOST_CHECK_EQUAL(gen1(), 0u); diff --git a/test/test_mt19937_64.cpp b/test/test_mt19937_64.cpp index e3300847b..1875c6099 100644 --- a/test/test_mt19937_64.cpp +++ b/test/test_mt19937_64.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::mt19937_64 diff --git a/test/test_old_uniform_int_distribution.cpp b/test/test_old_uniform_int_distribution.cpp index bdae26461..b6b8c6776 100644 --- a/test/test_old_uniform_int_distribution.cpp +++ b/test/test_old_uniform_int_distribution.cpp @@ -10,7 +10,6 @@ */ #include -#include #define BOOST_RANDOM_DISTRIBUTION boost::uniform_int<> #define BOOST_RANDOM_ARG1 a @@ -55,7 +54,7 @@ BOOST_AUTO_TEST_CASE(test_random_shuffle) boost::mt19937 engine1(1234); boost::mt19937 engine2(1234); - boost::random::random_number_generator referenceRand(engine1); + boost::random::random_number_generator referenceRand(engine1); distribution_type dist(0,10); generator_type testRand(engine2, dist); diff --git a/test/test_old_uniform_real_distribution.cpp b/test/test_old_uniform_real_distribution.cpp index 1728fb31f..c56027265 100644 --- a/test/test_old_uniform_real_distribution.cpp +++ b/test/test_old_uniform_real_distribution.cpp @@ -10,7 +10,6 @@ */ #include -#include #define BOOST_RANDOM_DISTRIBUTION boost::uniform_real<> #define BOOST_RANDOM_ARG1 a diff --git a/test/test_qrng_functions.hpp b/test/test_qrng_functions.hpp index effc96007..48cb8dc35 100644 --- a/test/test_qrng_functions.hpp +++ b/test/test_qrng_functions.hpp @@ -6,6 +6,7 @@ #ifndef TEST_QRNG_FUNCTIONS_HPP_INCLUDED #define TEST_QRNG_FUNCTIONS_HPP_INCLUDED +#include #include #include @@ -16,7 +17,7 @@ namespace test { // Invokes operator() precisely n times. This is to check that // Engine::discard(n) actually has the same effect. template -inline void trivial_discard(Engine& eng, boost::uintmax_t n) +inline void trivial_discard(Engine& eng, std::uintmax_t n) { for( ; n != 0; --n ) eng(); } @@ -166,7 +167,7 @@ void test_max_discard(std::size_t dim) { typedef typename Generator::type engine_type; - static const boost::uintmax_t maxdiscard = dim * engine_type::max(); + static const std::uintmax_t maxdiscard = dim * engine_type::max(); // Max discard limit { @@ -265,13 +266,13 @@ inline void test_##QRNG##_max_discard() \ static const std::size_t dim = 2;\ \ /* test full 8 bits */ \ - test::test_max_discard >(dim); \ + test::test_max_discard >(dim); \ \ /* test 7 bits */ \ - test::test_max_discard >(dim); \ + test::test_max_discard >(dim); \ \ /* test 6 bits for a good measure */ \ - test::test_max_discard >(dim); \ + test::test_max_discard >(dim); \ } \ /**/ diff --git a/test/test_rand48.cpp b/test/test_rand48.cpp index 79b61c13b..62761a0d3 100644 --- a/test/test_rand48.cpp +++ b/test/test_rand48.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::rand48 diff --git a/test/test_random_device.cpp b/test/test_random_device.cpp index 831c0bf88..068ea1c74 100644 --- a/test/test_random_device.cpp +++ b/test/test_random_device.cpp @@ -33,6 +33,6 @@ BOOST_AUTO_TEST_CASE(test_random_device) BOOST_CHECK_LE(val, (rng.max)()); } - boost::uint32_t a[10]; + std::uint32_t a[10]; rng.generate(a, a + 10); } diff --git a/test/test_random_number_generator.cpp b/test/test_random_number_generator.cpp index 14add59cf..dd43a48f4 100644 --- a/test/test_random_number_generator.cpp +++ b/test/test_random_number_generator.cpp @@ -22,7 +22,7 @@ BOOST_AUTO_TEST_CASE(test_random_shuffle) { #ifndef BOOST_NO_CXX98_RANDOM_SHUFFLE boost::mt19937 engine(1234); - boost::random::random_number_generator generator(engine); + boost::random::random_number_generator generator(engine); std::vector testVec; diff --git a/test/test_ranlux48.cpp b/test/test_ranlux48.cpp index bd4fa092b..18c5af323 100644 --- a/test/test_ranlux48.cpp +++ b/test/test_ranlux48.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::ranlux48 diff --git a/test/test_ranlux48_base.cpp b/test/test_ranlux48_base.cpp index 3f5571312..ca9755954 100644 --- a/test/test_ranlux48_base.cpp +++ b/test/test_ranlux48_base.cpp @@ -10,7 +10,7 @@ */ #include -#include +#include #define BOOST_RANDOM_URNG boost::random::ranlux48_base diff --git a/test/test_ranlux64_3.cpp b/test/test_ranlux64_3.cpp index 0c9fbdec6..0a632a48e 100644 --- a/test/test_ranlux64_3.cpp +++ b/test/test_ranlux64_3.cpp @@ -10,8 +10,8 @@ */ #include -#include #include +#include #define BOOST_RANDOM_URNG boost::random::ranlux64_3 diff --git a/test/test_ranlux64_4.cpp b/test/test_ranlux64_4.cpp index df1c5427a..b06170a3a 100644 --- a/test/test_ranlux64_4.cpp +++ b/test/test_ranlux64_4.cpp @@ -10,8 +10,8 @@ */ #include -#include #include +#include #define BOOST_RANDOM_URNG boost::random::ranlux64_4 diff --git a/test/test_seed_seq.cpp b/test/test_seed_seq.cpp index c241d8027..2e32c93f8 100644 --- a/test/test_seed_seq.cpp +++ b/test/test_seed_seq.cpp @@ -19,11 +19,11 @@ using boost::assign::list_of; BOOST_AUTO_TEST_CASE(test_seed_seq) { - boost::uint32_t expected_param[4] = { 2, 3, 4, 0xdeadbeaf }; - boost::uint32_t param[4] = { 2, 3, 4, 0xdeadbeaf }; - boost::uint32_t store32[10]; - boost::uint64_t store64[10]; - boost::uint32_t expected[10] = { + std::uint32_t expected_param[4] = { 2, 3, 4, 0xdeadbeaf }; + std::uint32_t param[4] = { 2, 3, 4, 0xdeadbeaf }; + std::uint32_t store32[10]; + std::uint64_t store64[10]; + std::uint32_t expected[10] = { 3155793538u, 2047427591u, 2886057794u, @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(test_seed_seq) { BOOST_CHECK_EQUAL_COLLECTIONS( ¶m[0], ¶m[0] + 4, &expected_param[0], &expected_param[0] + 4); - boost::uint32_t expected_r[10] = { + std::uint32_t expected_r[10] = { 2681148375u, 3302224839u, 249244011u, @@ -113,9 +113,9 @@ BOOST_AUTO_TEST_CASE(test_seed_seq) { } BOOST_AUTO_TEST_CASE(test_seed_seq_short_output) { - boost::uint32_t store32[2]; + std::uint32_t store32[2]; - boost::uint32_t expected_short[2] = { + std::uint32_t expected_short[2] = { 4149590228u, 3175758659u }; diff --git a/test/test_triangle_distribution.cpp b/test/test_triangle_distribution.cpp index 32ded62c2..de557f46e 100644 --- a/test/test_triangle_distribution.cpp +++ b/test/test_triangle_distribution.cpp @@ -10,7 +10,6 @@ */ #include -#include #define BOOST_RANDOM_DISTRIBUTION boost::random::triangle_distribution<> #define BOOST_RANDOM_ARG1 a diff --git a/test/test_uniform_int.ipp b/test/test_uniform_int.ipp index fe35c39a2..baa43273e 100644 --- a/test/test_uniform_int.ipp +++ b/test/test_uniform_int.ipp @@ -9,12 +9,12 @@ * $Id$ */ +#include #include +#include #include #include #include -#include -#include #include #include #include @@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(test_uniform_int) level_three uint1_4(uint05, int_gen(1, 4)); check_uniform_int(uint1_4, 100000); - typedef BOOST_RANDOM_UNIFORM_INT int8_gen; + typedef BOOST_RANDOM_UNIFORM_INT int8_gen; typedef boost::random::variate_generator gen8_t; gen8_t gen8_03(gen, int8_gen(0, 3)); @@ -107,7 +107,7 @@ class ruetti_gen { public: ruetti_gen() : state((max)() - 1) {} - typedef boost::uint64_t result_type; + typedef std::uint64_t result_type; result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; } result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } result_type operator()() { return state--; } diff --git a/test/test_uniform_int_distribution.cpp b/test/test_uniform_int_distribution.cpp index 5863163b0..47a412037 100644 --- a/test/test_uniform_int_distribution.cpp +++ b/test/test_uniform_int_distribution.cpp @@ -10,7 +10,6 @@ */ #include -#include #define BOOST_RANDOM_DISTRIBUTION boost::random::uniform_int_distribution<> #define BOOST_RANDOM_ARG1 a diff --git a/test/test_uniform_on_sphere_distribution.cpp b/test/test_uniform_on_sphere_distribution.cpp index 2b966bccf..a45c47e8b 100644 --- a/test/test_uniform_on_sphere_distribution.cpp +++ b/test/test_uniform_on_sphere_distribution.cpp @@ -12,8 +12,6 @@ #include #include -#include - #define BOOST_RANDOM_DISTRIBUTION boost::random::uniform_on_sphere<> #define BOOST_RANDOM_ARG1 dim #define BOOST_RANDOM_ARG1_DEFAULT 2 diff --git a/test/test_uniform_smallint_distribution.cpp b/test/test_uniform_smallint_distribution.cpp index d943ebfb2..b838c5645 100644 --- a/test/test_uniform_smallint_distribution.cpp +++ b/test/test_uniform_smallint_distribution.cpp @@ -10,7 +10,6 @@ */ #include -#include #define BOOST_RANDOM_DISTRIBUTION boost::random::uniform_smallint<> #define BOOST_RANDOM_ARG1 a