You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2017/05/10 08:53:28 UTC

[math] Fix all checkstyle issues (missing javadocs params and trailing white space)

Repository: commons-math
Updated Branches:
  refs/heads/master 60fdd5f3a -> 1b80dc496


Fix all checkstyle issues (missing javadocs params and trailing white space)


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/1b80dc49
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/1b80dc49
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/1b80dc49

Branch: refs/heads/master
Commit: 1b80dc49658ce86375c6c3fd089d7dcd176f4ad8
Parents: 60fdd5f
Author: Bruno P. Kinoshita <br...@yahoo.com.br>
Authored: Wed May 10 20:53:08 2017 +1200
Committer: Bruno P. Kinoshita <br...@yahoo.com.br>
Committed: Wed May 10 20:53:08 2017 +1200

----------------------------------------------------------------------
 .../org/apache/commons/math4/linear/Array2DRowRealMatrix.java  | 5 ++---
 .../org/apache/commons/math4/linear/ConjugateGradient.java     | 2 +-
 .../math4/linear/PreconditionedIterativeLinearSolver.java      | 2 +-
 src/main/java/org/apache/commons/math4/linear/SymmLQ.java      | 6 +++---
 .../math4/ode/nonstiff/AdaptiveStepsizeFieldIntegrator.java    | 2 +-
 .../commons/math4/ode/nonstiff/AdaptiveStepsizeIntegrator.java | 2 +-
 .../apache/commons/math4/optim/linear/LinearConstraint.java    | 6 +++---
 .../math4/optim/nonlinear/scalar/LeastSquaresConverter.java    | 4 ++--
 .../nonlinear/scalar/MultivariateFunctionPenaltyAdapter.java   | 2 +-
 .../commons/math4/stat/descriptive/rank/PSquarePercentile.java | 3 ++-
 .../org/apache/commons/math4/stat/inference/ChiSquareTest.java | 2 +-
 .../commons/math4/stat/inference/KolmogorovSmirnovTest.java    | 4 +++-
 12 files changed, 21 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/linear/Array2DRowRealMatrix.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/Array2DRowRealMatrix.java b/src/main/java/org/apache/commons/math4/linear/Array2DRowRealMatrix.java
