java.lang.Object
io.jenetics.internal.math.Probabilities
Mathematical functions regarding probabilities.
- Since:
- 1.4
- Version:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
toFloat
(int probability) Maps the integer probability, within the range[Integer.MIN_VALUE, Integer.MAX_VALUE]
back to a float probability within the range[0, 1]
.static int
toInt
(double probability) Maps the probability, given in the range[0, 1]
, to an integer in the range[Integer.MIN_VALUE, Integer.MAX_VALUE]
.static int
toInt
(float probability) Maps the probability, given in the range[0, 1]
, to an integer in the range[Integer.MIN_VALUE, Integer.MAX_VALUE]
.
-
Method Details
-
toInt
Maps the probability, given in the range[0, 1]
, to an integer in the range[Integer.MIN_VALUE, Integer.MAX_VALUE]
.- Parameters:
probability
- the probability to widen.- Returns:
- the widened probability.
- See Also:
-
toInt
Maps the probability, given in the range[0, 1]
, to an integer in the range[Integer.MIN_VALUE, Integer.MAX_VALUE]
.- Parameters:
probability
- the probability to widen.- Returns:
- the widened probability.
- See Also:
-
toFloat
Maps the integer probability, within the range[Integer.MIN_VALUE, Integer.MAX_VALUE]
back to a float probability within the range[0, 1]
.- Parameters:
probability
- the integer probability to map.- Returns:
- the mapped probability within the range
[0, 1]
. - See Also:
-