public class FiniteMassPointsDiscreteDistribution extends BoundedUnivariateDistribution
lowerBound, upperBoundname| Constructor and Description |
|---|
FiniteMassPointsDiscreteDistribution(java.lang.String name,
java.util.Map<java.lang.Double,java.lang.Double> massPoints)
Generates the cumulative distribution corresponding to the mass points if all mass points are valid
(non-negative mass, since signed measures are outside of the scope of this distribution).
|
| Modifier and Type | Method and Description |
|---|---|
double |
draw()
Draws a value from the underlying distribution.
|
double |
drawValue()
Method that generates the values from the underlying distributions for the draw-method.
|
java.util.Map<java.lang.Double,java.lang.Double> |
getCumulatedDistribution() |
java.util.Map<java.lang.Double,java.lang.Double> |
getMassPoints() |
getLowerBound, getUpperBoundgetName, toStringpublic FiniteMassPointsDiscreteDistribution(java.lang.String name,
java.util.Map<java.lang.Double,java.lang.Double> massPoints)
throws java.lang.IllegalArgumentException
name - Name of the distribution (will be prefixed with FiniteMassPointsDiscreteDistribution_)massPoints - Mass points as a map (x, mass(x)), must have non-negative massjava.lang.IllegalArgumentException - will be thrown when an illegal mass point (negative mass) is encounteredpublic java.util.Map<java.lang.Double,java.lang.Double> getMassPoints()
public java.util.Map<java.lang.Double,java.lang.Double> getCumulatedDistribution()
public double draw()
BoundedUnivariateDistributiondraw in class BoundedUnivariateDistributionpublic double drawValue()
BoundedUnivariateDistributiondrawValue in class BoundedUnivariateDistribution