| Modifier and Type | Field and Description |
|---|---|
| private final int | lower
Lower bound (inclusive) of this distribution. |
| private static final long | serialVersionUID
Hides org. |
| private final int | upper
Upper bound (inclusive) of this distribution. |
| Access | Constructor and Description |
|---|---|
| public | UniformIntegerDistribution(int
Lower bound (inclusive) of this distribution. lower, int Upper bound (inclusive) of this distribution. upper)Creates a new uniform integer distribution using the given lower and upper bounds (both inclusive). |
| public | UniformIntegerDistribution(RandomGenerator
Random number generator. rng, int Lower bound (inclusive) of this distribution. lower, int Upper bound (inclusive) of this distribution. upper)Creates a new uniform integer distribution using the given lower and upper bounds (both inclusive). |
| Modifier and Type | Method and Description |
|---|---|
| public double | cumulativeProbability(int
the point at which the CDF is evaluated x)Implements org. For a random variable |
| public double | getNumericalMean()
Implements org. Use this method to get the numerical value of the mean of this distribution. |
| public double | getNumericalVariance()
Implements org. Use this method to get the numerical value of the variance of this distribution. |
| public int | Returns: lower bound of the supportImplements org. Access the lower bound of the support. |
| public int | Returns: upper bound of the supportImplements org. Access the upper bound of the support. |
| public boolean | Returns: trueImplements org. Use this method to get information about whether the support is connected, i.e. whether all integers between the lower and upper bound of the support are included in the support. |
| public double | probability(int
the point at which the PMF is evaluated x)Implements org. For a random variable |
| public int | sample()
Overrides org. Implements org. Generate a random value sampled from this distribution. |
| lower | back to summary |
|---|---|
| private final int lower Lower bound (inclusive) of this distribution. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier. | |
| upper | back to summary |
|---|---|
| private final int upper Upper bound (inclusive) of this distribution. | |
| UniformIntegerDistribution | back to summary |
|---|---|
| public UniformIntegerDistribution(int lower, int upper) throws NumberIsTooLargeException Creates a new uniform integer distribution using the given lower and upper bounds (both inclusive). Note this constructor will implicitly create an instance of
| |
| UniformIntegerDistribution | back to summary |
|---|---|
| public UniformIntegerDistribution(RandomGenerator rng, int lower, int upper) throws NumberIsTooLargeException Creates a new uniform integer distribution using the given lower and upper bounds (both inclusive).
| |
| cumulativeProbability | back to summary |
|---|---|
| public double cumulativeProbability(int x) Implements org. Doc from org. For a random variable
| |
| getNumericalMean | back to summary |
|---|---|
| public double getNumericalMean() Implements org. Doc from org. Use this method to get the numerical value of the mean of this
distribution.
For lower bound
| |
| getNumericalVariance | back to summary |
|---|---|
| public double getNumericalVariance() Implements org. Doc from org. Use this method to get the numerical value of the variance of this
distribution.
For lower bound
| |
| getSupportLowerBound | back to summary |
|---|---|
| public int getSupportLowerBound() Implements org. Doc from org. Access the lower bound of the support. This method must return the same
value as
| |
| getSupportUpperBound | back to summary |
|---|---|
| public int getSupportUpperBound() Implements org. Doc from org. Access the upper bound of the support. This method must return the same
value as
| |
| isSupportConnected | back to summary |
|---|---|
| public boolean isSupportConnected() Implements org. Doc from org. Use this method to get information about whether the support is connected, i.e. whether all integers between the lower and upper bound of the support are included in the support. The support of this distribution is connected.
| |
| probability | back to summary |
|---|---|
| public double probability(int x) Implements org. Doc from org. For a random variable
| |
| sample | back to summary |
|---|---|
| public int sample() Overrides org. Implements org. Doc from org. Generate a random value sampled from this distribution. The default implementation uses the inversion method.
| |