public class BathtubDistribution extends IDistribution.SimpleDistribution implements IDistribution
IDistribution.SimpleDistribution
Modifier and Type | Field and Description |
---|---|
static BathtubDistribution |
instance |
EXCLUSIVE_ONE, EXCLUSIVE_ZERO
Constructor and Description |
---|
BathtubDistribution() |
Modifier and Type | Method and Description |
---|---|
double |
getMean()
Gets the mean value of this distribution (0.5).
|
double |
nextDouble(IRNG rng)
Gets a double between
IDistribution.SimpleDistribution.getLowerBound() and IDistribution.SimpleDistribution.getUpperBound() that obeys this distribution. |
clampedDistribution, fractionalDistribution, fractionalOffsetDistribution, getLowerBound, getUpperBound
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLowerBound, getUpperBound
public static final BathtubDistribution instance
public double nextDouble(IRNG rng)
IDistribution.SimpleDistribution.getLowerBound()
and IDistribution.SimpleDistribution.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.SimpleDistribution.getLowerBound()
and IDistribution.SimpleDistribution.getUpperBound()
public double getMean()
getMean
in interface IDistribution
getMean
in class IDistribution.SimpleDistribution
Copyright © Eben Howard 2012–2022. All rights reserved.