Opus5
Class ExponentialRV

java.lang.Object
  |
  +--Opus5.ExponentialRV
All Implemented Interfaces:
RandomVariable

public class ExponentialRV
extends java.lang.Object
implements RandomVariable

Exponentially distributed random variable.

Version:
$Id: ExponentialRV.java,v 3.2 1998/07/28 02:09:16 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.

Field Summary
protected  double mu
          The mean of the distribution.
 
Fields inherited from interface Opus5.RandomVariable
copyright
 
Constructor Summary
ExponentialRV(double mu)
          Constructs a ExponentialRV with the specified mean.
 
Method Summary
 double nextDouble()
          Returns a random number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mu

protected double mu
The mean of the distribution.
Constructor Detail

ExponentialRV

public ExponentialRV(double mu)
Constructs a ExponentialRV with the specified mean.
Parameters:
mu - The mean of the distribution.
Method Detail

nextDouble

public double nextDouble()
Returns a random number. The numbers returned are exponentially distributed with mean mu.
Specified by:
nextDouble in interface RandomVariable
Returns:
A random number.