|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.colt.PersistentObject
cern.jet.random.tdouble.AbstractDoubleDistribution
cern.jet.random.tdouble.AbstractDiscreteDistribution
cern.jet.random.tdouble.Poisson
public class Poisson
Poisson distribution (quick); See the math definition and animated definition.
p(k) = (mean^k / k!) * exp(-mean) for k >= 0.
Valid parameter ranges: mean > 0. Note: if mean <= 0.0 then always returns zero.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
Implementation: High performance implementation. Patchwork Rejection/Inversion method.
H. Zechner (1994): Efficient sampling from continuous and discrete unimodal distributions, Doctoral Dissertation, 156 pp., Technical University Graz, Austria.
Also see
Stadlober E., H. Zechner (1999), The patchwork rejection method for sampling from unimodal distributions, to appear in ACM Transactions on Modelling and Simulation.
Constructor Summary | |
---|---|
Poisson(double mean,
DoubleRandomEngine randomGenerator)
Constructs a poisson distribution. |
Method Summary | |
---|---|
double |
cdf(int k)
Returns the cumulative distribution function. |
Object |
clone()
Returns a deep copy of the receiver; the copy will produce identical sequences. |
int |
nextInt()
Returns a random number from the distribution. |
int |
nextInt(double theMean)
Returns a random number from the distribution; bypasses the internal state. |
double |
pdf(int k)
Returns the probability distribution function. |
void |
setMean(double mean)
Sets the mean. |
static int |
staticNextInt(double mean)
Returns a random number from the distribution with the given mean. |
String |
toString()
Returns a String representation of the receiver. |
Methods inherited from class cern.jet.random.tdouble.AbstractDiscreteDistribution |
---|
nextDouble |
Methods inherited from class cern.jet.random.tdouble.AbstractDoubleDistribution |
---|
apply, apply, makeDefaultGenerator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Poisson(double mean, DoubleRandomEngine randomGenerator)
Method Detail |
---|
public double cdf(int k)
public Object clone()
clone
in class AbstractDoubleDistribution
public int nextInt()
nextInt
in class AbstractDiscreteDistribution
public int nextInt(double theMean)
public double pdf(int k)
public void setMean(double mean)
public static int staticNextInt(double mean)
public String toString()
toString
in class Object
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |