public static class SpikeDistribution.SimpleSpikeDistribution extends IDistribution.SimpleDistribution implements IDistribution
[-1,1)
to [0,1)
. It is a
IDistribution.SimpleDistribution
, and the spike is centered on 0.5.IDistribution.SimpleDistribution
EXCLUSIVE_ONE, EXCLUSIVE_ZERO
Constructor and Description |
---|
SimpleSpikeDistribution() |
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 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.