Class ArgumentUtils
java.lang.Object
org.apache.commons.statistics.distribution.ArgumentUtils
Utilities for argument validation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
checkProbability
(double p) Check the probabilityp
is in the interval[0, 1]
.(package private) static boolean
isFiniteStrictlyPositive
(double x) Checks if the valuex
is finite and strictly positive.
-
Constructor Details
-
ArgumentUtils
private ArgumentUtils()No instances.
-
-
Method Details
-
isFiniteStrictlyPositive
static boolean isFiniteStrictlyPositive(double x) Checks if the valuex
is finite and strictly positive.- Parameters:
x
- Value- Returns:
- true if
x > 0
and is finite
-
checkProbability
static void checkProbability(double p) Check the probabilityp
is in the interval[0, 1]
.- Parameters:
p
- Probability- Throws:
IllegalArgumentException
- ifp < 0
orp > 1
-