All Packages Class Hierarchy This Package Previous Next Index
Class simula.random.Negexp
java.lang.Object
|
+----simula.random.Generator
|
+----simula.random.Negexp
- public class Negexp
- extends Generator
The class Negexp allows to draw real values according to an exponential
distribution.
-
Negexp(double)
- Creates a new exponential generator using the standard engine and the current time as seed.
-
Negexp(long, double)
- Creates a new exponential generator using the standard engine and the given seed.
-
Negexp(RandomEngine, double)
- Creates a new exponential generator using the given engine.
-
density(double)
- Returns the value of the density in the given point.
-
draw()
- Draws a value from the generator.
-
setParam(double)
- Change the parameter of the exponential.
-
type()
- Returns the type of the extracted value.
Negexp
public Negexp(double l)
- Creates a new exponential generator using the standard engine and the current time as seed.
- Parameters:
- l - Parameter of the exponential random variable.
Negexp
public Negexp(long seed,
double l)
- Creates a new exponential generator using the standard engine and the given seed.
- Parameters:
- seed - Initial seed for the pseudo-random engine.
- l - Parameter of the exponential random variable.
Negexp
public Negexp(RandomEngine e,
double l)
- Creates a new exponential generator using the given engine.
- Parameters:
- e - Pseudo-random bit generator.
- l - Parameter of the exponential random variable.
density
public double density(double x)
- Returns the value of the density in the given point.
- Parameters:
- x - Point to value the density of.
- Returns:
- the value of the density in the given point.
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(double l)
- Change the parameter of the exponential.
- Parameters:
- l - Parameter of the exponential 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