Class ArgumentUtils
- java.lang.Object
-
- org.apache.commons.statistics.distribution.ArgumentUtils
-
final class ArgumentUtils extends java.lang.Object
Utilities for argument validation.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ArgumentUtils()
No instances.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (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.
-
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException
- ifp < 0
orp > 1
-
-