All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class eduni.simjava.Sim_negexp_obj

java.lang.Object
   |
   +----eduni.simjava.Sim_negexp_obj

public class Sim_negexp_obj
extends Object
A negative exponential random number generator.


Constructor Index

 o Sim_negexp_obj(String, double, int)
The constructor.

Method Index

 o sample()
Generate a new random number.

Constructors

 o Sim_negexp_obj
 public Sim_negexp_obj(String name,
                       double avg,
                       int seed)
The constructor.

Parameters:
name - The name to be associated with this instance, (currently ignored)
avg - The *mean* of the exponential distribution
seed - The initial seed for the generator, two instances with the same seed will generate the same sequence of numbers
Returns:
A new instance of the class

Methods

 o sample
 public double sample()
Generate a new random number.

Returns:
The next random number in the sequence

All Packages  Class Hierarchy  This Package  Previous  Next  Index