org.jfree.data.statistics
Class BoxAndWhiskerCalculator

java.lang.Object
  extended byorg.jfree.data.statistics.BoxAndWhiskerCalculator

public abstract class BoxAndWhiskerCalculator
extends java.lang.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
BoxAndWhiskerCalculator()
           
 
Method Summary
static BoxAndWhiskerItem calculateBoxAndWhiskerStatistics(java.util.List values)
          Calculates the statistics required for a BoxAndWhiskerItem.
static double calculateQ1(java.util.List values)
          Calculates the first quartile for a list of numbers in ascending order.
static double calculateQ3(java.util.List values)
          Calculates the third quartile for a list of numbers in ascending order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxAndWhiskerCalculator

public BoxAndWhiskerCalculator()
Method Detail

calculateBoxAndWhiskerStatistics

public static BoxAndWhiskerItem calculateBoxAndWhiskerStatistics(java.util.List values)
Calculates the statistics required for a BoxAndWhiskerItem.

Any items in the list that are not instances of the Number class are ignored. Likewise, null values are ignored.

Parameters:
values - a list of numbers (a null list is not permitted).
Returns:
Box-and-whisker statistics.

calculateQ1

public static double calculateQ1(java.util.List values)
Calculates the first quartile for a list of numbers in ascending order.

Parameters:
values - the numbers in ascending order.
Returns:
The first quartile.

calculateQ3

public static double calculateQ3(java.util.List values)
Calculates the third quartile for a list of numbers in ascending order.

Parameters:
values - the list of values.
Returns:
The third quartile.