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.
|
nextInt
apply, apply, getRandomGenerator, randomDouble, setRandomGenerator
isDensifying
public 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 AbstractContinousDistribution
x
- The point at which the cumulative distribution function is to be evaluated.public double nextDouble()
nextDouble
in class AbstractDistribution
public double pdf(double x)
pdf
in class AbstractContinousDistribution
x
- 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–2017 The Apache Software Foundation. All rights reserved.