Package org.apache.commons.math.random

Examples of org.apache.commons.math.random.MersenneTwister


    case SUPER_DUPER:
      throw new EvalException(rng.RNG_kind + " not implemented yet");

    case MERSENNE_TWISTER:
      if (rng.mersenneTwisterAlg == null) {
        rng.mersenneTwisterAlg = new MersenneTwister(seed);
      } else {
        rng.mersenneTwisterAlg.setSeed(seed);
      }
      return;
View Full Code Here


    case MERSENNE_TWISTER:
      if (mersenneTwisterAlg == null) {
        if (this.randomseed == 0) {
          Randomize(RNG_kind);
        }
        mersenneTwisterAlg = new MersenneTwister((long) this.randomseed);
      }
      return (mersenneTwisterAlg.nextDouble());

    case KNUTH_TAOCP:
    case KNUTH_TAOCP2:
View Full Code Here

    case SUPER_DUPER:
      throw new EvalException(RNG_kind + " not implemented yet");

    case MERSENNE_TWISTER:
      if (mersenneTwisterAlg == null) {
        mersenneTwisterAlg = new MersenneTwister(sseed);
      } else {
        mersenneTwisterAlg.setSeed(sseed);
      }
      return;
View Full Code Here

    private RandomGenerator generator;

    @Before
    public void setUp() {
        field = new DfpField(40);
        generator = new MersenneTwister(6176597458463500194l);
    }
View Full Code Here

  @Override
  public Iterator<List<StoreFile>> iterator() {
    return new Iterator<List<StoreFile>>() {
      private GaussianRandomGenerator gen =
          new GaussianRandomGenerator(new MersenneTwister(random.nextInt()));
      private int count = 0;

      @Override
      public boolean hasNext() {
        return count < MAX_FILE_GEN_ITERS;
View Full Code Here

  static final class ThreadLocalGeneratorHolder extends ThreadLocal<RandomGenerator>
  {
    @Override
    public RandomGenerator initialValue()
    {
      return new MersenneTwister(seedUniquifier.getAndIncrement() + System.nanoTime());
    }
View Full Code Here

     * @return RandomGenerator
     */
    @Override
    public RandomGenerator initialValue()
    {
      return new MersenneTwister(seedUniquifier.getAndIncrement() + System.nanoTime());
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.random.MersenneTwister

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.