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.


Constructor Index

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

Method Index

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

Constructors

 o 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.
 o 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.
 o 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.

Methods

 o 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.
 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(double l)
Change the parameter of the exponential.

Parameters:
l - Parameter of the exponential 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