Example #1
0
 /// <summary>
 /// Initializes a new instance of the  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 Mrg32k3a(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xorshift"/> 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>
 /// <param name="a">The multiply value</param>
 /// <param name="c">The initial carry value.</param>
 /// <param name="x1">The initial value if X1.</param>
 /// <param name="x2">The initial value if X2.</param>
 /// <remarks><paramref name="c"/> must be less than <paramref name="a"/>.</remarks>
 public Xorshift(bool threadSafe, long a, long c, long x1, long x2) : this(RandomSeed.Robust(), threadSafe, a, c, x1, x2)
 {
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the 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 true to
 /// set whether the instance is thread safe.</remarks>
 public Mrg32k3a() : this(RandomSeed.Robust())
 {
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xorshift"/> class using
 /// a seed based on time and unique GUIDs.
 /// </summary>
 /// <param name="a">The multiply value</param>
 /// <param name="c">The initial carry value.</param>
 /// <param name="x1">The initial value if X1.</param>
 /// <param name="x2">The initial value if X2.</param>
 /// <remarks>If the seed value is zero, it is set to one. Uses the
 /// value of true to
 /// set whether the instance is thread safe.
 /// Note: <paramref name="c"/> must be less than <paramref name="a"/>.
 /// </remarks>
 public Xorshift(long a, long c, long x1, long x2) : this(RandomSeed.Robust(), a, c, x1, x2)
 {
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xorshift"/> 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>
 /// <remarks>
 /// Uses the default values of:
 /// <list>
 /// <item>a = 916905990</item>
 /// <item>c = 13579</item>
 /// <item>X1 = 77465321</item>
 /// <item>X2 = 362436069</item>
 /// </list></remarks>
 public Xorshift(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WH2006"/> 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 WH2006(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Xorshift"/> 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 true to
 /// set whether the instance is thread safe.
 /// Uses the default values of:
 /// <list>
 /// <item>a = 916905990</item>
 /// <item>c = 13579</item>
 /// <item>X1 = 77465321</item>
 /// <item>X2 = 362436069</item>
 /// </list></remarks>
 public Xorshift() : this(RandomSeed.Robust())
 {
 }
Example #8
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 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RandomSource"/> class.
 /// </summary>
 /// <param name="threadSafe">if set to <c>true</c> , the class is thread safe.</param>
 /// <remarks>Thread safe instances are two and half times slower than non-thread
 /// safe classes.</remarks>
 protected RandomSource(bool threadSafe) : base(RandomSeed.Robust())
 {
     _threadSafe = threadSafe;
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RandomSource"/> class using
 /// the value of true to set whether
 /// the instance is thread safe or not.
 /// </summary>
 protected RandomSource() : base(RandomSeed.Robust())
 {
     _threadSafe = true;
 }
Example #11
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 #12
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 true to
 /// set whether the instance is thread safe.</remarks>
 public MersenneTwister() : this(RandomSeed.Robust())
 {
 }