laur.rand
Class RandomExponentialDistribution

java.lang.Object
  |
  +--laur.rand.RandomExponentialDistribution

public class RandomExponentialDistribution
extends java.lang.Object

A generator of random numbers with exponential distribution.


Constructor Summary
RandomExponentialDistribution()
          Create a new generator of random numbers with exponential distribution of mean 1.
RandomExponentialDistribution(double mean)
          Create a new generator of random numbers with exponential distribution of specified mean.
RandomExponentialDistribution(double mean, java.util.Random randgen)
          Create a new generator of random numbers with exponential distribution of specified mean that will use randgen as its source of random numbers.
 
Method Summary
static void main(java.lang.String[] args)
          sample usage and testing
 double nextDouble()
          Return a random number with exponential distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomExponentialDistribution

public RandomExponentialDistribution()
Create a new generator of random numbers with exponential distribution of mean 1.

RandomExponentialDistribution

public RandomExponentialDistribution(double mean)
Create a new generator of random numbers with exponential distribution of specified mean.
Parameters:
mean - the mean of the exponential distribution

RandomExponentialDistribution

public RandomExponentialDistribution(double mean,
                                     java.util.Random randgen)
Create a new generator of random numbers with exponential distribution of specified mean that will use randgen as its source of random numbers.
Parameters:
mean - the mean of the exponential distribution
randgen - a Random object to be used by the generator.
Method Detail

nextDouble

public double nextDouble()
Return a random number with exponential distribution.

main

public static void main(java.lang.String[] args)
sample usage and testing