Class Math

  • All Implemented Interfaces:

    
    public final class Math
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • advancedLogistic

         final static Double advancedLogistic(Double sigma, Double tau, Double parameters)
        Parameters:
        sigma - Steepness parameter of the advanced logistic function.
        tau - Threshold parameter of the advanced logistic function.
      • closestTo

         final static Double closestTo(Double reference, Double v1, Double v2)
        Parameters:
        reference - the value
        v1 - first value to compare to
        v2 - second value to compare to
        Returns:

        v1 if val is closer to v1 than to v2, v2 otherwise

      • fuzzyEquals

         final static Boolean fuzzyEquals(Double a, Double b)

        Compares two double values, taking care of computing a relative error tolerance threshold.

        Parameters:
        a - first double
        b - second double
        Returns:

        true if the double are equals with a precision order of DOUBLE_EQUALITY_EPSILON

      • fuzzyGreaterEquals

         final static Boolean fuzzyGreaterEquals(Double a, Double b)

        Compares two double values, taking care of computing a relative error tolerance threshold.

        Parameters:
        a - first double
        b - second double
        Returns:

        true if a >= b, or if fuzzyEquals(a, b).

      • fuzzySmallerEquals

         final static Boolean fuzzySmallerEquals(Double a, Double b)

        Compares two double values, taking care of computing a relative error tolerance threshold.

        Parameters:
        a - first double
        b - second double
        Returns:

        true if a <= b, or if fuzzyEquals(a, b).