One - One Code All

Blog Content

java线性代数正态分布org.apache.commons.math3.distribution.NormalDistribution

Java   2013-11-14 18:09:34

参考文档:https://commons.apache.org/proper/commons-math/javadocs/api-3.2/org/apache/commons/math3/distribution/NormalDistribution.html#sample()


 sample

public double sample()

    Generate a random value sampled from this distribution. The default implementation uses the inversion method.

    Specified by:
        sample in interface RealDistribution
    Overrides:
        sample in class AbstractRealDistribution

    Returns:
        a random value.


double[] samples = new NormDistSample(mean,sd).sample(sampleSize);


上一篇:java科学计算线性代数库org.jblas.DoubleMatrix.mmul()
下一篇:maven settings.xml配置

The minute you think of giving up, think of the reason why you held on so long.