-
- All Implemented Interfaces:
-
java.io.Serializable,org.apache.commons.math3.distribution.RealDistribution
public final class DiracDeltaDistribution implements RealDistribution, Serializable
Models a Real Distribution backed by a Dirac Delta Function. This is similar to a Logistic probability function with a shape whose value tends to zero.
In practice, samples from this function return the provided value as a constant. The variance is zero, there is no randomness involved, and most of the useful information of a real distribution are actually lost. However, this utility can transform tools meant to work with a probability function in such a way that they work with a constant value (e.g., random walks with a constant step).
-
-
Constructor Summary
Constructors Constructor Description DiracDeltaDistribution(RandomGenerator randomGenerator, Double value)This constructor is meant for reflection compatibility only. DiracDeltaDistribution(Double value)
-
Method Summary
Modifier and Type Method Description final DoublegetValue()Doubleprobability(Double x)Doubledensity(Double x)DoublecumulativeProbability(Double x)DoublecumulativeProbability(Double x0, Double x1)DoubleinverseCumulativeProbability(Double p)DoublegetNumericalMean()DoublegetNumericalVariance()DoublegetSupportLowerBound()DoublegetSupportUpperBound()BooleanisSupportLowerBoundInclusive()BooleanisSupportUpperBoundInclusive()BooleanisSupportConnected()UnitreseedRandomGenerator(Long seed)Doublesample()DoubleArraysample(Integer sampleSize)-
-
Method Detail
-
probability
Double probability(Double x)
-
cumulativeProbability
Double cumulativeProbability(Double x)
-
cumulativeProbability
Double cumulativeProbability(Double x0, Double x1)
-
inverseCumulativeProbability
Double inverseCumulativeProbability(Double p)
-
getNumericalMean
Double getNumericalMean()
-
getNumericalVariance
Double getNumericalVariance()
-
getSupportLowerBound
Double getSupportLowerBound()
-
getSupportUpperBound
Double getSupportUpperBound()
-
isSupportLowerBoundInclusive
Boolean isSupportLowerBoundInclusive()
-
isSupportUpperBoundInclusive
Boolean isSupportUpperBoundInclusive()
-
isSupportConnected
Boolean isSupportConnected()
-
reseedRandomGenerator
Unit reseedRandomGenerator(Long seed)
-
sample
DoubleArray sample(Integer sampleSize)
-
-
-
-