commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r924345 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ode/jacobians/ test/java/org/apache/commons/math/ test/java/org/apache/commons/math/analysis/interpolation/ test/java/org/apache/commons/math/complex/ test/java/...
Date Wed, 17 Mar 2010 16:03:56 GMT
Author: psteitz
Date: Wed Mar 17 16:03:56 2010
New Revision: 924345

URL: http://svn.apache.org/viewvc?rev=924345&view=rev
Log:
Removed tabs and trailing spaces.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/package.html
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/TestUtils.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BinomialDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/PoissonDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestBinary.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/AbstractRealVectorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/fitting/CurveFitterTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/RandomDataTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/special/ErfTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/UnivariateStatisticAbstractTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/moment/SemiVarianceTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/package.html
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/package.html?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/package.html
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/package.html
Wed Mar 17 16:03:56 2010
@@ -164,9 +164,9 @@ before the call to integrate does the tr
 <code><pre>
     StpeHandlerWithJacobians stepHandler = new StpeHandlerWithJacobians() {
             public void reset() {}
-            
+
             public boolean requiresDenseOutput() { return false; }
-            
+
             public void handleStep(StepInterpolatorWithJacobians interpolator, boolean isLast)
                 throws DerivativeException {
                 double   t = interpolator.getCurrentTime();
@@ -221,7 +221,7 @@ public class EnhancedCircleODE implement
         dFdP[1][0] = -omega;
         dFdP[1][1] = 0;
         dFdP[1][2] = y[0] - c[0];
- 
+
     }
 
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/TestUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/TestUtils.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/TestUtils.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/TestUtils.java Wed Mar
17 16:03:56 2010
@@ -345,12 +345,12 @@ public class TestUtils {
             Assert.assertEquals(m[i],n[i]);
         }
     }
-    
+
     /**
      * Computes the sum of squared deviations of <values> from <target>
      * @param values array of deviates
      * @param target value to compute deviations from
-     * 
+     *
      * @return sum of squared deviations
      */
     public static double sumSquareDev(double[] values, double target) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/MicrosphereInterpolatorTest.java
Wed Mar 17 16:03:56 2010
@@ -23,8 +23,8 @@ import org.junit.Test;
 
 /**
  * Testcase for the "microsphere projection" interpolator.
- * 
- * @version $Revision$ $Date$ 
+ *
+ * @version $Revision$ $Date$
  */
 public final class MicrosphereInterpolatorTest {
     /**

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
Wed Mar 17 16:03:56 2010
@@ -144,14 +144,14 @@ public class ComplexTest extends TestCas
         assertEquals(39.0 / 61.0, z.getReal(), 1.0e-5);
         assertEquals(2.0 / 61.0, z.getImaginary(), 1.0e-5);
     }
-    
+
     public void testDivideReal() {
         Complex x = new Complex(2d, 3d);
         Complex y = new Complex(2d, 0d);
         assertEquals(new Complex(1d, 1.5), x.divide(y));
-        
+
     }
-    
+
     public void testDivideImaginary() {
         Complex x = new Complex(2d, 3d);
         Complex y = new Complex(0d, 2d);
@@ -177,7 +177,7 @@ public class ComplexTest extends TestCas
         assertTrue(Double.isNaN(z.getReal()));
         assertTrue(Double.isNaN(z.getImaginary()));
     }
-    
+
     public void testDivideZero() {
         Complex x = new Complex(3.0, 4.0);
         Complex z = x.divide(Complex.ZERO);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BinomialDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BinomialDistributionTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BinomialDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/BinomialDistributionTest.java
Wed Mar 17 16:03:56 2010
@@ -16,7 +16,7 @@ package org.apache.commons.math.distribu
 /**
  * Test cases for BinomialDistribution. Extends IntegerDistributionAbstractTest.
  * See class javadoc for IntegerDistributionAbstractTest for details.
- * 
+ *
  * @version $Revision$ $Date: 2009-09-05 12:36:48 -0500 (Sat, 05 Sep
  *          2009) $
  */
@@ -24,7 +24,7 @@ public class BinomialDistributionTest ex
 
     /**
      * Constructor for BinomialDistributionTest.
-     * 
+     *
      * @param name
      */
     public BinomialDistributionTest(String name) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/PoissonDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/PoissonDistributionTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/PoissonDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/distribution/PoissonDistributionTest.java
Wed Mar 17 16:03:56 2010
@@ -167,11 +167,11 @@ public class PoissonDistributionTest ext
                 }
                 x -= dx;
             }
