Class MathUtils


  • public final class MathUtils
    extends Object
    Some simple mathematical computation utility methods.
    • Method Detail

      • harmonicMean

        public static double harmonicMean​(double v1,
                                          double v2)
        Returns the harmonic mean of v1 and v2, giving both arguments equal weight.
      • harmonicMean

        public static double harmonicMean​(double v1,
                                          double v2,
                                          double w1,
                                          double w2)
        Returns the harmonic mean of v1 and v2, weighting them by w1 and w2, respectively.
      • arithmeticMean

        public static double arithmeticMean​(double v1,
                                            double v2,
                                            double w1,
                                            double w2)
        Returns the arithmetic mean of v1 and v2, weighting them by w1 and w2, respectively.