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

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

Introduction

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

Prototype

public double nextGaussian(double mu, double sigma) 

Source Link

Document

Generate a random value from a Normal (a.k.a.

Usage

From source file:datafu.pig.hash.lsh.p_stable.L2LSH.java

/**
 * Draw a sample s ~ Gaussian(0,1), which is 2-stable.
 * //  ww  w  . j a  v a  2  s.  c o  m
 * @return a sample from a Gaussian distribution with mu of 0 and sigma of 1
 */
public double sample(RandomDataImpl randomData) {
    return randomData.nextGaussian(0, 1);
}