org.apache.mahout.math.jet.random
Class AbstractContinousDistribution
java.lang.Object
org.apache.mahout.math.function.DoubleFunction
org.apache.mahout.math.jet.random.AbstractDistribution
org.apache.mahout.math.jet.random.AbstractContinousDistribution
- All Implemented Interfaces:
- IntFunction
- Direct Known Subclasses:
- Exponential, Gamma, Normal, Uniform
public abstract class AbstractContinousDistribution
- extends AbstractDistribution
Abstract base class for all continuous distributions. Continuous distributions have
probability density and a cumulative distribution functions.
Method Summary |
double |
cdf(double x)
|
int |
nextInt()
|
double |
pdf(double x)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractContinousDistribution
public AbstractContinousDistribution()
cdf
public double cdf(double x)
pdf
public double pdf(double x)
nextInt
public int nextInt()
- Specified by:
nextInt
in class AbstractDistribution
- Returns:
- A random number from the distribution; returns (int) Math.round(nextDouble()).
Override this method if necessary.
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.