public class PoissonDistribution extends COLTDiscreteDistribution
generator
name
Constructor and Description |
---|
PoissonDistribution(java.lang.String name,
double lambda)
Models a Poisson distribution with an average number of lambda events.
|
Modifier and Type | Method and Description |
---|---|
double |
draw()
Draw a value from the distribution according to the distribution at hand
|
double |
getLambda() |
double |
testDistribution(int numberOfDraws)
Method to test whether my assumption of what the COLT implementation does.
|
getName, toString
public PoissonDistribution(java.lang.String name, double lambda) throws java.lang.IllegalArgumentException
name
- Name of the distribution (will be prefixed with PoissonDistribution_)lambda
- Average number of each draw.java.lang.IllegalArgumentException
- will be thrown if the average number of events (lambda) is negativepublic double draw()
UnivariateDistribution
draw
in class UnivariateDistribution
public double getLambda()
public double testDistribution(int numberOfDraws)
numberOfDraws
- number of samples taken