public class Exponential extends AbstractContinousDistribution
| Constructor and Description |
|---|
Exponential(double lambda,
Random randomGenerator)
Provides a negative exponential distribution given a rate parameter lambda and an underlying
random number generator.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(double x)
Returns the cumulative distribution function.
|
double |
nextDouble()
Returns a random number from the distribution.
|
double |
pdf(double x)
Returns the value of the probability density function at a particular point.
|
void |
setState(double lambda)
Sets the rate parameter.
|
String |
toString()
Returns a String representation of the receiver.
|
nextIntapply, apply, getRandomGenerator, randomDouble, setRandomGeneratorisDensifyingpublic Exponential(double lambda,
Random randomGenerator)
lambda - The rate parameter of the distribution.randomGenerator - The PRNG that is used to generate values.public double cdf(double x)
cdf in class AbstractContinousDistributionx - The point at which the cumulative distribution function is to be evaluated.public double nextDouble()
nextDouble in class AbstractDistributionpublic double pdf(double x)
pdf in class AbstractContinousDistributionx - The point at which the probability density function is to be evaluated.public void setState(double lambda)
lambda - The new value of the rate parameter.Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.