Package ec.util

Examples of ec.util.MersenneTwisterFast


      seed[i] = (base[i * 4 + 0] & 0xFF) << 24 |
            (base[i * 4 + 1] & 0xFF) << 16 |
            (base[i * 4 + 2] & 0xFF) << 8 |
             base[i * 4 + 3] & 0xFF;
    }
    this.twister = new MersenneTwisterFast(seed);
  }
View Full Code Here


                        if (seeds[x]==seeds[y])
                           
                            {
                            Output.initialError(Evolve.P_SEED+"."+x+" ("+seeds[x]+") and "+Evolve.P_SEED+"."+y+" ("+seeds[y]+") ought not be the same seed.");
                            }
                    random[x] = Evolve.primeGenerator(new MersenneTwisterFast(seeds[x]));   // we prime the generator to be more sure of randomness.
                    }
               
                state = (EvolutionState)parameters.getInstanceForParameter(
                    new Parameter(Evolve.P_STATE),null,EvolutionState.class);
               
View Full Code Here

     * specified seed.
     *
     * @param seed The seed to use
     */
    public MersenneRandom(long seed) {
        mersenne = new MersenneTwisterFast(seed);
    }
View Full Code Here

    /**
     * Initializes a new instance of the random number generator using
     * "System.currentTimeMillis()" as seed.
     */
    public MersenneRandom() {
        mersenne = new MersenneTwisterFast();
    }
View Full Code Here

     * the array is shorter than this then integers are repeatedly used in a
     * wrap-around fashion.
     * @param array the seed value
     */
    public MersenneRandom(int[] array) {
        mersenne = new MersenneTwisterFast(array);
    }
View Full Code Here

TOP

Related Classes of ec.util.MersenneTwisterFast

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.