ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/math/MersenneTwister.hpp
(Generate patch)

Comparing trunk/OOPSE-2.0/src/math/MersenneTwister.hpp (file contents):
Revision 2068 by tim, Tue Mar 1 19:11:47 2005 UTC vs.
Revision 2076 by tim, Wed Mar 2 15:36:14 2005 UTC

# Line 88 | Line 88 | class MTRand { (public)
88  
89   //Methods
90   public:
91 <        MTRand( const uint32& oneSeed, int nstrides = 1, int stride = 0);  // initialize with a simple uint32
92 <        MTRand( uint32 *const bigSeed, uint32 const seedLength = N, int nstrides = 1, int stride = 0);  // or an array
93 <        MTRand(int nstrides = 1, int stride = 0);  // auto-initialize with /dev/urandom or time() and clock()
91 >        MTRand( const uint32& oneSeed, int nstrides, int stride);  // initialize with a simple uint32
92 >        MTRand( uint32 *const bigSeed, uint32 const seedLength, int nstrides, int stride);  // or an array
93 >        MTRand(int nstrides, int stride);  // auto-initialize with /dev/urandom or time() and clock()
94          
95          // Do NOT use for CRYPTOGRAPHY without securely hashing several returned
96          // values together, otherwise the generator state can be learned after
# Line 198 | Line 198 | inline MTRand::uint32 MTRand::randInt() {
198   */
199   inline MTRand::uint32 MTRand::randInt() {
200  
201 <  uint32 ranNums[nstrides_];
201 >  std::vector<uint32> ranNums(nstrides_);
202    
203    for (int i = 0; i < nstrides_; ++i) {
204      ranNums[i] = rawRandInt();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines