public RandomChannel(ulong seed) { Mtf = new MersenneTwisterFast(); Mtf.Initialize(seed); GetNextULong = Mtf.genrand_int32; }
public RandomChannel(ulong[] initArray) { Mtf = new MersenneTwisterFast(); Mtf.Initialize(initArray); GetNextULong = Mtf.genrand_int32; }
/// <summary> /// Creates a RandomServer with a specified hyperSeed and default buffer size. /// </summary> /// <param name="hyperSeed">This is the seed that will initialize the PRNG that /// provides seeds for RandomChannels that do not have a specified seed. This is /// a way of having an entire model's sequence be repeatable without having to /// hard code all of the RC's seed values.</param> /// <param name="defaultBufferSize">The buffer size that will be applied to channels /// that do not have an explicit buffer size specified. This provides a good way /// to switch the entire model's buffering scheme on or off at one location.</param> // ReSharper disable once UnusedParameter.Local public RandomServer(ulong hyperSeed, int defaultBufferSize = 0) { m_defaultBufferSize = 0;// defaultBufferSize; m_seedGenerator = new MersenneTwisterFast(); m_seedGenerator.Initialize(hyperSeed); }