- 
+
             mean *= 10.0;
         }
     }
-    
+
     /**
      * JIRA: MATH-282
      */
@@ -185,7 +185,7 @@ public class PoissonDistributionTest ext
         dist.setMean(6986);
         checkProbability(dist, 6950);
     }
-    
+
     private void checkProbability(PoissonDistribution dist, double x) throws Exception {
         double p = dist.cumulativeProbability(x);
         assertFalse("NaN cumulative probability returned for mean = " +
@@ -201,7 +201,7 @@ public class PoissonDistributionTest ext
             dist.setMean(mean);
             double p = 0.1;
             double dp = p;
-            while (p < .99) { 
+            while (p < .99) {
                 double ret = Double.NaN;
                 try {
                     ret = dist.inverseCumulativeProbability(p);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestBinary.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestBinary.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestBinary.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/genetics/GeneticAlgorithmTestBinary.java
Wed Mar 17 16:03:56 2010
@@ -48,7 +48,7 @@ public class GeneticAlgorithmTestBinary 
                 MUTATION_RATE,
                 new TournamentSelection(TOURNAMENT_ARITY)
         );
-        
+
         assertEquals(0, ga.getGenerationsEvolved());
 
         // initial population
@@ -70,7 +70,7 @@ public class GeneticAlgorithmTestBinary 
 
         assertTrue(bestFinal.compareTo(bestInitial) > 0);
         assertEquals(NUM_GENERATIONS, ga.getGenerationsEvolved());
- 
+
     }
 
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/AbstractRealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/AbstractRealVectorTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/AbstractRealVectorTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/AbstractRealVectorTest.java
Wed Mar 17 16:03:56 2010
@@ -8,7 +8,7 @@ import java.util.Iterator;
 import java.util.Random;
 
 /**
- * 
+ *
  */
 public class AbstractRealVectorTest extends TestCase {
     private double[] vec1 = { 1d, 2d, 3d, 4d, 5d };
@@ -23,7 +23,7 @@ public class AbstractRealVectorTest exte
 
         @Override
         public double[] getData() { return values; }
-        
+
         @Override
         public AbstractRealVector copy() {
             return new TestVectorImpl(values.clone());

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java
Wed Mar 17 16:03:56 2010
@@ -145,11 +145,11 @@ public class EigenDecompositionImplTest 
 
         double[] mainTridiagonal = {
               7484.860960227216, 18405.28129035345, 13855.225609560746,
-             10016.708722343366, 559.8117399576674, 6750.190788301587, 
+             10016.708722343366, 559.8117399576674, 6750.190788301587,
                 71.21428769782159
         };
         double[] secondaryTridiagonal = {
-             -4175.088570476366,1975.7955858241994,5193.178422374075, 
+             -4175.088570476366,1975.7955858241994,5193.178422374075,
               1995.286659169179,75.34535882933804,-234.0808002076056
         };
 
@@ -371,9 +371,9 @@ public class EigenDecompositionImplTest 
      */
     public void testZeroDivide() {
         RealMatrix indefinite = MatrixUtils.createRealMatrix(new double [][] {
-                { 0.0, 1.0, -1.0 }, 
-                { 1.0, 1.0, 0.0 }, 
-                { -1.0,0.0, 1.0 }        
+                { 0.0, 1.0, -1.0 },
+                { 1.0, 1.0, 0.0 },
+                { -1.0,0.0, 1.0 }
         });
         EigenDecomposition ed = new EigenDecompositionImpl(indefinite, MathUtils.SAFE_MIN);
         checkEigenValues((new double[] {2, 1, -1}), ed, 1E-12);
@@ -398,7 +398,7 @@ public class EigenDecompositionImplTest 
         }
     }
 
-    
+
     /**
      * Returns true iff there is an entry within tolerance of value in
      * searchArray.

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SingularValueSolverTest.java
Wed Mar 17 16:03:56 2010
@@ -71,7 +71,7 @@ public class SingularValueSolverTest {
                                });
         DecompositionSolver solver = new SingularValueDecompositionImpl(m).getSolver();
         RealMatrix b = MatrixUtils.createRealMatrix(new double[][] {
-            { 11, 12 }, { 21, 22 } 
+            { 11, 12 }, { 21, 22 }
         });
         RealMatrix xMatrix = solver.solve(b);
         Assert.assertEquals(11, xMatrix.getEntry(0, 0), 1.0e-15);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java
Wed Mar 17 16:03:56 2010
@@ -190,14 +190,14 @@ public class FirstOrderIntegratorWithJac
         final FirstOrderIntegratorWithJacobians extInt =
             new FirstOrderIntegratorWithJacobians(integ, circle);
         extInt.addStepHandler(new StepHandlerWithJacobians() {
-            
+
             public void reset() {
             }
-            
+
             public boolean requiresDenseOutput() {
                 return false;
             }
-            
+
             public void handleStep(StepInterpolatorWithJacobians interpolator, boolean isLast)
                 throws DerivativeException {
                 double     t     = interpolator.getCurrentTime();
@@ -363,7 +363,7 @@ public class FirstOrderIntegratorWithJac
             dFdP[1][0] = -omega;
             dFdP[1][1] = 0;
             dFdP[1][2] = y[0] - cx;
- 
+
         }
 
         public double[] exactY(double t) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/fitting/CurveFitterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/fitting/CurveFitterTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/fitting/CurveFitterTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/fitting/CurveFitterTest.java
Wed Mar 17 16:03:56 2010
@@ -84,7 +84,7 @@ public class CurveFitterTest {
             if (doubles.length >= 2) {
                 gradientVector[1] = 1;
             }
-            return gradientVector; 
+            return gradientVector;
         }
     }
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/EmpiricalDistributionTest.java
Wed Mar 17 16:03:56 2010
@@ -216,7 +216,7 @@ public final class EmpiricalDistribution
             fail("wrong exception caught");
         }
     }
-    
+
     /**
      * MATH-298
      */
@@ -228,7 +228,7 @@ public final class EmpiricalDistribution
         double[] expectedGeneratorUpperBounds = {4d/13d, 7d/13d, 9d/13d, 11d/13d, 1};
         double tol = 10E-12;
         TestUtils.assertEquals(expectedBinUpperBounds, dist.getUpperBounds(), tol);
-        TestUtils.assertEquals(expectedGeneratorUpperBounds, dist.getGeneratorUpperBounds(),
tol);  
+        TestUtils.assertEquals(expectedGeneratorUpperBounds, dist.getGeneratorUpperBounds(),
tol);
     }
 
     private void verifySame(EmpiricalDistribution d1, EmpiricalDistribution d2) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/RandomDataTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/RandomDataTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/RandomDataTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/random/RandomDataTest.java
Wed Mar 17 16:03:56 2010
@@ -218,7 +218,7 @@ public class RandomDataTest extends Retr
         }
 
     }
-    /* TODO: re-enable when MATH-282 is resolved 
+    /* TODO: re-enable when MATH-282 is resolved
     public void testNextPoissonConsistency() throws Exception {
         // Small integral means
         for (int i = 1; i < 100; i++) {
@@ -229,15 +229,15 @@ public class RandomDataTest extends Retr
         for (int i = 1; i < 10; i++) {
             checkNextPoissonConsistency(randomData.nextUniform(1, 1000));
         }
-        // large means 
+        // large means
         // TODO: When MATH-282 is resolved, s/3000/10000 below
         for (int i = 1; i < 10; i++) {
             checkNextPoissonConsistency(randomData.nextUniform(1000, 3000));
         }
     }
     */
-    
-    /** 
+
+    /**
      * Verifies that nextPoisson(mean) generates an empirical distribution of values
      * consistent with PoissonDistributionImpl by generating 1000 values, computing a
      * grouped frequency distribution of the observed values and comparing this distribution
@@ -249,9 +249,9 @@ public class RandomDataTest extends Retr
     public void checkNextPoissonConsistency(double mean) throws Exception {
         // Generate sample values
         int sampleSize = 1000;        // Number of deviates to generate
-        int minExpectedCount = 7;     // Minimum size of expected bin count 
-        long maxObservedValue = 0;   
-        double alpha = 0.001;         // Probability of false failure         
+        int minExpectedCount = 7;     // Minimum size of expected bin count
+        long maxObservedValue = 0;
+        double alpha = 0.001;         // Probability of false failure
         Frequency frequency = new Frequency();
         for (int i = 0; i < sampleSize; i++) {
             long value = randomData.nextPoisson(mean);
@@ -260,9 +260,9 @@ public class RandomDataTest extends Retr
             }
             frequency.addValue(value);
         }
-        
+
         /*
-         *  Set up bins for chi-square test.  
+         *  Set up bins for chi-square test.
          *  Ensure expected counts are all at least minExpectedCount.
          *  Start with upper and lower tail bins.
          *  Lower bin = [0, lower); Upper bin = [upper, +inf).
@@ -276,7 +276,7 @@ public class RandomDataTest extends Retr
         while ((1 - poissonDistribution.cumulativeProbability(upper - 1)) * sampleSize <
minExpectedCount) {
             upper--;
         }
-        
+
         // Set bin width for interior bins.  For poisson, only need to look at end bins.
         int binWidth = 1;
         boolean widthSufficient = false;
@@ -288,12 +288,12 @@ public class RandomDataTest extends Retr
             widthSufficient = Math.min(lowerBinMass, upperBinMass) * sampleSize >= minExpectedCount;
             binWidth++;
         }
-       
+
         /*
          *  Determine interior bin bounds.  Bins are
-         *  [1, lower = binBounds[0]), [lower, binBounds[1]), [binBounds[1], binBounds[2]),
... , 
+         *  [1, lower = binBounds[0]), [lower, binBounds[1]), [binBounds[1], binBounds[2]),
... ,
          *    [binBounds[binCount - 2], upper = binBounds[binCount - 1]), [upper, +inf)
-         *  
+         *
          */
         List<Integer> binBounds = new ArrayList<Integer>();
         binBounds.add(lower);
@@ -304,26 +304,26 @@ public class RandomDataTest extends Retr
         }
         binBounds.add(bound);
         binBounds.add(upper);
-        
+
         // Compute observed and expected bin counts
-        final int binCount = binBounds.size() + 1; 
+        final int binCount = binBounds.size() + 1;
         long[] observed = new long[binCount];
         double[] expected = new double[binCount];
-        
+
         // Bottom bin
         observed[0] = 0;
         for (int i = 0; i < lower; i++) {
             observed[0] += frequency.getCount(i);
         }
         expected[0] = poissonDistribution.cumulativeProbability(lower - 1) * sampleSize;
-        
+
         // Top bin
         observed[binCount - 1] = 0;
         for (int i = upper; i <= maxObservedValue; i++) {
             observed[binCount - 1] += frequency.getCount(i);
         }
         expected[binCount - 1] = (1 - poissonDistribution.cumulativeProbability(upper - 1))
* sampleSize;
-        
+
         // Interior bins
         for (int i = 1; i < binCount - 1; i++) {
             observed[i] = 0;
@@ -333,7 +333,7 @@ public class RandomDataTest extends Retr
             expected[i] = (poissonDistribution.cumulativeProbability(binBounds.get(i) - 1)
-
                 poissonDistribution.cumulativeProbability(binBounds.get(i - 1) -1)) * sampleSize;
         }
-        
+
         // Use chisquare test to verify that generated values are poisson(mean)-distributed
         ChiSquareTest chiSquareTest = new ChiSquareTestImpl();
         try {
@@ -366,7 +366,7 @@ public class RandomDataTest extends Retr
             msgBuffer.append(alpha);
             msgBuffer.append(".");
             fail(msgBuffer.toString());
-        }  
+        }
     }
 
     /** test dispersion and failute modes for nextHex() */
