mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix warning (for -Wextra)
This commit is contained in:
parent
49243e6c94
commit
57e35349e5
146 changed files with 459 additions and 499 deletions
|
@ -139,7 +139,7 @@ namespace sprout {
|
|||
}
|
||||
static SPROUT_CONSTEXPR btrd_type
|
||||
init_btrd_6(
|
||||
IntType t, RealType p, RealType r, RealType nr, RealType npq,
|
||||
IntType, RealType, RealType r, RealType nr, RealType npq,
|
||||
RealType b, RealType a, RealType c, RealType alpha, RealType v_r
|
||||
)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_10(Engine const& eng, RealType v, IntType k, IntType nm, RealType h, IntType nk) const {
|
||||
generate_10(Engine const&, RealType, IntType, IntType, RealType, IntType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -269,7 +269,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_9(Engine const& eng, RealType v, IntType k, IntType nm) const {
|
||||
generate_9(Engine const&, RealType, IntType, IntType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -282,7 +282,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_8(Engine const& eng, RealType v, IntType k, RealType rho, RealType t) const {
|
||||
generate_8(Engine const&, RealType, IntType, RealType, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -295,7 +295,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_7_3(Engine const& eng, RealType v, IntType k, RealType f) const {
|
||||
generate_7_3(Engine const&, RealType, IntType, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -308,7 +308,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_7_2(Engine const& eng, RealType v, IntType k, RealType f, IntType i) const {
|
||||
generate_7_2(Engine const&, RealType, IntType, RealType, IntType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -321,7 +321,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_7_1(Engine const& eng, RealType v, IntType k, RealType f, IntType i) const {
|
||||
generate_7_1(Engine const&, RealType, IntType, RealType, IntType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -334,7 +334,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_7(Engine const& eng, RealType v, IntType k, RealType f = RealType(1)) const {
|
||||
generate_7(Engine const&, RealType, IntType, RealType = RealType(1)) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -350,12 +350,12 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_6(Engine const& eng, RealType v, IntType k, RealType km) const {
|
||||
generate_6(Engine const&, RealType, IntType, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_5(Engine const& eng, RealType v, RealType u, RealType us, IntType k) const {
|
||||
generate_5(Engine const& eng, RealType v, RealType us, IntType k) const {
|
||||
return k < 0 || k > t_
|
||||
? generate<D + 1>(eng)
|
||||
: generate_6<D + 1>(eng, v * btrd_.alpha / (btrd_.a / (us * us) + btrd_.b), k, sprout::abs(k - m_))
|
||||
|
@ -363,17 +363,17 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_5(Engine const& eng, RealType v, RealType u, RealType us, IntType k) const {
|
||||
generate_5(Engine const&, RealType, RealType, IntType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_4(Engine const& eng, RealType v, RealType u, RealType us) const {
|
||||
return generate_5<D + 1>(eng, v, u, us, static_cast<IntType>(sprout::math::floor((2 * btrd_.a / us + btrd_.b) * u + btrd_.c)));
|
||||
return generate_5<D + 1>(eng, v, us, static_cast<IntType>(sprout::math::floor((2 * btrd_.a / us + btrd_.b) * u + btrd_.c)));
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_4(Engine const& eng, RealType v, RealType u, RealType us) const {
|
||||
generate_4(Engine const&, RealType, RealType, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -383,7 +383,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_3(Engine const& eng, RealType v, RealType u) const {
|
||||
generate_3(Engine const&, RealType, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, typename Random, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -402,7 +402,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, typename Random, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_2(Random const& rnd, RealType v) const {
|
||||
generate_2(Random const&, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -415,7 +415,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_1_1(Engine const& eng, RealType u) const {
|
||||
generate_1_1(Engine const&, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -428,7 +428,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_1(Engine const& eng, RealType v) const {
|
||||
generate_1(Engine const&, RealType) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, typename Engine, typename Random, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -438,7 +438,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, typename Random, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_0(Random const& rnd) const {
|
||||
generate_0(Random const&) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D = 16, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -448,7 +448,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D = 16, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate(Engine const& eng) const {
|
||||
generate(Engine const&) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
#else
|
||||
|
@ -521,7 +521,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Engine>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, binomial_distribution>
|
||||
generate_5(Engine const& eng, RealType v, RealType u, RealType us, IntType k) const {
|
||||
generate_5(Engine const& eng, RealType v, RealType, RealType us, IntType k) const {
|
||||
return k < 0 || k > t_
|
||||
? generate(eng)
|
||||
: generate_6(eng, v * btrd_.alpha / (btrd_.a / (us * us) + btrd_.b), k, sprout::abs(k - m_))
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace sprout {
|
|||
return n == 0 ? m - l1 : invert_euclidian_1<D + 1>(c, l1, l2, n, p);
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian_3(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian_3(IntType, IntType, IntType, IntType, IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -67,7 +67,7 @@ namespace sprout {
|
|||
return p == 0 ? l2 : invert_euclidian_3<D + 1>(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p);
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian_2(IntType, IntType, IntType, IntType, IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -75,7 +75,7 @@ namespace sprout {
|
|||
return invert_euclidian_2<D + 1>(c, l1 + (p / n) * l2, l2, n, p - (p / n) * n);
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian_1(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian_1(IntType, IntType, IntType, IntType, IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D = 16, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -85,7 +85,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<int D = 16, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian(IntType c) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian(IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -93,7 +93,7 @@ namespace sprout {
|
|||
return n == 0 ? m - l1 : invert_euclidian0_2<D + 1>(c, l1 + (p / n) * l2, l2, n, p - (p / n) * n);
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_3(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_3(IntType, IntType, IntType, IntType, IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -101,11 +101,11 @@ namespace sprout {
|
|||
return p == 0 ? l2 : invert_euclidian0_3<D + 1>(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p);
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_2(IntType, IntType, IntType, IntType, IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n) {
|
||||
return SPROUT_ASSERT_MSG(std::numeric_limits<IntType>::max() % n != n - 1, "c must be relatively prime to m."),
|
||||
invert_euclidian0_2<D + 1>(
|
||||
c, l1 + (std::numeric_limits<IntType>::max() / n) * l2, l2, n,
|
||||
|
@ -114,17 +114,17 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<int D, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType, IntType, IntType, IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D = 16, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType c) {
|
||||
return SPROUT_ASSERT(c > 0),
|
||||
c == 1 ? 1 : invert_euclidian0_1<D + 1>(c, 0, 1, c, m)
|
||||
c == 1 ? 1 : invert_euclidian0_1<D + 1>(c, 0, 1, c)
|
||||
;
|
||||
}
|
||||
template<int D = 16, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType c) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType) {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
#else
|
||||
|
@ -148,7 +148,7 @@ namespace sprout {
|
|||
static SPROUT_CONSTEXPR IntType invert_euclidian0_2(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
return p == 0 ? l2 : invert_euclidian0_3(c, l1, l2 + (n / p) * l1, n - (n / p) * p, p);
|
||||
}
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n, IntType p) {
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0_1(IntType c, IntType l1, IntType l2, IntType n) {
|
||||
return SPROUT_ASSERT_MSG(std::numeric_limits<IntType>::max() % n != n - 1, "c must be relatively prime to m."),
|
||||
invert_euclidian0_2(
|
||||
c, l1 + (std::numeric_limits<IntType>::max() / n) * l2, l2, n,
|
||||
|
@ -158,7 +158,7 @@ namespace sprout {
|
|||
}
|
||||
static SPROUT_CONSTEXPR IntType invert_euclidian0(IntType c) {
|
||||
return SPROUT_ASSERT(c > 0),
|
||||
c == 1 ? 1 : invert_euclidian0_1(c, 0, 1, c, m)
|
||||
c == 1 ? 1 : invert_euclidian0_1(c, 0, 1, c)
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace sprout {
|
|||
sizeof...(Args) == n,
|
||||
sprout::array<UIntType, n>
|
||||
>::type
|
||||
rewind_finish_1(sprout::array<UIntType, n> const& data, Args const&... args) const {
|
||||
rewind_finish_1(sprout::array<UIntType, n> const&, Args const&... args) const {
|
||||
return sprout::array<UIntType, n>{{args...}};
|
||||
}
|
||||
template<typename... Args>
|
||||
|
@ -116,7 +116,7 @@ namespace sprout {
|
|||
sprout::array<UIntType, n>
|
||||
>::type
|
||||
rewind_finish(
|
||||
sprout::array<UIntType, n> const& data, UIntType const* last, std::size_t z, std::size_t i,
|
||||
sprout::array<UIntType, n> const&, UIntType const*, std::size_t, std::size_t,
|
||||
Args const&... args
|
||||
) const
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ namespace sprout {
|
|||
sprout::array<UIntType, n>
|
||||
>::type
|
||||
rewind_4(
|
||||
sprout::array<UIntType, n> const& data, UIntType const* last, std::size_t z, UIntType y0, UIntType y1, std::size_t i,
|
||||
sprout::array<UIntType, n> const&, UIntType const*, std::size_t, UIntType, UIntType, std::size_t,
|
||||
Args const&... args
|
||||
) const
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ namespace sprout {
|
|||
sprout::array<UIntType, n>
|
||||
>::type
|
||||
rewind_3(
|
||||
sprout::array<UIntType, n> const& data, UIntType const* last, std::size_t z, UIntType y0, UIntType y1, std::size_t i,
|
||||
sprout::array<UIntType, n> const&, UIntType const*, std::size_t, UIntType, UIntType, std::size_t,
|
||||
Args const&... args
|
||||
) const
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ namespace sprout {
|
|||
sprout::array<UIntType, n>
|
||||
>::type
|
||||
rewind_2(
|
||||
sprout::array<UIntType, n> const& data, UIntType const* last, std::size_t z, UIntType y0, std::size_t i,
|
||||
sprout::array<UIntType, n> const&, UIntType const*, std::size_t, UIntType, std::size_t,
|
||||
Args const&... args
|
||||
) const
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sizeof...(Args) == n - 1,
|
||||
mersenne_twister_engine
|
||||
>::type twist_4(std::size_t i, Args const&... args) const {
|
||||
>::type twist_4(std::size_t, Args const&... args) const {
|
||||
return twist_5(args...);
|
||||
}
|
||||
template<typename... Args>
|
||||
|
@ -317,7 +317,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sizeof...(Args) == n - 1 - unroll_extra2,
|
||||
mersenne_twister_engine
|
||||
>::type twist_3(std::size_t i, Args const&... args) const {
|
||||
>::type twist_3(std::size_t, Args const&... args) const {
|
||||
return twist_4(n - 1 - unroll_extra2, args...);
|
||||
}
|
||||
template<typename... Args>
|
||||
|
@ -333,7 +333,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sizeof...(Args) == n - m,
|
||||
mersenne_twister_engine
|
||||
>::type twist_2(std::size_t i, Args const&... args) const {
|
||||
>::type twist_2(std::size_t, Args const&... args) const {
|
||||
return twist_3(n - m, args...);
|
||||
}
|
||||
template<typename... Args>
|
||||
|
@ -349,7 +349,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sizeof...(Args) == n - m - unroll_extra1,
|
||||
mersenne_twister_engine
|
||||
>::type twist_1(std::size_t i, Args const&... args) const {
|
||||
>::type twist_1(std::size_t, Args const&... args) const {
|
||||
return twist_2(n - m - unroll_extra1, args...);
|
||||
}
|
||||
template<typename... Args>
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace sprout {
|
|||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
param_type& rhs
|
||||
param_type&
|
||||
)
|
||||
{
|
||||
return lhs;
|
||||
|
@ -39,12 +39,12 @@ namespace sprout {
|
|||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
param_type const& rhs
|
||||
param_type const&
|
||||
)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
friend SPROUT_CONSTEXPR bool operator==(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT {
|
||||
friend SPROUT_CONSTEXPR bool operator==(param_type const&, param_type const&) SPROUT_NOEXCEPT {
|
||||
return true;
|
||||
}
|
||||
friend SPROUT_CONSTEXPR bool operator!=(param_type const& lhs, param_type const& rhs) SPROUT_NOEXCEPT {
|
||||
|
@ -55,7 +55,7 @@ namespace sprout {
|
|||
#ifdef SPROUT_WORKAROUND_NOT_TERMINATE_RECURSIVE_CONSTEXPR_FUNCTION_TEMPLATE
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_01>
|
||||
generate_1(Engine const& eng, sprout::random::random_result<Engine> const& rnd, result_type result) const {
|
||||
generate_1(Engine const&, sprout::random::random_result<Engine> const& rnd, result_type result) const {
|
||||
return result < result_type(1)
|
||||
? sprout::random::random_result<Engine, uniform_01>(result, rnd.engine(), *this)
|
||||
: generate<D + 1>(rnd.engine(), rnd.engine()())
|
||||
|
@ -63,7 +63,7 @@ namespace sprout {
|
|||
}
|
||||
template<int D, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_01>
|
||||
generate_1(Engine const& eng, sprout::random::random_result<Engine> const& rnd, result_type result) const {
|
||||
generate_1(Engine const&, sprout::random::random_result<Engine> const&, result_type) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
template<int D = 16, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_CONTINUE(D)>
|
||||
|
@ -84,13 +84,13 @@ namespace sprout {
|
|||
}
|
||||
template<int D = 16, typename Engine, SPROUT_RECURSIVE_FUNCTION_TEMPLATE_BREAK(D)>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_01>
|
||||
generate(Engine const& eng, sprout::random::random_result<Engine> const& rnd) const {
|
||||
generate(Engine const&, sprout::random::random_result<Engine> const&) const {
|
||||
return sprout::throw_recursive_function_template_instantiation_exeeded();
|
||||
}
|
||||
#else
|
||||
template<typename Engine>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_01>
|
||||
generate_1(Engine const& eng, sprout::random::random_result<Engine> const& rnd, result_type result) const {
|
||||
generate_1(Engine const&, sprout::random::random_result<Engine> const& rnd, result_type result) const {
|
||||
return result < result_type(1)
|
||||
? sprout::random::random_result<Engine, uniform_01>(result, rnd.engine(), *this)
|
||||
: generate(rnd.engine(), rnd.engine()())
|
||||
|
@ -114,10 +114,8 @@ namespace sprout {
|
|||
}
|
||||
#endif
|
||||
public:
|
||||
explicit SPROUT_CONSTEXPR uniform_01()
|
||||
{}
|
||||
explicit SPROUT_CONSTEXPR uniform_01(param_type const& parm)
|
||||
{}
|
||||
explicit SPROUT_CONSTEXPR uniform_01() {}
|
||||
explicit SPROUT_CONSTEXPR uniform_01(param_type const&) {}
|
||||
SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT {
|
||||
return result_type(0);
|
||||
}
|
||||
|
@ -127,8 +125,7 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
|
||||
return param_type();
|
||||
}
|
||||
void param(param_type const& parm) {
|
||||
}
|
||||
void param(param_type const&) {}
|
||||
template<typename Engine>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_01> operator()(Engine const& eng) const {
|
||||
return generate(eng, eng());
|
||||
|
@ -136,7 +133,7 @@ namespace sprout {
|
|||
template<typename Elem, typename Traits>
|
||||
friend std::basic_istream<Elem, Traits>& operator>>(
|
||||
std::basic_istream<Elem, Traits>& lhs,
|
||||
uniform_01& rhs
|
||||
uniform_01&
|
||||
)
|
||||
{
|
||||
return lhs;
|
||||
|
@ -144,12 +141,12 @@ namespace sprout {
|
|||
template<typename Elem, typename Traits>
|
||||
friend std::basic_ostream<Elem, Traits>& operator<<(
|
||||
std::basic_ostream<Elem, Traits>& lhs,
|
||||
uniform_01 const& rhs
|
||||
uniform_01 const&
|
||||
)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
friend SPROUT_CONSTEXPR bool operator==(uniform_01 const& lhs, uniform_01 const& rhs) SPROUT_NOEXCEPT {
|
||||
friend SPROUT_CONSTEXPR bool operator==(uniform_01 const&, uniform_01 const&) SPROUT_NOEXCEPT {
|
||||
return true;
|
||||
}
|
||||
friend SPROUT_CONSTEXPR bool operator!=(uniform_01 const& lhs, uniform_01 const& rhs) SPROUT_NOEXCEPT {
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace sprout {
|
|||
template<typename Engine, typename T, typename RangeType, typename BaseResult, typename BaseUnsigned, typename Result>
|
||||
inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result<T, Engine>
|
||||
generate_uniform_int_true_2_2(
|
||||
Engine const& eng, T min_value, RangeType range,
|
||||
Engine const&, T min_value, RangeType range,
|
||||
BaseResult bmin, BaseUnsigned brange, RangeType result, RangeType mult, Result const& result_increment_base
|
||||
)
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ namespace sprout {
|
|||
template<typename Engine, typename T, typename RangeType, typename BaseResult, typename BaseUnsigned>
|
||||
inline SPROUT_CONSTEXPR sprout::random::detail::generate_uniform_int_result<T, Engine>
|
||||
generate_uniform_int_true_1(
|
||||
Engine const& eng, T min_value, T max_value, RangeType range,
|
||||
Engine const& eng, T min_value, T, RangeType range,
|
||||
BaseResult bmin, BaseUnsigned brange
|
||||
)
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename Engine, typename RangeType, typename BaseUnsigned>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_smallint> generate_true_2(
|
||||
Engine const& eng,
|
||||
Engine const&,
|
||||
sprout::random::random_result<Engine> const& rnd,
|
||||
RangeType range,
|
||||
BaseUnsigned base_range,
|
||||
|
@ -139,7 +139,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Engine, typename RangeType>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, uniform_smallint> generate_false_2(
|
||||
Engine const& eng,
|
||||
Engine const&,
|
||||
sprout::random::random_result<Engine, sprout::random::uniform_01<typename Engine::result_type> > const& rnd,
|
||||
RangeType range,
|
||||
RangeType offset
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace sprout {
|
|||
sizeof...(Args) + 1 == N,
|
||||
sprout::array<std::size_t, N>
|
||||
>::type
|
||||
make_seed_seq_impl(T const& v, std::size_t seed, Args const&... args) {
|
||||
make_seed_seq_impl(T const&, std::size_t seed, Args const&... args) {
|
||||
return sprout::array<std::size_t, N>{{args..., seed}};
|
||||
}
|
||||
template<std::size_t N, typename T, typename... Args>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue