commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r811833 - in /commons/proper/math/trunk: ./ src/main/java/org/apache/commons/math/analysis/interpolation/ src/main/java/org/apache/commons/math/analysis/polynomials/ src/main/java/org/apache/commons/math/analysis/solvers/ src/main/java/org/...
Date Sun, 06 Sep 2009 16:27:55 GMT
Author: luc
Date: Sun Sep  6 16:27:50 2009
New Revision: 811833

URL: http://svn.apache.org/viewvc?rev=811833&view=rev
Log:
removed unnecessary parentheses

Modified:
    commons/proper/math/trunk/checkstyle.xml
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/MersenneTwister.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AbstractStorelessUnivariateStatistic.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AggregateSummaryStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Kurtosis.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Mean.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Skewness.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/summary/Sum.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java

Modified: commons/proper/math/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/checkstyle.xml?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/checkstyle.xml (original)
+++ commons/proper/math/trunk/checkstyle.xml Sun Sep  6 16:27:50 2009
@@ -119,13 +119,15 @@
     <!-- Use a consistent way to put declarations -->
     <module name="DeclarationOrder" />
 
+    <!-- Don't add up parentheses when they are not required -->
+    <module name="UnnecessaryParentheses" />
+
     <!--
     <module name="IllegalCatch" />
     <module name="StringLiteralEquality" />
     <module name="MultipleStringLiterals" />
     <module name="MultipleVariableDeclarations" />
     <module name="TodoComment" />
-    <module name="UnnecessaryParentheses" />
     -->
   </module>
   

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/interpolation/LoessInterpolator.java Sun Sep  6 16:27:50 2009
@@ -234,16 +234,11 @@
                 double sumX = 0, sumXSquared = 0, sumY = 0, sumXY = 0;
                 double denom = Math.abs(1.0 / (xval[edge] - x));
                 for (int k = ileft; k <= iright; ++k) {
-                    final double xk = xval[k];
-                    final double yk = yval[k];
-                    double dist;
-                    if (k < i) {
-                        dist = (x - xk);
-                    } else {
-                        dist = (xk - x);
-                    }
-                    final double w = tricube(dist * denom) * robustnessWeights[k];
-                    final double xkw = xk * w;
+                    final double xk   = xval[k];
+                    final double yk   = yval[k];
+                    final double dist = (k < i) ? x - xk : xk - x;
+                    final double w    = tricube(dist * denom) * robustnessWeights[k];
+                    final double xkw  = xk * w;
                     sumWeights += w;
                     sumX += xkw;
                     sumXSquared += xk * xkw;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java Sun Sep  6 16:27:50 2009
@@ -234,7 +234,7 @@
             for (j = i; j > 0; j--) {
                 c[j] = c[j-1] - c[j] * x[i];
             }
-            c[0] *= (-x[i]);
+            c[0] *= -x[i];
             c[i+1] = 1;
         }
 
@@ -244,7 +244,7 @@
             d = 1;
             for (j = 0; j < n; j++) {
                 if (i != j) {
-                    d *= (x[i] - x[j]);
+                    d *= x[i] - x[j];
                 }
             }
             if (d == 0.0) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java Sun Sep  6 16:27:50 2009
@@ -239,7 +239,7 @@
                 setResult(x1, i);
                 return result;
             }
-            double dx = (x2 - x1);
+            double dx = x2 - x1;
             double tolerance =
                 Math.max(relativeAccuracy * Math.abs(x1), absoluteAccuracy);
             if (Math.abs(dx) <= tolerance) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java Sun Sep  6 16:27:50 2009
@@ -117,9 +117,15 @@
         throws ConvergenceException, FunctionEvaluationException {
 
         // check for zeros before verifying bracketing
-        if (f.value(min) == 0.0) { return min; }
-        if (f.value(max) == 0.0) { return max; }
-        if (f.value(initial) == 0.0) { return initial; }
+        if (f.value(min) == 0.0) {
+            return min;
+        }
+        if (f.value(max) == 0.0) {
+            return max;
+        }
+        if (f.value(initial) == 0.0) {
+            return initial;
+        }
 
         verifyBracketing(min, max, f);
         verifySequence(min, initial, max);
@@ -299,8 +305,8 @@
             throw MathRuntimeException.createIllegalArgumentException(
                   "polynomial degree must be positive: degree={0}", n);
         }
-        Complex N = new Complex(n, 0.0);
-        Complex N1 = new Complex((n-1), 0.0);
+        Complex N  = new Complex(n,     0.0);
+        Complex N1 = new Complex(n - 1, 0.0);
 
         int i = 1;
         Complex pv = null;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java Sun Sep  6 16:27:50 2009
@@ -181,7 +181,7 @@
         throws FunctionEvaluationException {
         final double f1 = function.value(lower);
         final double f2 = function.value(upper);
-        return ((f1 > 0 && f2 < 0) || (f1 < 0 && f2 > 0));
+        return (f1 > 0 && f2 < 0) || (f1 < 0 && f2 > 0);
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/complex/Complex.java Sun Sep  6 16:27:50 2009
@@ -117,13 +117,13 @@
                 return Math.abs(real);
             }
             double q = real / imaginary;
-            return (Math.abs(imaginary) * Math.sqrt(1 + q*q));
+            return Math.abs(imaginary) * Math.sqrt(1 + q * q);
         } else {
             if (real == 0.0) {
                 return Math.abs(imaginary);
             }
             double q = imaginary / real;
-            return (Math.abs(real) * Math.sqrt(1 + q*q));
+            return Math.abs(real) * Math.sqrt(1 + q * q);
         }
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractFieldMatrix.java Sun Sep  6 16:27:50 2009
@@ -644,7 +644,7 @@
 
     /** {@inheritDoc} */
     public boolean isSquare() {
-        return (getColumnDimension() == getRowDimension());
+        return getColumnDimension() == getRowDimension();
     }
 
     /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java Sun Sep  6 16:27:50 2009
@@ -636,7 +636,7 @@
 
     /** {@inheritDoc} */
     public boolean isSquare() {
-        return (getColumnDimension() == getRowDimension());
+        return getColumnDimension() == getRowDimension();
     }
 
     /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java Sun Sep  6 16:27:50 2009
@@ -948,7 +948,7 @@
             return ZERO;
         } else {
             BigDecimal det = (parity == 1) ? ONE : ONE.negate();
-            for (int i = 0; i < this.getRowDimension(); i++) {
+            for (int i = 0; i < getRowDimension(); i++) {
                 det = det.multiply(lu[i][i]);
             }
             return det;
@@ -960,7 +960,7 @@
      * @return true if the matrix is square (rowDimension = columnDimension)
      */
     public boolean isSquare() {
-        return (this.getColumnDimension() == this.getRowDimension());
+        return getColumnDimension() == getRowDimension();
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java Sun Sep  6 16:27:50 2009
@@ -149,7 +149,7 @@
         throws EventException {
         t0 = tStart;
         g0 = handler.g(tStart, yStart);
-        g0Positive = (g0 >= 0);
+        g0Positive = g0 >= 0;
     }
 
     /** Evaluate the impact of the proposed step on the event handler.
@@ -188,7 +188,7 @@
                     // there is a sign change: an event is expected during this step
 
                     // variation direction, with respect to the integration direction
-                    increasing = (gb >= ga);
+                    increasing = gb >= ga;
 
                     final UnivariateRealFunction f = new UnivariateRealFunction() {
                         public double value(final double t) throws FunctionEvaluationException {
@@ -288,7 +288,7 @@
             g0Positive        = increasing;
             nextAction        = handler.eventOccurred(t, y, !(increasing ^ forward));
         } else {
-            g0Positive = (g0 >= 0);
+            g0Positive = g0 >= 0;
             nextAction = EventHandler.CONTINUE;
         }
     }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java Sun Sep  6 16:27:50 2009
@@ -191,7 +191,7 @@
         sanityChecks(equations, t0, y0, t, y);
         setEquations(equations);
         resetEvaluations();
-        final boolean forward = (t > t0);
+        final boolean forward = t > t0;
 
         // initialize working arrays
         if (y != y0) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java Sun Sep  6 16:27:50 2009
@@ -209,7 +209,7 @@
         sanityChecks(equations, t0, y0, t, y);
         setEquations(equations);
         resetEvaluations();
-        final boolean forward = (t > t0);
+        final boolean forward = t > t0;
 
         // initialize working arrays
         if (y != y0) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java Sun Sep  6 16:27:50 2009
@@ -199,7 +199,7 @@
     sanityChecks(equations, t0, y0, t, y);
     setEquations(equations);
     resetEvaluations();
-    final boolean forward = (t > t0);
+    final boolean forward = t > t0;
 
     // create some internal working arrays
     final int stages = c.length + 1;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java Sun Sep  6 16:27:50 2009
@@ -560,7 +560,7 @@
     sanityChecks(equations, t0, y0, t, y);
     setEquations(equations);
     resetEvaluations();
-    final boolean forward = (t > t0);
+    final boolean forward = t > t0;
 
     // create some internal working arrays
     final double[] yDot0   = new double[y0.length];

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java Sun Sep  6 16:27:50 2009
@@ -100,7 +100,7 @@
     sanityChecks(equations, t0, y0, t, y);
     setEquations(equations);
     resetEvaluations();
-    final boolean forward = (t > t0);
+    final boolean forward = t > t0;
 
     // create some internal working arrays
     final int stages = c.length + 1;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java Sun Sep  6 16:27:50 2009
@@ -122,7 +122,7 @@
             lastDerivatives = interpolator.getInterpolatedDerivatives().clone();
 
             // take the integration direction into account
-            forward = (interpolator.getCurrentTime() >= lastTime);
+            forward = interpolator.getCurrentTime() >= lastTime;
             if (! forward) {
                 h = -h;
             }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/MersenneTwister.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/MersenneTwister.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/MersenneTwister.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/MersenneTwister.java Sun Sep  6 16:27:50 2009
@@ -241,10 +241,10 @@
         y = mt[mti++];
 
         // tempering
-        y ^= (y >>> 11);
+        y ^=  y >>> 11;
         y ^= (y <<   7) & 0x9d2c5680;
         y ^= (y <<  15) & 0xefc60000;
-        y ^= (y >>> 18);
+        y ^=  y >>> 18;
 
         return y >>> (32 - bits);
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java Sun Sep  6 16:27:50 2009
@@ -430,9 +430,8 @@
                     x = Math.ceil(y);
                     w = -delta / mu2delta * (1.0 + y / 2.0) - e - x * logMeanMu;
                 }
-                accept = (w <= x * Math.log(mu) -
-                         MathUtils.factorialLog((int) (mu + x)) /
-                         muFactorialLog);
+                accept = w <= x * Math.log(mu) -
+                         MathUtils.factorialLog((int) (mu + x)) / muFactorialLog;
             }
             // cast to long is acceptable because both x and mu are whole
             // numbers.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/Frequency.java Sun Sep  6 16:27:50 2009
@@ -557,7 +557,7 @@
          */
         @SuppressWarnings("unchecked")
         public int compare(Comparable<T> o1, Comparable<T> o2) {
-            return (o1.compareTo((T) o2));
+            return o1.compareTo((T) o2);
         }
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AbstractStorelessUnivariateStatistic.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AbstractStorelessUnivariateStatistic.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AbstractStorelessUnivariateStatistic.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AbstractStorelessUnivariateStatistic.java Sun Sep  6 16:27:50 2009
@@ -165,8 +165,8 @@
             return false;
         }
         AbstractStorelessUnivariateStatistic stat = (AbstractStorelessUnivariateStatistic) object;
-        return (MathUtils.equals(stat.getResult(), this.getResult()) &&
-                MathUtils.equals(stat.getN(), this.getN()));
+        return MathUtils.equals(stat.getResult(), this.getResult()) &&
+               MathUtils.equals(stat.getN(), this.getN());
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AggregateSummaryStatistics.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AggregateSummaryStatistics.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AggregateSummaryStatistics.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/AggregateSummaryStatistics.java Sun Sep  6 16:27:50 2009
@@ -93,8 +93,8 @@
      * @see #createContributingStatistics()
      */
     public AggregateSummaryStatistics(SummaryStatistics prototypeStatistics) {
-        this(prototypeStatistics, (prototypeStatistics == null ? null :
-                new SummaryStatistics(prototypeStatistics)));
+        this(prototypeStatistics,
+             prototypeStatistics == null ? null : new SummaryStatistics(prototypeStatistics));
     }
 
     /**
@@ -118,11 +118,11 @@
      * @see #createContributingStatistics()
      */
     public AggregateSummaryStatistics(SummaryStatistics prototypeStatistics,
-            SummaryStatistics initialStatistics) {
-        this.statisticsPrototype = ((prototypeStatistics == null) ?
-                new SummaryStatistics() : prototypeStatistics);
-        this.statistics = ((initialStatistics == null) ?
-                new SummaryStatistics() : initialStatistics);
+                                      SummaryStatistics initialStatistics) {
+        this.statisticsPrototype =
+            (prototypeStatistics == null) ? new SummaryStatistics() : prototypeStatistics;
+        this.statistics =
+            (initialStatistics == null) ? new SummaryStatistics() : initialStatistics;
     }
 
     /**
@@ -400,8 +400,8 @@
                 return false;
             }
             AggregatingSummaryStatistics stat = (AggregatingSummaryStatistics)object;
-            return (super.equals(stat) &&
-                    aggregateStatistics.equals(stat.aggregateStatistics));
+            return super.equals(stat) &&
+                   aggregateStatistics.equals(stat.aggregateStatistics);
         }
 
         /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java Sun Sep  6 16:27:50 2009
@@ -208,7 +208,7 @@
                 stdDev = 0.0;
             }
         }
-        return (stdDev);
+        return stdDev;
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java Sun Sep  6 16:27:50 2009
@@ -369,16 +369,15 @@
             return false;
         }
         MultivariateSummaryStatistics stat = (MultivariateSummaryStatistics) object;
-        return (MathUtils.equals(stat.getGeometricMean(),
-                this.getGeometricMean()) &&
-                MathUtils.equals(stat.getMax(), this.getMax()) &&
-                MathUtils.equals(stat.getMean(),this.getMean()) &&
-                MathUtils.equals(stat.getMin(),this.getMin()) &&
-                MathUtils.equals(stat.getN(), this.getN()) &&
-                MathUtils.equals(stat.getSum(), this.getSum()) &&
-                MathUtils.equals(stat.getSumSq(),this.getSumSq()) &&
-                MathUtils.equals(stat.getSumLog(),this.getSumLog()) &&
-                stat.getCovariance().equals(this.getCovariance()));
+        return MathUtils.equals(stat.getGeometricMean(), getGeometricMean()) &&
+               MathUtils.equals(stat.getMax(),           getMax())           &&
+               MathUtils.equals(stat.getMean(),          getMean())          &&
+               MathUtils.equals(stat.getMin(),           getMin())           &&
+               MathUtils.equals(stat.getN(),             getN())             &&
+               MathUtils.equals(stat.getSum(),           getSum())           &&
+               MathUtils.equals(stat.getSumSq(),         getSumSq())         &&
+               MathUtils.equals(stat.getSumLog(),        getSumLog())        &&
+               stat.getCovariance().equals( getCovariance());
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/StatisticalSummaryValues.java Sun Sep  6 16:27:50 2009
@@ -135,12 +135,12 @@
             return false;
         }
         StatisticalSummaryValues stat = (StatisticalSummaryValues) object;
-        return (MathUtils.equals(stat.getMax(), this.getMax()) &&
-                MathUtils.equals(stat.getMean(),this.getMean()) &&
-                MathUtils.equals(stat.getMin(),this.getMin()) &&
-                MathUtils.equals(stat.getN(), this.getN()) &&
-                MathUtils.equals(stat.getSum(), this.getSum()) &&
-                MathUtils.equals(stat.getVariance(),this.getVariance()));
+        return MathUtils.equals(stat.getMax(),      getMax())  &&
+               MathUtils.equals(stat.getMean(),     getMean()) &&
+               MathUtils.equals(stat.getMin(),      getMin())  &&
+               MathUtils.equals(stat.getN(),        getN())    &&
+               MathUtils.equals(stat.getSum(),      getSum())  &&
+               MathUtils.equals(stat.getVariance(), getVariance());
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java Sun Sep  6 16:27:50 2009
@@ -221,7 +221,7 @@
                 stdDev = 0.0;
             }
         }
-        return (stdDev);
+        return stdDev;
     }
 
     /**
@@ -360,15 +360,14 @@
             return false;
         }
         SummaryStatistics stat = (SummaryStatistics)object;
-        return (MathUtils.equals(stat.getGeometricMean(), this.getGeometricMean()) &&
-                MathUtils.equals(stat.getMax(), this.getMax()) &&
-                MathUtils.equals(stat.getMean(), this.getMean()) &&
-                MathUtils.equals(stat.getMin(), this.getMin()) &&
-                MathUtils.equals(stat.getN(), this.getN()) &&
-                MathUtils.equals(stat.getSum(), this.getSum()) &&
-                MathUtils.equals(stat.getSumsq(), this.getSumsq()) &&
-                MathUtils.equals(stat.getVariance(),
-            this.getVariance()));
+        return MathUtils.equals(stat.getGeometricMean(), getGeometricMean()) &&
+               MathUtils.equals(stat.getMax(),           getMax())           &&
+               MathUtils.equals(stat.getMean(),          getMean())          &&
+               MathUtils.equals(stat.getMin(),           getMin())           &&
+               MathUtils.equals(stat.getN(),             getN())             &&
+               MathUtils.equals(stat.getSum(),           getSum())           &&
+               MathUtils.equals(stat.getSumsq(),         getSumsq())         &&
+               MathUtils.equals(stat.getVariance(),      getVariance());
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Kurtosis.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Kurtosis.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Kurtosis.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Kurtosis.java Sun Sep  6 16:27:50 2009
@@ -175,7 +175,7 @@
             // standard deviation
             double accum3 = 0.0;
             for (int i = begin; i < begin + length; i++) {
-                accum3 += Math.pow((values[i] - mean), 4.0);
+                accum3 += Math.pow(values[i] - mean, 4.0);
             }
             accum3 /= Math.pow(stdDev, 4.0d);
 
@@ -185,7 +185,7 @@
             double coefficientOne =
                 (n0 * (n0 + 1)) / ((n0 - 1) * (n0 - 2) * (n0 - 3));
             double termTwo =
-                ((3 * Math.pow(n0 - 1, 2.0)) / ((n0 - 2) * (n0 - 3)));
+                (3 * Math.pow(n0 - 1, 2.0)) / ((n0 - 2) * (n0 - 3));
 
             // Calculate kurtosis
             kurt = (coefficientOne * accum3) - termTwo;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Mean.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Mean.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Mean.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Mean.java Sun Sep  6 16:27:50 2009
@@ -161,7 +161,7 @@
             // Compute correction factor in second pass
             double correction = 0;
             for (int i = begin; i < begin + length; i++) {
-                correction += (values[i] - xbar);
+                correction += values[i] - xbar;
             }
             return xbar + (correction/sampleSize);
         }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Skewness.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Skewness.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Skewness.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/moment/Skewness.java Sun Sep  6 16:27:50 2009
@@ -164,17 +164,18 @@
             double accum = 0.0;
             double accum2 = 0.0;
             for (int i = begin; i < begin + length; i++) {
-                accum += Math.pow((values[i] - m), 2.0);
-                accum2 += (values[i] - m);
+                final double d = values[i] - m;
+                accum  += d * d;
+                accum2 += d;
             }
-            double stdDev = Math.sqrt((accum - (Math.pow(accum2, 2) / length)) /
-                    (length - 1));
+            final double variance = (accum - (accum2 * accum2 / length)) / (length - 1);
 
             double accum3 = 0.0;
             for (int i = begin; i < begin + length; i++) {
-                accum3 += Math.pow(values[i] - m, 3.0d);
+                final double d = values[i] - m;
+                accum3 += d * d * d;
             }
-            accum3 /= Math.pow(stdDev, 3.0d);
+            accum3 /= variance * Math.sqrt(variance);
 
             // Get N
             double n0 = length;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/summary/Sum.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/summary/Sum.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/summary/Sum.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/descriptive/summary/Sum.java Sun Sep  6 16:27:50 2009
@@ -159,7 +159,7 @@
         if (test(values, weights, begin, length)) {
             sum = 0.0;
             for (int i = begin; i < begin + length; i++) {
-                sum += (values[i] * weights[i]);
+                sum += values[i] * weights[i];
             }
         }
         return sum;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/ChiSquareTestImpl.java Sun Sep  6 16:27:50 2009
@@ -87,13 +87,12 @@
             rescale = true;
         }
         double sumSq = 0.0d;
-        double dev = 0.0d;
         for (int i = 0; i < observed.length; i++) {
             if (rescale) {
-                dev = (observed[i] - ratio * expected[i]);
+                final double dev = observed[i] - ratio * expected[i];
                 sumSq += dev * dev / (ratio * expected[i]);
             } else {
-                dev = (observed[i] - expected[i]);
+                final double dev = observed[i] - expected[i];
                 sumSq += dev * dev / expected[i];
             }
         }
@@ -140,7 +139,7 @@
                   "out of bounds significance level {0}, must be between {1} and {2}",
                   alpha, 0, 0.5);
         }
-        return (chiSquareTest(expected, observed) < alpha);
+        return chiSquareTest(expected, observed) < alpha;
     }
 
     /**
@@ -208,7 +207,7 @@
                   "out of bounds significance level {0}, must be between {1} and {2}",
                   alpha, 0.0, 0.5);
         }
-        return (chiSquareTest(counts) < alpha);
+        return chiSquareTest(counts) < alpha;
     }
 
     /**
@@ -256,7 +255,7 @@
                   "observed counts are all 0 in second observed array");
         }
         // Compare and compute weight only if different
-        unequalCounts = (countSum1 != countSum2);
+        unequalCounts = countSum1 != countSum2;
         if (unequalCounts) {
             weight = Math.sqrt((double) countSum1 / (double) countSum2);
         }
@@ -315,7 +314,7 @@
                   "out of bounds significance level {0}, must be between {1} and {2}",
                   alpha, 0.0, 0.5);
         }
-        return (chiSquareTestDataSetsComparison(observed1, observed2) < alpha);
+        return chiSquareTestDataSetsComparison(observed1, observed2) < alpha;
     }
 
     /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/OneWayAnovaImpl.java Sun Sep  6 16:27:50 2009
@@ -105,7 +105,7 @@
                   "out of bounds significance level {0}, must be between {1} and {2}",
                   alpha, 0, 0.5);
         }
-        return (anovaPValue(categoryData) < alpha);
+        return anovaPValue(categoryData) < alpha;
     }
 
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/stat/inference/TTestImpl.java Sun Sep  6 16:27:50 2009
@@ -160,7 +160,7 @@
     public boolean pairedTTest(double[] sample1, double[] sample2, double alpha)
         throws IllegalArgumentException, MathException {
         checkSignificanceLevel(alpha);
-        return (pairedTTest(sample1, sample2) < alpha);
+        return pairedTTest(sample1, sample2) < alpha;
     }
 
     /**
@@ -444,7 +444,7 @@
     public boolean tTest(double mu, double[] sample, double alpha)
     throws IllegalArgumentException, MathException {
         checkSignificanceLevel(alpha);
-        return (tTest(mu, sample) < alpha);
+        return tTest(mu, sample) < alpha;
     }
 
     /**
@@ -522,7 +522,7 @@
             double alpha)
     throws IllegalArgumentException, MathException {
         checkSignificanceLevel(alpha);
-        return (tTest(mu, sampleStats) < alpha);
+        return tTest(mu, sampleStats) < alpha;
     }
 
     /**
@@ -669,7 +669,7 @@
             double alpha)
     throws IllegalArgumentException, MathException {
         checkSignificanceLevel(alpha);
-        return (tTest(sample1, sample2) < alpha);
+        return tTest(sample1, sample2) < alpha;
     }
 
     /**
@@ -727,7 +727,7 @@
             double alpha)
     throws IllegalArgumentException, MathException {
         checkSignificanceLevel(alpha);
-        return (homoscedasticTTest(sample1, sample2) < alpha);
+        return homoscedasticTTest(sample1, sample2) < alpha;
     }
 
      /**
@@ -874,7 +874,7 @@
             StatisticalSummary sampleStats2, double alpha)
     throws IllegalArgumentException, MathException {
         checkSignificanceLevel(alpha);
-        return (tTest(sampleStats1, sampleStats2) < alpha);
+        return tTest(sampleStats1, sampleStats2) < alpha;
     }
 
     //----------------------------------------------- Protected methods

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java Sun Sep  6 16:27:50 2009
@@ -840,7 +840,7 @@
                   "cannot compute 0-th root of unity, indefinite result");
         }
 
-        isForward = (n > 0);
+        isForward = n > 0;
 
         // avoid repetitive calculations
         final int absN = Math.abs(n);
@@ -914,8 +914,7 @@
                   k, 0, omegaCount - 1);
         }
 
-        return (isForward) ?
-            omegaImaginaryForward[k] : omegaImaginaryInverse[k];
+        return isForward ? omegaImaginaryForward[k] : omegaImaginaryInverse[k];
 
       }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Sun Sep  6 16:27:50 2009
@@ -227,7 +227,7 @@
             // unnecessary.
             for (int j = 1, i = n - k + 1; j <= k; i++, j++) {
                 long d = gcd(i, j);
-                result = mulAndCheck((result / (j / d)), (i / d));
+                result = mulAndCheck(result / (j / d), i / d);
             }
         }
         return result;
@@ -402,7 +402,7 @@
      * @return true if the values are equal or both are NaN
      */
     public static boolean equals(double x, double y) {
-        return ((Double.isNaN(x) && Double.isNaN(y)) || x == y);
+        return (Double.isNaN(x) && Double.isNaN(y)) || x == y;
     }
 
     /**
@@ -614,7 +614,7 @@
                         "overflow: gcd({0}, {1}) is 2^31",
                         p, q);
             }
-            return (Math.abs(u) + Math.abs(v));
+            return Math.abs(u) + Math.abs(v);
         }
         // keep u and v negative, as negative integers range down to
         // -2^31, while positive numbers can only be as large as 2^31-1

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java?rev=811833&r1=811832&r2=811833&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java Sun Sep  6 16:27:50 2009
@@ -594,7 +594,7 @@
      * @return the length of the internal storage array.
      */
     synchronized int getInternalLength() {
-        return (internalArray.length);
+        return internalArray.length;
     }
 
     /**
@@ -604,7 +604,7 @@
      * @return number of elements
      */
     public synchronized int getNumElements() {
-        return (numElements);
+        return numElements;
     }
 
     /**
@@ -621,7 +621,7 @@
      */
     @Deprecated
     public synchronized double[] getValues() {
-        return (internalArray);
+        return internalArray;
     }
 
     /**
@@ -637,7 +637,7 @@
      * @since 2.0
      */
     public synchronized double[] getInternalValues() {
-        return (internalArray);
+        return internalArray;
     }
 
     /**



Mime
View raw message