Class Probabilities

java.lang.Object
io.jenetics.internal.math.Probabilities

public final class Probabilities extends Object
Mathematical functions regarding probabilities.
Since:
1.4
Version:
5.2
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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].

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toInt

      public 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].
      Parameters:
      probability - the probability to widen.
      Returns:
      the widened probability.
      See Also:
    • toInt

      public 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].
      Parameters:
      probability - the probability to widen.
      Returns:
      the widened probability.
      See Also:
    • toFloat

      public static 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].
      Parameters:
      probability - the integer probability to map.
      Returns:
      the mapped probability within the range [0, 1].
      See Also: