jhplot.math.num.random
Class ExponentialRandomVariable
- java.lang.Object
-
- jhplot.math.num.random.AbstractContinuousRandomVariable
-
- jhplot.math.num.random.ExponentialRandomVariable
-
- All Implemented Interfaces:
- ContinuousRandomVariable
public class ExponentialRandomVariable extends AbstractContinuousRandomVariable
A random variable generator for the Exponential distribution.
References:
- Wikipedia contributors, "Exponential Distribution," Wikipedia, The Free Encyclopedia, http://en.wikipedia.org/wiki/Exponential_distribution
- Since:
- 1.3
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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.
-
-
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG