Package org.spaceroots.mantissa.random

Examples of org.spaceroots.mantissa.random.ScalarSampleStatistics


//    assertEquals(new String(bytes, "UTF-8"), new String(SEED_OUTPUT_YARROW_FILE, "UTF-8"));
//  }

  public void testDouble() {
    Yarrow y = new Yarrow(SEED_FILE, "SHA1", "Rijndael", false, false, false);
    ScalarSampleStatistics sample = new ScalarSampleStatistics();

    for(int i = 0; i < 10000; ++i) {
      sample.add(y.nextDouble());
    }

    assertEquals(0.5, sample.getMean(), 0.02);
    assertEquals(1.0 / (2.0 * Math.sqrt(3.0)), sample.getStandardDeviation(), 0.002);
  }
View Full Code Here

TOP

Related Classes of org.spaceroots.mantissa.random.ScalarSampleStatistics

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.