Class DiracDeltaDistribution
-
- 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 Double
getValue()
Double
probability(Double x)
Double
density(Double x)
Double
cumulativeProbability(Double x)
Double
cumulativeProbability(Double x0, Double x1)
Double
inverseCumulativeProbability(Double p)
Double
getNumericalMean()
Double
getNumericalVariance()
Double
getSupportLowerBound()
Double
getSupportUpperBound()
Boolean
isSupportLowerBoundInclusive()
Boolean
isSupportUpperBoundInclusive()
Boolean
isSupportConnected()
Unit
reseedRandomGenerator(Long seed)
Double
sample()
DoubleArray
sample(Integer sampleSize)
-
-
Method Detail
-
probability
Double probability(Double x)
-
cumulativeProbability
Double cumulativeProbability(Double x)
-
cumulativeProbability
@Deprecated(message = "Deprecated in Java", replaceWith = @ReplaceWith(imports = {}, expression = "probability(x0, x1)")) Double cumulativeProbability(Double x0, Double x1)
-
inverseCumulativeProbability
Double inverseCumulativeProbability(Double p)
-
getNumericalMean
Double getNumericalMean()
-
getNumericalVariance
Double getNumericalVariance()
-
getSupportLowerBound
Double getSupportLowerBound()
-
getSupportUpperBound
Double getSupportUpperBound()
-
isSupportLowerBoundInclusive
@Deprecated(message = "Deprecated in Java", replaceWith = @ReplaceWith(imports = {}, expression = "getSupporLowerBound().isFinite() && !density(getSupportLowerBound()).isNaN()")) Boolean isSupportLowerBoundInclusive()
-
isSupportUpperBoundInclusive
@Deprecated(message = "Deprecated in Java", replaceWith = @ReplaceWith(imports = {}, expression = "getSupportUpperBound().isFinite() && !density(getSupportUpperBound()).isNaN()")) Boolean isSupportUpperBoundInclusive()
-
isSupportConnected
Boolean isSupportConnected()
-
reseedRandomGenerator
Unit reseedRandomGenerator(Long seed)
-
sample
DoubleArray sample(Integer sampleSize)
-
-
-
-