jhplot.math.num.random
Class ExponentialRandomVariable

java.lang.Object
  extended by jhplot.math.num.random.AbstractContinuousRandomVariable
      extended by jhplot.math.num.random.ExponentialRandomVariable
All Implemented Interfaces:
ContinuousRandomVariable

public class ExponentialRandomVariable
extends AbstractContinuousRandomVariable

A random variable generator for the Exponential distribution.

References:

  1. Wikipedia contributors, "Exponential Distribution," Wikipedia, The Free Encyclopedia, http://en.wikipedia.org/wiki/Exponential_distribution

Since:
1.3

Constructor Summary
ExponentialRandomVariable()
          Default constructor.
ExponentialRandomVariable(double m)
          Create a random variable with the given mean.
ExponentialRandomVariable(double m, RNG source)
          Create a random variable with the given parameters.
 
Method Summary
 double nextRandomVariable()
          Access the next random variable from this generator.
static double nextRandomVariable(double m, RNG source)
          Access the next random variable using the given generator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExponentialRandomVariable

public ExponentialRandomVariable()
Default constructor. Mean is set to 1.


ExponentialRandomVariable

public ExponentialRandomVariable(double m)
Create a random variable with the given mean.

Parameters:
m - the mean.

ExponentialRandomVariable

public ExponentialRandomVariable(double m,
                                 RNG source)
Create a random variable with the given parameters.

Parameters:
m - the mean.
source - the source generator.
Method Detail

nextRandomVariable

public static double nextRandomVariable(double m,
                                        RNG source)
Access the next random variable using the given generator.

Parameters:
m - the mean.
source - the source generator.
Returns:
the next random variable.

nextRandomVariable

public double nextRandomVariable()
Access the next random variable from this generator.

Returns:
the next random variable.


jHepWork 2.8 (©) S.Chekanov