umontreal.iro.lecuyer.probdist
Class ConstantIntDist
java.lang.Object
umontreal.iro.lecuyer.probdist.DiscreteDistributionInt
umontreal.iro.lecuyer.probdist.UniformIntDist
umontreal.iro.lecuyer.probdist.ConstantIntDist
- All Implemented Interfaces:
- Distribution
public class ConstantIntDist
- extends UniformIntDist
Represents a constant discrete distribution taking a single integer
value with probability 1.
Its mass function is
p(x) = 1, for x = c,
and p(x) = 0 elsewhere.
Constructor Summary |
ConstantIntDist(int c)
Constructs a new constant distribution with probability 1 at c. |
Methods inherited from class umontreal.iro.lecuyer.probdist.UniformIntDist |
barF, barF, cdf, cdf, getI, getInstanceFromMLE, getJ, getMean, getMean, getMLE, getParams, getStandardDeviation, getStandardDeviation, getVariance, getVariance, inverseF, inverseFInt, prob, prob, setParams |
ConstantIntDist
public ConstantIntDist(int c)
- Constructs a new constant distribution with probability 1 at c.
toString
public String toString()
- Overrides:
toString
in class UniformIntDist
To submit a bug or ask questions, send an e-mail to
Pierre L'Ecuyer.