public class FiniteMassPointsDiscreteDistribution extends BoundedUnivariateDistribution
lowerBound, upperBound
name
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, getUpperBound
getName, toString
public 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()
BoundedUnivariateDistribution
draw
in class BoundedUnivariateDistribution
public double drawValue()
BoundedUnivariateDistribution
drawValue
in class BoundedUnivariateDistribution