|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-08-13 05:14:20
Author: johnmaddock
Date: 2008-08-13 05:14:19 EDT (Wed, 13 Aug 2008)
New Revision: 48121
URL: http://svn.boost.org/trac/boost/changeset/48121
Log:
Adjust run_random test to be TR1 conforming (zero argument to seed isn't required by TR1) and make default parameters for mersenne_twister consistent.
Text files modified:
trunk/boost/tr1/random.hpp | 2 +-
trunk/libs/tr1/test/run_random.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Modified: trunk/boost/tr1/random.hpp
==============================================================================
--- trunk/boost/tr1/random.hpp (original)
+++ trunk/boost/tr1/random.hpp 2008-08-13 05:14:19 EDT (Wed, 13 Aug 2008)
@@ -133,7 +133,7 @@
// constructors and member function
mersenne_twister(){}
explicit mersenne_twister(unsigned long value)
- : m_gen(value == 0 ? 4357UL : value){}
+ : m_gen(value == 0 ? 5489UL : value){}
template<class Gen> mersenne_twister(Gen& g)
{
init1(g, ::boost::is_same<mersenne_twister,Gen>());
Modified: trunk/libs/tr1/test/run_random.cpp
==============================================================================
--- trunk/libs/tr1/test/run_random.cpp (original)
+++ trunk/libs/tr1/test/run_random.cpp 2008-08-13 05:14:19 EDT (Wed, 13 Aug 2008)
@@ -92,7 +92,7 @@
a1 = a2;
validate("mt11213b", a2, 3809585648u);
validate("mt11213b", a1, 3809585648u);
- a1.seed(0u);
+ a1.seed(5489UL);
validate("mt11213b", a1, 3809585648u);
a1 = mt11213b(5489u);
validate("mt11213b", a1, 3809585648u);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk