KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > data > statistics > BoxAndWhiskerXYDataset


1 /* ===========================================================
2  * JFreeChart : a free chart library for the Java(tm) platform
3  * ===========================================================
4  *
5  * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
6  *
7  * Project Info: http://www.jfree.org/jfreechart/index.html
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this library; if not, write to the Free Software Foundation,
21  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
24  * in the United States and other countries.]
25  *
26  * ---------------------------
27  * BoxAndWhiskerXYDataset.java
28  * ---------------------------
29  * (C) Copyright 2003, by David Browning and Contributors.
30  *
31  * Original Author: David Browning (for Australian Institute of Marine
32  * Science);
33  * Contributor(s): David Gilbert (for Object Refinery Limited);
34  *
35  * $Id: BoxAndWhiskerXYDataset.java,v 1.3 2005/03/28 19:44:07 mungady Exp $
36  *
37  * Changes
38  * -------
39  * 05-Aug-2003 : Version 1, contributed by David Browning (DG);
40  * 12-Aug-2003 : Added new methods: getMaxNonOutlierValue
41  * getMaxNonFaroutValue
42  * getOutlierCoefficient
43  * setOutlierCoefficient
44  * getFaroutCoefficient
45  * setFaroutCoefficient
46  * getInterquartileRange (DB)
47  * 27-Aug-2003 : Renamed BoxAndWhiskerDataset --> BoxAndWhiskerXYDataset, and
48  * cut down methods (DG);
49  *
50  */

51
52 package org.jfree.data.statistics;
53
54 import java.util.List JavaDoc;
55
56 import org.jfree.data.xy.XYDataset;
57
58 /**
59  * An interface that defines data in the form of (x, max, min, average, median)
60  * tuples.
61  * <P>
62  * Example: JFreeChart uses this interface to obtain data for AIMS
63  * max-min-average-median plots.
64  *
65  * @author David Browning
66  */

67 public interface BoxAndWhiskerXYDataset extends XYDataset {
68
69     /**
70      * Returns the mean for the specified series and item.
71      *
72      * @param series the series (zero-based index).
73      * @param item the item (zero-based index).
74      *
75      * @return The mean for the specified series and item.
76      */

77     public Number JavaDoc getMeanValue(int series, int item);
78
79     /**
80      * Returns the median-value for the specified series and item.
81      *
82      * @param series the series (zero-based index).
83      * @param item the item (zero-based index).
84      *
85      * @return The median-value for the specified series and item.
86      */

87     public Number JavaDoc getMedianValue(int series, int item);
88
89     /**
90      * Returns the Q1 median-value for the specified series and item.
91      *
92      * @param series the series (zero-based index).
93      * @param item the item (zero-based index).
94      *
95      * @return The Q1 median-value for the specified series and item.
96      */

97     public Number JavaDoc getQ1Value(int series, int item);
98
99     /**
100      * Returns the Q3 median-value for the specified series and item.
101      *
102      * @param series the series (zero-based index).
103      * @param item the item (zero-based index).
104      *
105      * @return The Q3 median-value for the specified series and item.
106      */

107     public Number JavaDoc getQ3Value(int series, int item);
108
109     /**
110      * Returns the min-value for the specified series and item.
111      *
112      * @param series the series (zero-based index).
113      * @param item the item (zero-based index).
114      *
115      * @return The min-value for the specified series and item.
116      */

117     public Number JavaDoc getMinRegularValue(int series, int item);
118
119     /**
120      * Returns the max-value for the specified series and item.
121      *
122      * @param series the series (zero-based index).
123      * @param item the item (zero-based index).
124      *
125      * @return The max-value for the specified series and item.
126      */

127     public Number JavaDoc getMaxRegularValue(int series, int item);
128
129     /**
130      * Returns the minimum value which is not a farout.
131      * @param series the series (zero-based index).
132      * @param item the item (zero-based index).
133      *
134      * @return A <code>Number</code> representing the maximum non-farout value.
135      */

136     public Number JavaDoc getMinOutlier(int series, int item);
137
138     /**
139      * Returns the maximum value which is not a farout, ie Q3 + (interquartile
140      * range * farout coefficient).
141      *
142      * @param series the series (zero-based index).
143      * @param item the item (zero-based index).
144      *
145      * @return A <code>Number</code> representing the maximum non-farout value.
146      */

147     public Number JavaDoc getMaxOutlier(int series, int item);
148     
149     /**
150      * Returns an array of outliers for the specified series and item.
151      *
152      * @param series the series (zero-based index).
153      * @param item the item (zero-based index).
154      *
155      * @return The array of outliers for the specified series and item.
156      */

157     public List JavaDoc getOutliers(int series, int item);
158
159     /**
160      * Returns the value used as the outlier coefficient. The outlier
161      * coefficient gives an indication of the degree of certainty in an
162      * unskewed distribution. Increasing the coefficient increases the number
163      * of values included. Currently only used to ensure farout coefficient
164      * is greater than the outlier coefficient
165      *
166      * @return A <code>double</code> representing the value used to calculate
167      * outliers
168      */

169     public double getOutlierCoefficient();
170
171     /**
172      * Returns the value used as the farout coefficient. The farout coefficient
173      * allows the calculation of which values will be off the graph.
174      *
175      * @return A <code>double</code> representing the value used to calculate
176      * farouts
177      */

178     public double getFaroutCoefficient();
179
180 }
181
Popular Tags