@@ -754,12 +754,12 @@ public class RandomDataTest extends Retr
 
         }
     }
-    
+
     // Disable until we have equals
     //public void testSerial() {
     //    assertEquals(randomData, TestUtils.serializeAndRecover(randomData));
     //}
-    
+
     private int findPerm(int[][] p, int[] samp) {
         for (int i = 0; i < p.length; i++) {
             boolean good = true;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/special/ErfTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/special/ErfTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/special/ErfTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/special/ErfTest.java Wed
Mar 17 16:03:56 2010
@@ -75,7 +75,7 @@ public class ErfTest extends TestCase {
         expected = -expected;
         assertEquals(expected, actual, 1.0e-5);
     }
-    
+
     /**
      * MATH-301
      */
@@ -83,7 +83,7 @@ public class ErfTest extends TestCase {
         for (int i = 1; i < 200; i++) {
             double result = Erf.erf(i);
             assertFalse(Double.isNaN(result));
-            assertTrue(result > 0 && result <= 1);  
+            assertTrue(result > 0 && result <= 1);
         }
     }
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/clustering/KMeansPlusPlusClustererTest.java
Wed Mar 17 16:03:56 2010
@@ -93,10 +93,10 @@ public class KMeansPlusPlusClustererTest
         assertTrue(cluster3Found);
 
     }
-    
+
     /**
      * JIRA: MATH-305
-     * 
+     *
      * Two points, one cluster, one iteration
      */
     @Test
@@ -114,6 +114,6 @@ public class KMeansPlusPlusClustererTest
         assertTrue(clusters.get(0).getPoints().contains(pt1));
         assertTrue(clusters.get(0).getPoints().contains(pt2));
 
-    } 
+    }
 
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/UnivariateStatisticAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/UnivariateStatisticAbstractTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/UnivariateStatisticAbstractTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/UnivariateStatisticAbstractTest.java
Wed Mar 17 16:03:56 2010
@@ -170,10 +170,10 @@ public abstract class UnivariateStatisti
         TestUtils.assertRelativelyEquals(statistic.evaluate(repeatedValues),
                 weightedStatistic.evaluate(values, weights, 0, values.length),
                 10E-14);
