org.apache.mahout.math.jet.random
Class AbstractContinousDistribution

java.lang.Object
  extended by org.apache.mahout.math.function.DoubleFunction
      extended by org.apache.mahout.math.jet.random.AbstractDistribution
          extended by 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.


Constructor Summary
AbstractContinousDistribution()
           
 
Method Summary
 double cdf(double x)
           
 int nextInt()
           
 double pdf(double x)
           
 
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDistribution
apply, apply, getRandomGenerator, nextDouble, randomDouble, setRandomGenerator
 
Methods inherited from class org.apache.mahout.math.function.DoubleFunction
isDensifying
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContinousDistribution

public AbstractContinousDistribution()
Method Detail

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.