All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class simula.random.Poisson

java.lang.Object
   |
   +----simula.random.Generator
           |
           +----simula.random.Poisson

public class Poisson
extends Generator
The class Poisson allows to generate integer values according to the Poisson distribution.


Constructor Index

 o Poisson(double)
Creates a new Poisson generator using the standard engine and the current time as seed.
 o Poisson(long, double)
Creates a new Poisson generator using the standard engine and the given seed.
 o Poisson(RandomEngine, double)
Creates a new Poisson generator using the given engine.

Method Index

 o density(int)
Returns the value of the density in the given point.
 o draw()
Draws a value from the generator.
 o setParam(double)
Change the Poisson parameter.
 o type()
Returns the type of the extracted value.

Constructors

 o Poisson
 public Poisson(double l)
Creates a new Poisson generator using the standard engine and the current time as seed.

Parameters:
l - Parameter of the Poisson random variable.
 o Poisson
 public Poisson(long seed,
                double l)
Creates a new Poisson generator using the standard engine and the given seed.

Parameters:
seed - Initial seed for the pseudo-random engine.
l - Parameter of the Poisson random variable.
 o Poisson
 public Poisson(RandomEngine e,
                double l)
Creates a new Poisson generator using the given engine.

Parameters:
e - Pseudo-random bit generator.
l - Parameter of the Poisson random variable.

Methods

 o density
 public double density(int x)
Returns the value of the density in the given point.

Parameters:
x - Point to value the density of.
 o draw
 public Value draw()
Draws a value from the generator.

Returns:
An instance of Value that encapsulates an integer value.
Overrides:
draw in class Generator
See Also:
IntegerValue, Value
 o setParam
 public void setParam(double l)
Change the Poisson parameter.

Parameters:
l - Parameter of the Poisson random variable.
 o type
 public int type()
Returns the type of the extracted value.

Overrides:
type in class Generator

All Packages  Class Hierarchy  This Package  Previous  Next  Index