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

java.lang.Object
  extended by org.apache.mahout.math.jet.random.AbstractDistribution
      extended by org.apache.mahout.math.jet.random.AbstractDiscreteDistribution
          extended by org.apache.mahout.math.jet.random.Poisson
All Implemented Interfaces:
DoubleFunction, IntFunction

public final class Poisson
extends AbstractDiscreteDistribution

Partially deprecated until unit tests are in place. Until this time, this class/interface is unsupported.


Field Summary
 
Fields inherited from class org.apache.mahout.math.jet.random.AbstractDistribution
randomGenerator
 
Constructor Summary
Poisson(double mean, Random randomGenerator)
          Constructs a poisson distribution.
 
Method Summary
 int nextInt()
           
 int nextInt(double theMean)
          Returns a random number from the distribution; bypasses the internal state.
 
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDiscreteDistribution
nextDouble
 
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDistribution
apply, apply, setRandomGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Poisson

public Poisson(double mean,
               Random randomGenerator)
Constructs a poisson distribution. Example: mean=1.0.

Method Detail

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.

nextInt

public int nextInt(double theMean)
Returns a random number from the distribution; bypasses the internal state.



Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.