Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RandomSource"/> class using
 /// the value of <see cref="Control.ThreadSafeRandomNumberGenerators"/> to set whether
 /// the instance is thread safe or not.
 /// </summary>
 protected RandomSource() : base(RandomSeed.Robust())
 {
     _threadSafe = Control.ThreadSafeRandomNumberGenerators;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mcg31m1"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 public Mcg31m1() : this(RandomSeed.Robust())
 {
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mcg31m1"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 public Mcg31m1(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
 /// <summary>
 /// Construct a new random number generator with a random seed.
 /// </summary>
 public Xoshiro256StarStar() : this(RandomSeed.Robust())
 {
 }
 /// <summary>
 /// Construct a new random number generator with random seed.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 public Xoshiro256StarStar(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WH1982"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 public WH1982() : this(RandomSeed.Robust())
 {
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WH1982"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 public WH1982(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #8
0
        const double Reciprocal = 1.0 / 4294967296.0; // 1.0/(uint.MaxValue + 1.0)

        /// <summary>
        /// Initializes a new instance of the <see cref="Palf"/> class using
        /// a seed based on time and unique GUIDs.
        /// </summary>
        /// <remarks>If the seed value is zero, it is set to one. Uses the
        /// value of <see cref="Control.ThreadSafeRandomNumberGenerators"/> to
        /// set whether the instance is thread safe.</remarks>
        public Palf() : this(RandomSeed.Robust(), Control.ThreadSafeRandomNumberGenerators, DefaultShortLag, DefaultLongLag)
        {
        }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Palf"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 public Palf(bool threadSafe) : this(RandomSeed.Robust(), threadSafe, DefaultShortLag, DefaultLongLag)
 {
 }
Example #10
0
 /// <summary>
 /// Construct a new random number generator with random seed.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 public SystemRandomSource(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #11
0
 /// <summary>
 /// Construct a new random number generator with a random seed.
 /// </summary>
 public SystemRandomSource() : this(RandomSeed.Robust())
 {
 }
Example #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WH2006"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 public WH2006() : this(RandomSeed.Robust())
 {
 }
Example #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MersenneTwister"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 public MersenneTwister(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MersenneTwister"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 /// <remarks>If the seed value is zero, it is set to one. Uses the
 /// value of <see cref="Control.ThreadSafeRandomNumberGenerators"/> to
 /// set whether the instance is thread safe.</remarks>
 public MersenneTwister() : this(RandomSeed.Robust())
 {
 }