index ed1ca9f..3f300b2 100644
--- a/src/main/java/org/apache/commons/math4/linear/Array2DRowRealMatrix.java
+++ b/src/main/java/org/apache/commons/math4/linear/Array2DRowRealMatrix.java
@@ -32,7 +32,6 @@ import org.apache.commons.math4.util.MathUtils;
 /**
  * Implementation of {@link RealMatrix} using a {@code double[][]} array to
  * store entries.
- *
  */
 public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializable {
     /** Serializable version identifier. */
@@ -390,7 +389,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
 
     /** {@inheritDoc} */
     @Override
-    public RealMatrix getSubMatrix(final int startRow, final int endRow, 
+    public RealMatrix getSubMatrix(final int startRow, final int endRow,
                                    final int startColumn, final int endColumn)
             throws OutOfRangeException, NumberIsTooSmallException {
         MatrixUtils.checkSubMatrixIndex(this, startRow, endRow, startColumn, endColumn);
@@ -400,7 +399,7 @@ public class Array2DRowRealMatrix extends AbstractRealMatrix implements Serializ
         for (int i = 0; i < rowCount; ++i) {
             System.arraycopy(data[startRow + i], startColumn, outData[i], 0, columnCount);
         }
-        
+
         Array2DRowRealMatrix subMatrix = new Array2DRowRealMatrix();
         subMatrix.data = outData;
         return subMatrix;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/linear/ConjugateGradient.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/ConjugateGradient.java b/src/main/java/org/apache/commons/math4/linear/ConjugateGradient.java
index 3681a7d..f6a46d6 100644
--- a/src/main/java/org/apache/commons/math4/linear/ConjugateGradient.java
+++ b/src/main/java/org/apache/commons/math4/linear/ConjugateGradient.java
@@ -55,7 +55,7 @@ import org.apache.commons.math4.util.IterationManager;
  * <li>key {@code "vector"} points to the offending vector, say x, such that
  * x<sup>T</sup> &middot; L &middot; x &lt; 0.</li>
  * </ul>
- * 
+ *
  * <h3>References</h3>
  * <dl>
  * <dt><a id="BARR1994">Barret et al. (1994)</a></dt>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/linear/PreconditionedIterativeLinearSolver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/PreconditionedIterativeLinearSolver.java b/src/main/java/org/apache/commons/math4/linear/PreconditionedIterativeLinearSolver.java
index a02c891..31f538d 100644
--- a/src/main/java/org/apache/commons/math4/linear/PreconditionedIterativeLinearSolver.java
+++ b/src/main/java/org/apache/commons/math4/linear/PreconditionedIterativeLinearSolver.java
@@ -39,7 +39,7 @@ import org.apache.commons.math4.util.MathUtils;
  * while matrix-vector products of the type M &middot; y remain comparatively
  * easy to compute. In this library, M (not M<sup>-1</sup>!) is called the
  * <em>preconditionner</em>.
- * 
+ *
  * <p>
  * Concrete implementations of this abstract class must be provided with the
  * preconditioner M, as a {@link RealLinearOperator}.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/linear/SymmLQ.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/SymmLQ.java b/src/main/java/org/apache/commons/math4/linear/SymmLQ.java
index 0e92aa7..7411427 100644
--- a/src/main/java/org/apache/commons/math4/linear/SymmLQ.java
+++ b/src/main/java/org/apache/commons/math4/linear/SymmLQ.java
@@ -113,7 +113,7 @@ import org.apache.commons.math4.util.MathUtils;
  * initial phase. If x<sub>0</sub> is known to be a good approximation to x, one
  * should compute r<sub>0</sub> = b - A &middot; x, solve A &middot; dx = r0,
  * and set x = x<sub>0</sub> + dx.
- * 
+ *
  * <h3><a id="context">Exception context</a></h3>
  * <p>
  * Besides standard {@link DimensionMismatchException}, this class might throw
@@ -127,7 +127,7 @@ import org.apache.commons.math4.util.MathUtils;
  * that x<sup>T</sup> &middot; L &middot; y &ne; y<sup>T</sup> &middot; L
  * &middot; x (within a certain accuracy).</li>
  * </ul>
- * 
+ *
  * <p>
  * {@link NonPositiveDefiniteOperatorException} might also be thrown in case the
  * preconditioner is not positive definite. The relevant keys to the
@@ -138,7 +138,7 @@ import org.apache.commons.math4.util.MathUtils;
  * <li>key {@code "vector"}, which points to the offending vector, say x, such
  * that x<sup>T</sup> &middot; L &middot; x &lt; 0.</li>
  * </ul>
- * 
+ *
  * <h3>References</h3>
  * <dl>
  * <dt><a id="PAIG1975">Paige and Saunders (1975)</a></dt>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeFieldIntegrator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeFieldIntegrator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeFieldIntegrator.java
index cda1310..dd2cb70 100644
--- a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeFieldIntegrator.java
+++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeFieldIntegrator.java
@@ -45,7 +45,7 @@ import org.apache.commons.math4.util.MathUtils;
  * state vector and relTol_i is the relative tolerance for the same
  * component. The user can also use only two scalar values absTol and
  * relTol which will be used for all components.
- * 
+ *
  * <p>
  * Note that <em>only</em> the {@link FieldODEState#getState() main part}
  * of the state vector is used for stepsize control. The {@link

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeIntegrator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeIntegrator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeIntegrator.java
index 7219383..e750f5d 100644
--- a/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeIntegrator.java
+++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/AdaptiveStepsizeIntegrator.java
@@ -40,7 +40,7 @@ import org.apache.commons.math4.util.FastMath;
  * state vector and relTol_i is the relative tolerance for the same
  * component. The user can also use only two scalar values absTol and
  * relTol which will be used for all components.
- * 
+ *
  * <p>
  * If the Ordinary Differential Equations is an {@link ExpandableStatefulODE
  * extended ODE} rather than a {@link

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java b/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java
index bd4b0b8..1d194ac 100644
--- a/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java
+++ b/src/main/java/org/apache/commons/math4/optim/linear/LinearConstraint.java
@@ -84,7 +84,7 @@ public class LinearConstraint implements Serializable {
      *   <li>c<sub>1</sub>x<sub>1</sub> + ... c<sub>n</sub>x<sub>n</sub> &lt;= v</li>
      *   <li>c<sub>1</sub>x<sub>1</sub> + ... c<sub>n</sub>x<sub>n</sub> &gt;= v</li>
      * </ul>
-     * 
+     *
      * @param coefficients The coefficients of the constraint (left hand side)
      * @param relationship The type of (in)equality used in the constraint
      * @param value The value of the constraint (right hand side)
@@ -109,7 +109,7 @@ public class LinearConstraint implements Serializable {
      *   <li>l<sub>1</sub>x<sub>1</sub> + ... l<sub>n</sub>x<sub>n</sub> + l<sub>cst</sub> &gt;=
      *       r<sub>1</sub>x<sub>1</sub> + ... r<sub>n</sub>x<sub>n</sub> + r<sub>cst</sub></li>
      * </ul>
-     * 
+     *
      * @param lhsCoefficients The coefficients of the linear expression on the left hand side of the constraint
      * @param lhsConstant The constant term of the linear expression on the left hand side of the constraint
      * @param relationship The type of (in)equality used in the constraint
@@ -140,7 +140,7 @@ public class LinearConstraint implements Serializable {
      *   <li>l<sub>1</sub>x<sub>1</sub> + ... l<sub>n</sub>x<sub>n</sub> + l<sub>cst</sub> &gt;=
      *       r<sub>1</sub>x<sub>1</sub> + ... r<sub>n</sub>x<sub>n</sub> + r<sub>cst</sub></li>
      * </ul>
-     * 
+     *
      * @param lhsCoefficients The coefficients of the linear expression on the left hand side of the constraint
      * @param lhsConstant The constant term of the linear expression on the left hand side of the constraint
      * @param relationship The type of (in)equality used in the constraint

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LeastSquaresConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LeastSquaresConverter.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LeastSquaresConverter.java
index 98346ea..e9ba8b9 100644
--- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LeastSquaresConverter.java
+++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/LeastSquaresConverter.java
@@ -84,7 +84,7 @@ public class LeastSquaresConverter implements MultivariateFunction {
      * <div style="white-space: pre"><code>
      * objective = &sum;weight<sub>i</sub>(observation<sub>i</sub>-objective<sub>i</sub>)<sup>2</sup>
      * </code></div>
-     * 
+     *
      * <p>
      * Weights can be used for example to combine residuals with different standard
      * deviations. As an example, consider a residuals array in which even elements
@@ -127,7 +127,7 @@ public class LeastSquaresConverter implements MultivariateFunction {
      * <div style="white-space: pre"><code>
      * objective = y<sup>T</sup>y with y = scale&times;(observation-objective)
      * </code></div>
-     * 
+     *
      * <p>
      * The array computed by the objective function, the observations array and the
      * the scaling matrix must have consistent sizes or a {@link DimensionMismatchException}

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultivariateFunctionPenaltyAdapter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultivariateFunctionPenaltyAdapter.java b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultivariateFunctionPenaltyAdapter.java
index 37fe24d..79bd770 100644
--- a/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultivariateFunctionPenaltyAdapter.java
+++ b/src/main/java/org/apache/commons/math4/optim/nonlinear/scalar/MultivariateFunctionPenaltyAdapter.java
@@ -89,7 +89,7 @@ public class MultivariateFunctionPenaltyAdapter
      *   penalty(point) = offset + &sum;<sub>i</sub>[scale[i] * &radic;|point[i]-boundary[i]|]
      * </code></div>
      * where indices i correspond to all the components that violates their boundaries.
-     * 
+     *
      * <p>
      * So when attempting a function minimization, offset should be larger than
      * the maximum expected value of the underlying function and scale components

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
index f663d69..4a027c6 100644
--- a/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
+++ b/src/main/java/org/apache/commons/math4/stat/descriptive/rank/PSquarePercentile.java
@@ -51,7 +51,6 @@ import org.apache.commons.numbers.core.Precision;
  * Note: This implementation is not synchronized and produces an approximate
  * result. For small samples, where data can be stored and processed in memory,
  * {@link Percentile} should be used.</p>
- *
  */
 public class PSquarePercentile extends AbstractStorelessUnivariateStatistic
         implements StorelessUnivariateStatistic, Serializable {
@@ -875,6 +874,8 @@ public class PSquarePercentile extends AbstractStorelessUnivariateStatistic
      * A simple fixed capacity list that has an upper bound to growth.
      * Once its capacity is reached, {@code add} is a no-op, returning
      * {@code false}.
+     *
+     * @param <E> type for fixed capacity list
      */
     private static class FixedCapacityList<E> extends ArrayList<E> implements Serializable {
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/stat/inference/ChiSquareTest.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/inference/ChiSquareTest.java b/src/main/java/org/apache/commons/math4/stat/inference/ChiSquareTest.java
index 3836064..8b67a33 100644
--- a/src/main/java/org/apache/commons/math4/stat/inference/ChiSquareTest.java
+++ b/src/main/java/org/apache/commons/math4/stat/inference/ChiSquareTest.java
@@ -379,7 +379,7 @@ public class ChiSquareTest {
      * &sum;[(K * observed1[i] - observed2[i]/K)<sup>2</sup> / (observed1[i] + observed2[i])]
      * </code> where
      * <br><code>K = &radic;[&sum;(observed2 / &sum;(observed1)]</code>
-     * 
+     *
      * <p>This statistic can be used to perform a Chi-Square test evaluating the
      * null hypothesis that both observed counts follow the same distribution.</p>
      * <p>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/1b80dc49/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
index 53a6162..4950420 100644
--- a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
+++ b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
@@ -142,6 +142,7 @@ public class KolmogorovSmirnovTest {
     @Deprecated
     protected static final int MONTE_CARLO_ITERATIONS = 1000000;
 
+    /** No longer used. */
     @Deprecated
     private final UniformRandomProvider rng;
 
@@ -1184,7 +1185,8 @@ public class KolmogorovSmirnovTest {
      * values are overwritten with the result of applying jitter.</p>
      *
      * @param data input/output data array - entries overwritten by the method
-     * @param sampler probability distribution to sample for jitter values
+     * @param rng probability distribution to sample for jitter values
+     * @param ulp ulp used when generating random numbers
      * @throws NullPointerException if either of the parameters is null
      */
     private static void jitter(double[] data,