public class SpikeDistribution extends java.lang.Object implements IDistribution
| Modifier and Type | Class and Description |
|---|---|
static class |
SpikeDistribution.SimpleSpikeDistribution
A variant on SpikeDistribution that has its range shrunk and moved from
[-1,1) to [0,1). |
IDistribution.SimpleDistribution| Modifier and Type | Field and Description |
|---|---|
static SpikeDistribution |
instance |
EXCLUSIVE_ONE, EXCLUSIVE_ZERO| Constructor and Description |
|---|
SpikeDistribution() |
| Modifier and Type | Method and Description |
|---|---|
double |
getLowerBound()
Gets the lower bound of the distribution, which is -1, inclusive.
|
double |
getMean()
Gets the mean value of this distribution (0.0).
|
double |
getUpperBound()
Gets the upper bound of the distribution, which is
IDistribution.EXCLUSIVE_ONE. |
double |
nextDouble(IRNG rng)
Gets a double between
getLowerBound() and getUpperBound() that obeys this distribution. |
public static final SpikeDistribution instance
public double nextDouble(IRNG rng)
getLowerBound() and getUpperBound() that obeys this distribution.nextDouble in interface IDistributionrng - an IRNG, such as RNG or GWTRNG, that this will get one or more random numbers fromgetLowerBound() and getUpperBound()public double getLowerBound()
getLowerBound in interface IDistributionpublic double getUpperBound()
IDistribution.EXCLUSIVE_ONE.getUpperBound in interface IDistributionpublic double getMean()
getMean in interface IDistributionCopyright © Eben Howard 2012–2022. All rights reserved.