From 09bff1e262fc97a452a12540d51d83df9dc9b440 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Sun, 10 Nov 2013 22:13:25 +0900 Subject: [PATCH] fix min/max use --- sprout/math/equal_to.hpp | 2 +- sprout/random/generate_canonical.hpp | 10 +++++----- sprout/random/seed_array.hpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sprout/math/equal_to.hpp b/sprout/math/equal_to.hpp index 0bf6fe13..4296d400 100644 --- a/sprout/math/equal_to.hpp +++ b/sprout/math/equal_to.hpp @@ -11,10 +11,10 @@ #include #include #include -#include #include #include #include +#include namespace sprout { namespace math { diff --git a/sprout/random/generate_canonical.hpp b/sprout/random/generate_canonical.hpp index f1ed7305..8b856462 100644 --- a/sprout/random/generate_canonical.hpp +++ b/sprout/random/generate_canonical.hpp @@ -13,13 +13,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT namespace sprout { namespace random { @@ -32,7 +32,7 @@ namespace sprout { RealType mult = r; RealType limit = sprout::math::pow( RealType(2), - RealType(sprout::min(bits, static_cast(sprout::numeric_limits::digits))) + RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) ); RealType s = RealType(sprout::random::detail::subtract()(static_cast(rng()), rng.min())); while (mult < limit) { @@ -51,7 +51,7 @@ namespace sprout { RealType r = sprout::math::pow(RealType(2), RealType(sprout::random::detail::generator_bits::value())); RealType limit = sprout::math::pow( RealType(2), - RealType(sprout::min(bits, static_cast(sprout::numeric_limits::digits))) + RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) ); RealType s = RealType(static_cast(rng()) - rng.min()); RealType mult = r; @@ -123,7 +123,7 @@ namespace sprout { RealType(rng.max()) - RealType(rng.min()) + 1, sprout::math::pow( RealType(2), - RealType(sprout::min(bits, static_cast(sprout::numeric_limits::digits))) + RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) ), rng() ); @@ -169,7 +169,7 @@ namespace sprout { sprout::math::pow(RealType(2), RealType(sprout::random::detail::generator_bits::value())), sprout::math::pow( RealType(2), - RealType(sprout::min(bits, static_cast(sprout::numeric_limits::digits))) + RealType(NS_SSCRISK_CEL_OR_SPROUT::min(bits, static_cast(sprout::numeric_limits::digits))) ), rng() ); diff --git a/sprout/random/seed_array.hpp b/sprout/random/seed_array.hpp index e2a81e37..f44113a9 100644 --- a/sprout/random/seed_array.hpp +++ b/sprout/random/seed_array.hpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT namespace sprout { namespace random { @@ -278,7 +278,7 @@ namespace sprout { sprout::fill(begin, end, static_cast(0x8b8b8b8bu)); size_type n = end - begin; size_type s = size(); - size_type m = sprout::max(s + 1, n); + size_type m = NS_SSCRISK_CEL_OR_SPROUT::max(s + 1, n); size_type t = tval(n); size_type p = (n - t) / 2; size_type q = p + t;