Package org.jenetics.util

Examples of org.jenetics.util.LCG64ShiftRandom.nextDouble()


    final Random random = new LCG64ShiftRandom(1234);
    final Quantile<Double> quantile = new Quantile<>(q);

    final int N = 2_000_000;
    for (int i = 0; i < N; ++i) {
      quantile.accumulate(random.nextDouble());
    }

    Assert.assertEquals(quantile.getSamples(), N);
    Assert.assertEquals(quantile.getValue(), q, 1.0/sqrt(N));
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.