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.
-
Poisson(double)
- Creates a new Poisson generator using the standard engine and the current time as seed.
-
Poisson(long, double)
- Creates a new Poisson generator using the standard engine and the given seed.
-
Poisson(RandomEngine, double)
- Creates a new Poisson generator using the given engine.
-
density(int)
- Returns the value of the density in the given point.
-
draw()
- Draws a value from the generator.
-
setParam(double)
- Change the Poisson parameter.
-
type()
- Returns the type of the extracted value.
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.
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.
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.
density
public double density(int x)
- Returns the value of the density in the given point.
- Parameters:
- x - Point to value the density of.
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
setParam
public void setParam(double l)
- Change the Poisson parameter.
- Parameters:
- l - Parameter of the Poisson random variable.
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