Class Distribution
java.lang.Object
com.djrapitops.plan.utilities.analysis.Distribution
Utility for calculating nth percentile values, e.g. 95th percentile.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(double value) void
addPositive
(long[] values, UnaryOperator<Long> mappingFunction) getNthPercentile
(double percentile) Get the highest value within a percentile.void
reset()
-
Constructor Details
-
Distribution
public Distribution()
-
-
Method Details
-
add
public void add(double value) -
getNthPercentile
Get the highest value within a percentile.- Parameters:
percentile
- Percentage 0.0 to 1.0 of values to include- Returns:
- Highest value that matches percentile
-
reset
public void reset() -
addPositive
-