| Modifier and Type | Field and Description |
|---|---|
| public static final double | DEFAULT_INVERSE_ABSOLUTE_ACCURACY
Default inverse cumulative probability accuracy. |
| private final double | densityPrefactor1
The constant value of
|
| private final double | densityPrefactor2
The constant value of
|
| private final double | logDensityPrefactor1
The constant value of
|
| private final double | logDensityPrefactor2
The constant value of
|
| private final double | maxLogY
Upper bound on |
| private final double | minY
Lower bound on |
| private final double | scale
The scale parameter. |
| private static final long | serialVersionUID
Hides org. |
| private final double | shape
The shape parameter. |
| private final double | shiftedShape
The constant value of |
| private final double | solverAbsoluteAccuracy
Hides org. |
| Access | Constructor and Description |
|---|---|
| public | GammaDistribution(double
the shape parameter shape, double the scale parameter scale)Creates a new gamma distribution with specified values of the shape and scale parameters. |
| public | GammaDistribution(double
the shape parameter shape, double the scale parameter scale, double the maximum absolute error in inverse
cumulative probability estimates (defaults to
inverseCumAccuracy)DEFAULT_INVERSE_ABSOLUTE_ACCURACY).Creates a new gamma distribution with specified values of the shape and scale parameters. |
| public | GammaDistribution(RandomGenerator
Random number generator. rng, double the shape parameter shape, double the scale parameter scale)Creates a Gamma distribution. |
| public | GammaDistribution(RandomGenerator
Random number generator. rng, double the shape parameter shape, double the scale parameter scale, double the maximum absolute error in inverse
cumulative probability estimates (defaults to
inverseCumAccuracy)DEFAULT_INVERSE_ABSOLUTE_ACCURACY).Creates a Gamma 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 | Returns: the shape parameter
Deprecated
as of version 3.1,
getShape() should be preferred.
This method will be removed in version 4.0.
Returns the shape parameter of |
| public double | Returns: the scale parameter
Deprecated
as of version 3.1,
getScale() should be preferred.
This method will be removed in version 4.0.
Returns the scale parameter of |
| public double | getNumericalMean()
Implements org. Use this method to get the numerical value of the mean of this distribution. |
| public double | Returns: the variance (possiblyDouble.POSITIVE_INFINITY as
for certain cases in TDistribution) or Double.NaN if it
is not definedImplements org. Use this method to get the numerical value of the variance of this distribution. |
| public double | |
| public double | |
| 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 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: random value sampled from the Gamma(shape, scale) distributionOverrides org. Implements org. This implementation uses the following algorithms: For 0 < shape < 1: Ahrens, J. |
| DEFAULT_INVERSE_ABSOLUTE_ACCURACY | back to summary |
|---|---|
| public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY Default inverse cumulative probability accuracy.
| |
| densityPrefactor1 | back to summary |
|---|---|
| private final double densityPrefactor1 The constant value of
| |
| densityPrefactor2 | back to summary |
|---|---|
| private final double densityPrefactor2 The constant value of
| |
| logDensityPrefactor1 | back to summary |
|---|---|
| private final double logDensityPrefactor1 The constant value of
| |
| logDensityPrefactor2 | back to summary |
|---|---|
| private final double logDensityPrefactor2 The constant value of
| |
| maxLogY | back to summary |
|---|---|
| private final double maxLogY Upper bound on | |
| minY | back to summary |
|---|---|
| private final double minY Lower bound on | |
| scale | back to summary |
|---|---|
| private final double scale The scale parameter. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier. | |
| shape | back to summary |
|---|---|
| private final double shape The shape parameter. | |
| shiftedShape | back to summary |
|---|---|
| private final double shiftedShape The constant value of | |
| solverAbsoluteAccuracy | back to summary |
|---|---|
| private final double solverAbsoluteAccuracy Hides org. Inverse cumulative probability accuracy. | |
| GammaDistribution | back to summary |
|---|---|
| public GammaDistribution(double shape, double scale) throws NotStrictlyPositiveException Creates a new gamma distribution with specified values of the shape and scale parameters. Note this constructor will implicitly create an instance of
| |
| GammaDistribution | back to summary |
|---|---|
| public GammaDistribution(double shape, double scale, double inverseCumAccuracy) throws NotStrictlyPositiveException Creates a new gamma distribution with specified values of the shape and scale parameters. Note this constructor will implicitly create an instance of
| |
| GammaDistribution | back to summary |
|---|---|
| public GammaDistribution(RandomGenerator rng, double shape, double scale) throws NotStrictlyPositiveException Creates a Gamma distribution.
| |
| GammaDistribution | back to summary |
|---|---|
| public GammaDistribution(RandomGenerator rng, double shape, double scale, double inverseCumAccuracy) throws NotStrictlyPositiveException Creates a Gamma 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
| |
| getAlpha | back to summary |
|---|---|
| public double getAlpha()
Deprecated as of version 3.1, Returns the shape parameter of
| |
| getBeta | back to summary |
|---|---|
| public double getBeta()
Deprecated as of version 3.1, Returns the scale parameter of
| |
| 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 shape 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 shape parameter
| |
| getScale | back to summary |
|---|---|
| public double getScale() Returns the scale parameter of
| |
| getShape | back to summary |
|---|---|
| public double getShape() Returns the shape parameter of
| |
| 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
| |
| 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. This implementation uses the following algorithms: For 0 < shape < 1: For shape >= 1:
| |