jhplot.math.num.random
Class PoissonRandomVariable
- java.lang.Object
-
- jhplot.math.num.random.AbstractDiscreteRandomVariable
-
- jhplot.math.num.random.PoissonRandomVariable
-
- All Implemented Interfaces:
- DiscreteRandomVariable
public class PoissonRandomVariable extends AbstractDiscreteRandomVariable
A random variable generator for the Poisson distribution.
References:
- Wikipedia contributors, "Poisson Distribution," Wikipedia, The Free Encyclopedia, http://en.wikipedia.org/wiki/Poisson_distribution
- Since:
- 1.3
-
-
Constructor Summary
Constructors Constructor and Description PoissonRandomVariable()
Default constructor.PoissonRandomVariable(double m)
Create a random variable with the given mean.PoissonRandomVariable(double m, RNG source)
Create a random variable with the given parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
nextRandomVariable()
Access the next random variable from this generator.static int
nextRandomVariable(double m, RNG source)
Access the next random variable using the given generator.
-
-
-
Constructor Detail
-
PoissonRandomVariable
public PoissonRandomVariable()
Default constructor. Mean is set to zero and standard deviation is set to one.
-
PoissonRandomVariable
public PoissonRandomVariable(double m)
Create a random variable with the given mean.- Parameters:
m
- the mean.
-
PoissonRandomVariable
public PoissonRandomVariable(double m, RNG source)
Create a random variable with the given parameters.- Parameters:
m
- the mean.source
- the source generator.
-
-
Method Detail
-
nextRandomVariable
public static int nextRandomVariable(double m, RNG source)
Access the next random variable using the given generator.- Parameters:
m
- the mean.source
- the source generator.- Returns:
- the next random variable.
-
nextRandomVariable
public int nextRandomVariable()
Access the next random variable from this generator.- Returns:
- the next random variable.
-
-
DMelt 3.0 © DataMelt by jWork.ORG