jhplot.math.num.random
Class PoissonRandomVariable

java.lang.Object
  extended by jhplot.math.num.random.AbstractDiscreteRandomVariable
      extended by jhplot.math.num.random.PoissonRandomVariable
All Implemented Interfaces:
DiscreteRandomVariable

public class PoissonRandomVariable
extends AbstractDiscreteRandomVariable

A random variable generator for the Poisson distribution.

References:

  1. Wikipedia contributors, "Poisson Distribution," Wikipedia, The Free Encyclopedia, http://en.wikipedia.org/wiki/Poisson_distribution

Since:
1.3

Constructor Summary
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
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


jHepWork 3.1 ©