Class Distribution
java.lang.Object
org.gcube.informationsystem.resourceregistry.statistics.Distribution
Average, median and maximum of a set of counts, as the public statistics show them.
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Distribution
- Parameters:
values- the counts, in any order
-
-
Method Details
-
round
public static double round(double value) Rounds a figure to two decimals.- Parameters:
value- the figure- Returns:
- the figure rounded half up to two decimals
-
average
public double average()- Returns:
- the average, rounded to two decimals;
0with no value
-
median
public double median()- Returns:
- the median;
0with no value
-
max
public int max()- Returns:
- the maximum;
0with no value
-