Update of /var/cvs/speeltuin/mihxil/statistics/src/org/mmbase/math
In directory james.mmbase.org:/tmp/cvs-serv17039/src/org/mmbase/math

Modified Files:
        Measurement.java 
Log Message:
no point in showing std if only one value


See also: 
http://cvs.mmbase.org/viewcvs/speeltuin/mihxil/statistics/src/org/mmbase/math


Index: Measurement.java
===================================================================
RCS file: 
/var/cvs/speeltuin/mihxil/statistics/src/org/mmbase/math/Measurement.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Measurement.java    16 Oct 2008 11:26:08 -0000      1.8
+++ Measurement.java    20 Nov 2008 16:32:08 -0000      1.9
@@ -19,7 +19,7 @@
  *
  * @author Michiel Meeuwissen
  * @since  mm-statistics-1.0
- * @version $Id: Measurement.java,v 1.8 2008/10/16 11:26:08 michiel Exp $
+ * @version $Id: Measurement.java,v 1.9 2008/11/20 16:32:08 michiel Exp $
  */
 
 
@@ -100,6 +100,13 @@
         return count;
     }
 
+    public double getSum() {
+        return sum;
+    }
+    public double getSumOfSquares() {
+        return squareSum;
+    }
+
     /**
      * Operator overloading would be very handy here, but java sucks.
      */
@@ -279,8 +286,10 @@
         return
             (useE ? "(" : "") +
             nf.format(mean.coefficient) +
+            (count > 1 ? (
             " \u00B1 " + /* +/- */
-            nf.format(std.coefficient) +
+                          nf.format(std.coefficient)
+                          ) : "" )  +
             (useE ?
              (")\u00B710" + /* .10 */
               superscript(mean.exponent))
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to