Top Description Fields Constructors Methods
org.eclipse.jgit.util

public Class Stats

extends Object
Class Inheritance

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

Field Summary

Modifier and TypeField and Description
private double
private double
private double
private int
n

private double

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(double
value
x
)

Add a value

public double

Returns:

the average of the added values
avg
()

Returns the average of the added values

public int

Returns:

the number of added values
count
()

Returns the number of added values

public double

Returns:

the biggest value added
max
()

Returns the biggest value added

public double

Returns:

the smallest value added
min
()

Returns the smallest value added

public double

Returns:

the standard deviation of the added values
stddev
()

Returns the standard deviation of the added values

public double

Returns:

the variance of the added values
var
()

Returns the variance of the added values

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

avgback to summary
private double avg
maxback to summary
private double max
minback to summary
private double min
nback to summary
private int n
sumback to summary
private double sum

Constructor Detail

Statsback to summary
public Stats()

Method Detail

addback to summary
public void add(double x)

Add a value

Parameters
x:double

value

avgback to summary
public double avg()

Returns the average of the added values

Returns:double

the average of the added values

countback to summary
public int count()

Returns the number of added values

Returns:int

the number of added values

maxback to summary
public double max()

Returns the biggest value added

Returns:double

the biggest value added

minback to summary
public double min()

Returns the smallest value added

Returns:double

the smallest value added

stddevback to summary
public double stddev()

Returns the standard deviation of the added values

Returns:double

the standard deviation of the added values

varback to summary
public double var()

Returns the variance of the added values

Returns:double

the variance of the added values