KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > data > MeanAndStandardDeviation


1 /* ======================================
2  * JFreeChart : a free Java chart library
3  * ======================================
4  *
5  * Project Info: http://www.jfree.org/jfreechart/index.html
6  * Project Lead: David Gilbert (david.gilbert@object-refinery.com);
7  *
8  * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
9  *
10  * This library is free software; you can redistribute it and/or modify it under the terms
11  * of the GNU Lesser General Public License as published by the Free Software Foundation;
12  * either version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License along with this
19  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20  * Boston, MA 02111-1307, USA.
21  *
22  * -----------------------------
23  * MeanAndStandardDeviation.java
24  * -----------------------------
25  * (C) Copyright 2003, by Object Refinery Limited.
26  *
27  * Original Author: David Gilbert (for Object Refinery Limited);
28  * Contributor(s): -;
29  *
30  * $Id: MeanAndStandardDeviation.java,v 1.4 2003/11/12 17:18:20 mungady Exp $
31  *
32  * Changes:
33  * --------
34  * 05-Feb-2002 : Version 1 (DG);
35  *
36  */

37
38 package org.jfree.data;
39
40 /**
41  * A simple data structure that holds a mean value and a standard deviation value. This
42  * is used in the {@link org.jfree.data.statistics.DefaultStatisticalCategoryDataset} class.
43  *
44  * @author David Gilbert
45  */

46 public class MeanAndStandardDeviation {
47
48     /** The mean. */
49     private Number JavaDoc mean;
50
51     /** The standard deviation. */
52     private Number JavaDoc standardDeviation;
53
54     /**
55      * Creates a new mean and standard deviation record.
56      *
57      * @param mean the mean.
58      * @param standardDeviation the standard deviation.
59      */

60     public MeanAndStandardDeviation(Number JavaDoc mean, Number JavaDoc standardDeviation) {
61         this.mean = mean;
62         this.standardDeviation = standardDeviation;
63     }
64
65     /**
66      * Returns the mean.
67      *
68      * @return The mean.
69      */

70     public Number JavaDoc getMean() {
71         return this.mean;
72     }
73
74     /**
75      * Returns the standard deviation.
76      *
77      * @return The standard deviation.
78      */

79     public Number JavaDoc getStandardDeviation() {
80         return this.standardDeviation;
81     }
82
83 }
84
Popular Tags