All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class simula.random.Erlang

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

public class Erlang
extends Generator
The class Erlang allows to generate psudo-random real values distributed like the sum of a certain amount of exponential random variables.


Constructor Index

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

Method Index

 o draw()
Draws a value from the generator.
 o setParam(int, double)
Change the number of exponentials and their parameter.
 o type()
Returns the type of the extracted value.

Constructors

 o Erlang
 public Erlang(int n,
               int l)
Creates a new Erlang generator using the standard engine and the current time as seed.

Parameters:
n - Number of exponential random variables to be summed.
l - Parameter of the exponentials.
 o Erlang
 public Erlang(long seed,
               int n,
               int l)
Creates a new Erlang generator using the standard engine with the given seed.

Parameters:
seed - Initial seed for the pseudo-random engine.
n - Number of exponential random variables to be summed.
l - Parameter of the exponentials.
 o Erlang
 public Erlang(RandomEngine e,
               int n,
               int l)
Creates a new Erlang generator using the given engine.

Parameters:
e - Pseudo-random bit generator.
n - Number of exponential random variables to be summed.
l - Parameter of the exponentials.

Methods

 o draw
 public Value draw()
Draws a value from the generator.

Returns:
An instance of Value that encapsulates a real value.
Overrides:
draw in class Generator
See Also:
RealValue, Value
 o setParam
 public void setParam(int n,
                      double l)
Change the number of exponentials and their parameter.

Parameters:
n - Number of exponential random variables to be summed.
l - Parameter of the exponentials.
 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