| Modifier and Type | Field and Description |
|---|---|
| public static final double | DEFAULT_INVERSE_ABSOLUTE_ACCURACY
Default inverse cumulative probability accuracy. |
| private static final double[] | EXPONENTIAL_SA_QI
Used when generating Exponential samples. |
| private final double | logMean
The logarithm of the mean, stored to reduce computing time. |
| private final double | mean
The mean of this distribution. |
| private static final long | serialVersionUID
Hides org. |
| private final double | solverAbsoluteAccuracy
Hides org. |
| Access | Constructor and Description |
|---|---|
| public | ExponentialDistribution(double
mean of this distribution. mean)Create an exponential distribution with the given mean. |
| public | ExponentialDistribution(double
Mean of this distribution. mean, double Maximum absolute error in inverse
cumulative probability estimates (defaults to
inverseCumAccuracy)DEFAULT_INVERSE_ABSOLUTE_ACCURACY).Create an exponential distribution with the given mean. |
| public | ExponentialDistribution(RandomGenerator
Random number generator. rng, double Mean of this distribution. mean)Creates an exponential distribution. |
| public | ExponentialDistribution(RandomGenerator
Random number generator. rng, double Mean of this distribution. mean, double Maximum absolute error in inverse
cumulative probability estimates (defaults to
inverseCumAccuracy)DEFAULT_INVERSE_ABSOLUTE_ACCURACY).Creates an exponential distribution. |
| Modifier and Type | Method and Description |
|---|---|
| public double | cumulativeProbability(double
the point at which the CDF is evaluated x)Implements org. For a random variable |
| public double | density(double
the point at which the PDF is evaluated x)Implements org. Returns the probability density function (PDF) of this distribution
evaluated at the specified point |
| public double | |
| 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. |
| protected double | getSolverAbsoluteAccuracy()
Overrides org. Returns the solver absolute accuracy for inverse cumulative computation. |
| public double | Returns: lower bound of the support (always 0)Implements org. Access the lower bound of the support. |
| public double | Returns: upper bound of the support (always Double.POSITIVE_INFINITY)Implements org. Access the upper bound of the support. |
| public double | inverseCumulativeProbability(double
the cumulative probability p)Overrides org. Implements org. Computes the quantile function of this distribution. |
| public boolean | Returns: trueImplements org. Use this method to get information about whether the support is connected, i.e. whether all values between the lower and upper bound of the support are included in the support. |
| public boolean | isSupportLowerBoundInclusive()
Implements org. Whether or not the lower bound of support is in the domain of the density function. |
| public boolean | isSupportUpperBoundInclusive()
Implements org. Whether or not the upper bound of support is in the domain of the density function. |
| public double | logDensity(double
the point at which the PDF is evaluated x)Overrides org. Returns the natural logarithm of the probability density function (PDF) of this distribution
evaluated at the specified point |
| public double | Returns: a random value.Overrides org. Implements org. Generate a random value sampled from this distribution. |
| DEFAULT_INVERSE_ABSOLUTE_ACCURACY | back to summary |
|---|---|
| public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY Default inverse cumulative probability accuracy.
| |
| EXPONENTIAL_SA_QI | back to summary |
|---|---|
| private static final double[] EXPONENTIAL_SA_QI Used when generating Exponential samples. Table containing the constants q_i = sum_{j=1}^i (ln 2)^j/j! = ln 2 + (ln 2)^2/2 + ... + (ln 2)^i/i! until the largest representable fraction below 1 is exceeded. Note that 1 = 2 - 1 = exp(ln 2) - 1 = sum_{n=1}^infty (ln 2)^n / n! thus q_i -> 1 as i -> +inf, so the higher i, the closer to one we get (the series is not alternating). By trying, n = 16 in Java is enough to reach 1.0. | |
| logMean | back to summary |
|---|---|
| private final double logMean The logarithm of the mean, stored to reduce computing time. | |
| mean | back to summary |
|---|---|
| private final double mean The mean of this distribution. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier | |
| solverAbsoluteAccuracy | back to summary |
|---|---|
| private final double solverAbsoluteAccuracy Hides org. Inverse cumulative probability accuracy. | |
| ExponentialDistribution | back to summary |
|---|---|
| public ExponentialDistribution(double mean) Create an exponential distribution with the given mean. Note this constructor will implicitly create an instance of
| |
| ExponentialDistribution | back to summary |
|---|---|
| public ExponentialDistribution(double mean, double inverseCumAccuracy) Create an exponential distribution with the given mean. Note this constructor will implicitly create an instance of
| |
| ExponentialDistribution | back to summary |
|---|---|
| public ExponentialDistribution(RandomGenerator rng, double mean) throws NotStrictlyPositiveException Creates an exponential distribution.
| |
| ExponentialDistribution | back to summary |
|---|---|
| public ExponentialDistribution(RandomGenerator rng, double mean, double inverseCumAccuracy) throws NotStrictlyPositiveException Creates an exponential distribution.
| |
| cumulativeProbability | back to summary |
|---|---|
| public double cumulativeProbability(double x) Implements org. Doc from org. For a random variable
| |
| density | back to summary |
|---|---|
| public double density(double x) Implements org. Doc from org. Returns the probability density function (PDF) of this distribution
evaluated at the specified point
| |
| getMean | back to summary |
|---|---|
| public double getMean() Access the mean.
| |
| 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 mean parameter
| |
| 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 mean parameter
| |
| getSolverAbsoluteAccuracy | back to summary |
|---|---|
| protected double getSolverAbsoluteAccuracy() Overrides org. Doc from org. Returns the solver absolute accuracy for inverse cumulative computation. You can override this method in order to use a Brent solver with an absolute accuracy different from the default.
| |
| getSupportLowerBound | back to summary |
|---|---|
| public double 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 double getSupportUpperBound() Implements org. Doc from org. Access the upper bound of the support. This method must return the same
value as
| |
| inverseCumulativeProbability | back to summary |
|---|---|
| public double inverseCumulativeProbability(double p) throws OutOfRangeException Overrides org. Implements org. Doc from org. Computes the quantile function of this distribution. For a random
variable
0 when p= = 0 and
Double.POSITIVE_INFINITY when p == 1.
| |
| 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 values between the lower and upper bound of the support are included in the support. The support of this distribution is connected.
| |
| isSupportLowerBoundInclusive | back to summary |
|---|---|
| public boolean isSupportLowerBoundInclusive() Implements org. Doc from org. Whether or not the lower bound of support is in the domain of the density
function. Returns true iff
| |
| isSupportUpperBoundInclusive | back to summary |
|---|---|
| public boolean isSupportUpperBoundInclusive() Implements org. Doc from org. Whether or not the upper bound of support is in the domain of the density
function. Returns true iff
| |
| logDensity | back to summary |
|---|---|
| public double logDensity(double x) Overrides org. Doc from org. Returns the natural logarithm of the probability density function (PDF) of this distribution
evaluated at the specified point
| |
| sample | back to summary |
|---|---|
| public double sample() Overrides org. Implements org. Doc from org. Generate a random value sampled from this distribution. The default implementation uses the inversion method. Algorithm Description: this implementation uses the Inversion Method to generate exponentially distributed random values from uniform deviates.
| |