2
0
mirror of https://github.com/boostorg/random.git synced 2026-02-09 23:32:31 +00:00

Sync shuffle_order_engine with C++0x.

[SVN r63327]
This commit is contained in:
Steven Watanabe
2010-06-25 21:23:20 +00:00
parent 581361f3df
commit f702db6d89
6 changed files with 290 additions and 216 deletions

View File

@@ -50,6 +50,7 @@ bool check_(unsigned long x, const boost::mt11213b&) { return x == 3809585648U;
bool check_(unsigned long x, const boost::mt19937&) { return x == 4123659995U; }
#if !defined(BOOST_NO_INT64_T) && !defined(BOOST_NO_INTEGRAL_INT64_T)
// validation from the C++0x draft (n3090)
bool check_(boost::uint64_t x, const boost::mt19937_64&) { return x == UINT64_C(9981545732273789042); }
#endif
@@ -73,6 +74,9 @@ bool check_(int x, const boost::ecuyer1988&) { return x == 2060321752; }
// validation by experiment from Harry Erwin's generator.h (private e-mail)
bool check_(unsigned int x, const boost::kreutzer1986&) { return x == 139726; }
// validation from the C++0x draft (n3090)
bool check_(unsigned int x, const boost::random::knuth_b&) { return x == 1112339016; }
bool check_(double x, const boost::lagged_fibonacci607&) { return std::abs(x-0.401269) < 1e-5; }
// principal operation validated with CLHEP, values by experiment
@@ -126,6 +130,7 @@ void validate_all()
validate("mt19937_64", mt19937_64());
#endif
validate("kreutzer1986", kreutzer1986());
validate("knuth_b", boost::random::knuth_b());
validate("ranlux3", ranlux3());
validate("ranlux4", ranlux4());
validate("ranlux3_01", ranlux3_01());