List of usage examples for org.apache.commons.math.random RandomDataImpl nextCauchy
public double nextCauchy(double median, double scale) throws MathException
From source file:datafu.pig.hash.lsh.p_stable.L1LSH.java
/** * Draw a sample s ~ Cauchy(0,1), which is 1-stable. * //from ww w. j a v a2 s. co m * @return a sample from a cauchy distribution with median 0 and scale 1 */ public double sample(RandomDataImpl randomData) throws MathException { return randomData.nextCauchy(0, 1); }