java.lang.Object
org.eclipse.jgit.util.Stats
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x) Add a valuedoubleavg()Returns the average of the added valuesintcount()Returns the number of added valuesdoublemax()Returns the biggest value addeddoublemin()Returns the smallest value addeddoublestddev()Returns the standard deviation of the added valuesdoublevar()Returns the variance of the added values
-
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
-