Package org.jfree.data.statistics
Class BoxAndWhiskerCalculator
java.lang.Object
org.jfree.data.statistics.BoxAndWhiskerCalculator
public abstract class BoxAndWhiskerCalculator extends Object
A utility class that calculates the mean, median, quartiles Q1 and Q3, plus a
list of outlier values...all from an arbitrary list of Number objects.
-
Constructor Summary
Constructors Constructor Description BoxAndWhiskerCalculator() -
Method Summary
Modifier and Type Method Description static BoxAndWhiskerItemcalculateBoxAndWhiskerStatistics(List values)Calculates the statistics required for aBoxAndWhiskerItem.static doublecalculateMean(List values)Deprecated.static doublecalculateMedian(List values)Deprecated.Moved to theStatisticsclass.static doublecalculateMedian(List values, int start, int end)Deprecated.Moved to theStatisticsclass.static doublecalculateQ1(List values)Calculates the first quartile for a list of numbers in ascending order.static doublecalculateQ3(List values)Calculates the third quartile for a list of numbers in ascending order.
-
Constructor Details
-
BoxAndWhiskerCalculator
public BoxAndWhiskerCalculator()
-
-
Method Details
-
calculateBoxAndWhiskerStatistics
Calculates the statistics required for aBoxAndWhiskerItem.Any items in the list that are not instances of the
Numberclass are ignored. Likewise,nullvalues are ignored.- Parameters:
values- A list of numbers (anulllist is not permitted).- Returns:
- Box-and-whisker statistics.
-
calculateQ1
Calculates the first quartile for a list of numbers in ascending order.- Parameters:
values- the numbers in ascending order.- Returns:
- The first quartile.
-
calculateQ3
Calculates the third quartile for a list of numbers in ascending order.- Parameters:
values- the list of values.- Returns:
- The third quartile.
-
calculateMean
Deprecated.This method has been moved to theStatisticsclass.Returns the mean of a list of numbers.- Parameters:
values- a list of numbers.- Returns:
- The mean.
-
calculateMedian
Deprecated.Moved to theStatisticsclass.Calculates the median for a list of values (Numberobjects) that are in ascending order.- Parameters:
values- the values in ascending order.- Returns:
- The median.
-
calculateMedian
Deprecated.Moved to theStatisticsclass.Calculates the median for a sublist within a list of values (Number objects) that are in ascending order.- Parameters:
values- the values in ascending order.start- the start index.end- the end index.- Returns:
- The median.
-
Statisticsclass.