コード例 #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;
 }
コード例 #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())
 {
 }
コード例 #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)
 {
 }
コード例 #4
0
 /// <summary>
 /// Construct a new random number generator with a random seed.
 /// </summary>
 public Xoshiro256StarStar() : this(RandomSeed.Robust())
 {
 }
コード例 #5
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 Xoshiro256StarStar(bool threadSafe) : this(RandomSeed.Robust(), threadSafe)
 {
 }
コード例 #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())
 {
 }
コード例 #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)
 {
 }
コード例 #8
0
ファイル: Palf.cs プロジェクト: simple555a/Solarfist
        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)
        {
        }
コード例 #9
0
ファイル: Palf.cs プロジェクト: simple555a/Solarfist
 /// <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)
 {
 }
コード例 #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)
 {
 }
コード例 #11
0
 /// <summary>
 /// Construct a new random number generator with a random seed.
 /// </summary>
 public SystemRandomSource() : this(RandomSeed.Robust())
 {
 }
コード例 #12
0
ファイル: WH2006.cs プロジェクト: simple555a/Solarfist
 /// <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())
 {
 }
コード例 #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)
 {
 }
コード例 #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())
 {
 }