public void Uniform()
        {
            var rng = new RNG_MT19937(1234);

            Assert.AreEqual(5, rng.Uniform(0, 10));
            Assert.AreEqual(1, rng.Uniform(0, 10));
            Assert.AreEqual(6, rng.Uniform(0, 10));
        }
Esempio n. 2
0
        public void Uniform()
        {
            var rng = new RNG_MT19937(1234);

            Assert.AreEqual(5, rng.Uniform(0, 10));
            Assert.AreEqual(1, rng.Uniform(0, 10));
            Assert.AreEqual(6, rng.Uniform(0, 10));
        }
        public void Next()
        {
            var rng = new RNG_MT19937(0xffffffff);

            Assert.AreEqual(419326371, rng.Next());
            Assert.AreEqual(479346978, rng.Next());
            Assert.AreEqual(3918654476, rng.Next());
        }
Esempio n. 4
0
        public void Next()
        {
            var rng = new RNG_MT19937(0xffffffff);

            Assert.AreEqual(419326371, rng.Next());
            Assert.AreEqual(479346978, rng.Next());
            Assert.AreEqual(3918654476, rng.Next());
        }