public class ExponentialDistribution extends java.lang.Object implements IDistribution
IDistribution.SimpleDistribution
Modifier and Type | Field and Description |
---|---|
static ExponentialDistribution |
instance |
static ExponentialDistribution |
instance_0_5 |
static ExponentialDistribution |
instance_1_5 |
EXCLUSIVE_ONE, EXCLUSIVE_ZERO
Constructor and Description |
---|
ExponentialDistribution() |
ExponentialDistribution(double lambda) |
Modifier and Type | Method and Description |
---|---|
double |
getLambda() |
double |
getLowerBound()
The lower inclusive bound is 0 while lambda is positive; it is negative infinity if lambda is negative.
|
double |
getMean()
Gets the mean value of this distribution (1.0 / lambda).
|
double |
getUpperBound()
The upper inclusive bound is infinity while lambda is positive; it is 0 if lambda is negative.
|
double |
nextDouble(IRNG rng)
Gets a double between
IDistribution.getLowerBound() and IDistribution.getUpperBound() that obeys this distribution. |
void |
setLambda(double lambda) |
public static final ExponentialDistribution instance
public static final ExponentialDistribution instance_0_5
public static final ExponentialDistribution instance_1_5
public ExponentialDistribution()
public ExponentialDistribution(double lambda)
public double getLambda()
public void setLambda(double lambda)
public double nextDouble(IRNG rng)
IDistribution
IDistribution.getLowerBound()
and IDistribution.getUpperBound()
that obeys this distribution.nextDouble
in interface IDistribution
rng
- an IRNG, such as RNG
or GWTRNG
, that this will get one or more random numbers fromIDistribution.getLowerBound()
and IDistribution.getUpperBound()
, both inclusivepublic double getLowerBound()
getLowerBound
in interface IDistribution
public double getUpperBound()
getUpperBound
in interface IDistribution
public double getMean()
getMean
in interface IDistribution
Copyright © Eben Howard 2012–2022. All rights reserved.