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.
-
Erlang(int, int)
- Creates a new Erlang generator using the standard engine and the current time as seed.
-
Erlang(long, int, int)
- Creates a new Erlang generator using the standard engine with the given seed.
-
Erlang(RandomEngine, int, int)
- Creates a new Erlang generator using the given engine.
-
draw()
- Draws a value from the generator.
-
setParam(int, double)
- Change the number of exponentials and their parameter.
-
type()
- Returns the type of the extracted value.
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.
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.
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.
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
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.
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