Author: sebb
Date: Mon Jan 17 23:02:05 2011
New Revision: 1060125

URL: http://svn.apache.org/viewvc?rev=1060125&view=rev
Log:
Tab and trailing space removal

Modified:
    
commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java

Modified: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java?rev=1060125&r1=1060124&r2=1060125&view=diff
==============================================================================
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/StatUtilsTest.java
 Mon Jan 17 23:02:05 2011
@@ -424,46 +424,46 @@ public final class StatUtilsTest extends
     }
     
     
-       /**
-        * Run the test with the values 50 and 100 and assume standardized 
values 
-        */
-
-       public void testNormalize1() {
-               double sample[] = { 50, 100 };
-               double expectedSample[] = { -25 / Math.sqrt(1250), 25 / 
Math.sqrt(1250) };
-               double[] out = StatUtils.normalize(sample);
-               for (int i = 0; i < out.length; i++) {
-                       assertEquals(out[i], expectedSample[i]);
-               }
-
-       }
-
-       /**
-        * Run with 77 random values, assuming that the outcome has a mean of 0 
and a standard deviation of 1 with a
-        * precision of 1E-10.
-        */
-
-       public void testNormalize2() {
-               // create an sample with 77 values 
-               int length = 77;
-               double sample[] = new double[length];
-               for (int i = 0; i < length; i++) {
-                       sample[i] = Math.random();
-               }
-               // normalize this sample
-               double standardizedSample[] = StatUtils.normalize(sample);
-
-               DescriptiveStatistics stats = new DescriptiveStatistics();
-               // Add the data from the array
-               for (int i = 0; i < length; i++) {
-                       stats.addValue(standardizedSample[i]);
-               }
-               // the calculations do have a limited precision  
-               double distance = 1E-10;
-               // check the mean an standard deviation
-               assertEquals(0.0, stats.getMean(), distance);
-               assertEquals(1.0, stats.getStandardDeviation(), distance);
+    /**
+     * Run the test with the values 50 and 100 and assume standardized values  
  
+     */
+
+    public void testNormalize1() {
+        double sample[] = { 50, 100 };
+        double expectedSample[] = { -25 / Math.sqrt(1250), 25 / 
Math.sqrt(1250) };
+        double[] out = StatUtils.normalize(sample);
+        for (int i = 0; i < out.length; i++) {
+            assertEquals(out[i], expectedSample[i]);
+        }
 
-       }
+    }
+
+    /**
+     * Run with 77 random values, assuming that the outcome has a mean of 0 
and a standard deviation of 1 with a
+     * precision of 1E-10.
+     */
+
+    public void testNormalize2() {
+        // create an sample with 77 values    
+        int length = 77;
+        double sample[] = new double[length];
+        for (int i = 0; i < length; i++) {
+            sample[i] = Math.random();
+        }
+        // normalize this sample
+        double standardizedSample[] = StatUtils.normalize(sample);
+
+        DescriptiveStatistics stats = new DescriptiveStatistics();
+        // Add the data from the array
+        for (int i = 0; i < length; i++) {
+            stats.addValue(standardizedSample[i]);
+        }
+        // the calculations do have a limited precision    
+        double distance = 1E-10;
+        // check the mean an standard deviation
+        assertEquals(0.0, stats.getMean(), distance);
+        assertEquals(1.0, stats.getStandardDeviation(), distance);
+
+    }
     
 }


Reply via email to