Package org.eclipse.jgit.util
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 Stats()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(double x)
Add a valuedouble
avg()
int
count()
double
max()
double
min()
double
stddev()
double
var()
-
-
-
Method Detail
-
add
public void add(double x)
Add a value- Parameters:
x
- value
-
count
public int count()
- Returns:
- number of the added values
-
min
public double min()
- Returns:
- minimum of the added values
-
max
public double max()
- Returns:
- maximum of the added values
-
avg
public double avg()
- Returns:
- average of the added values
-
var
public double var()
- Returns:
- variance of the added values
-
stddev
public double stddev()
- Returns:
- standard deviation of the added values
-
-