Example usage for org.apache.commons.math.random MersenneTwister nextGaussian

List of usage examples for org.apache.commons.math.random MersenneTwister nextGaussian

Introduction

In this page you can find the example usage for org.apache.commons.math.random MersenneTwister nextGaussian.

Prototype

public double nextGaussian() 

Source Link

Usage

From source file:net.sourceforge.jags.model.ModelTest.java

static double[] normalSample() {
    MersenneTwister rng = new MersenneTwister();
    double rval[] = new double[1000];
    for (int i = 0; i < rval.length; ++i) {
        rval[i] = rng.nextGaussian();
    }/*from w  w w.  j a  v  a  2  s  .c  o m*/
    return rval;
}