Class Stats

java.lang.Object
org.eclipse.jgit.util.Stats

public class Stats extends Object
Simple double statistics, computed incrementally, variance and standard deviation using Welford's online algorithm, see https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm
Since:
5.1.9
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(double x)
    Add a value
    double
    avg()
    Returns the average of the added values
    int
    Returns the number of added values
    double
    max()
    Returns the biggest value added
    double
    min()
    Returns the smallest value added
    double
    Returns the standard deviation of the added values
    double
    var()
    Returns the variance of the added values

    Methods inherited from class java.lang.Object

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

    • Stats

      public Stats()
  • Method Details

    • add

      public void add(double x)
      Add a value
      Parameters:
      x - value
    • count

      public int count()
      Returns the number of added values
      Returns:
      the number of added values
    • min

      public double min()
      Returns the smallest value added
      Returns:
      the smallest value added
    • max

      public double max()
      Returns the biggest value added
      Returns:
      the biggest value added
    • avg

      public double avg()
      Returns the average of the added values
      Returns:
      the average of the added values
    • var

      public double var()
      Returns the variance of the added values
      Returns:
      the variance of the added values
    • stddev

      public double stddev()
      Returns the standard deviation of the added values
      Returns:
      the standard deviation of the added values