-        
+
         // Check consistency of weighted evaluation methods
         assertEquals(weightedStatistic.evaluate(values, weights, 0, values.length),
-                weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);       
+                weightedStatistic.evaluate(values, weights), Double.MIN_VALUE);
 
     }
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/moment/SemiVarianceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/moment/SemiVarianceTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/moment/SemiVarianceTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/moment/SemiVarianceTest.java
Wed Mar 17 16:03:56 2010
@@ -70,7 +70,7 @@ public class SemiVarianceTest extends Te
         final double upsideSemiVariance = sv.evaluate(values);
         assertEquals(TestUtils.sumSquareDev(new double[] {22d, 11d, 14d}, mean) / (length
- 1),
                 upsideSemiVariance, 1E-14);
-        
+
         // Verify that upper + lower semivariance against the mean sum to variance
         assertEquals(StatUtils.variance(values), downsideSemiVariance + upsideSemiVariance,
10e-12);
     }
@@ -131,12 +131,12 @@ public class SemiVarianceTest extends Te
         double upper = sv.evaluate(values, target);
         assertEquals(totalSumOfSquares / (values.length - 1), lower + upper, 10e-12);
     }
-    
+
     public void testNoVariance() {
         final double[] values = {100d, 100d, 100d, 100d};
         SemiVariance sv = new SemiVariance();
         assertEquals(0, sv.evaluate(values), 10E-12);
         assertEquals(0, sv.evaluate(values, 100d), 10E-12);
-        assertEquals(0, sv.evaluate(values, 100d, SemiVariance.UPSIDE_VARIANCE, false, 0,
values.length), 10E-12); 
+        assertEquals(0, sv.evaluate(values, 100d, SemiVariance.UPSIDE_VARIANCE, false, 0,
values.length), 10E-12);
     }
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java?rev=924345&r1=924344&r2=924345&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/MathUtilsTest.java
Wed Mar 17 16:03:56 2010
@@ -533,7 +533,7 @@ public final class MathUtilsTest extends
             // expected
         }
     }
-    
+
     public void testGcdConsistency() {
         int[] primeList = {19, 23, 53, 67, 73, 79, 101, 103, 111, 131};
         ArrayList<Integer> primes = new ArrayList<Integer>();
@@ -742,7 +742,7 @@ public final class MathUtilsTest extends
         } catch (ArithmeticException expected) {
             // expected
         }
-        
+
         try {
             // lcm == abs(MIN_VALUE) cannot be represented as a nonnegative int
             MathUtils.lcm(Long.MIN_VALUE, 1<<20);



Mime
View raw message