commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1517359 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3: fitting/leastsquares/ optim/
Date Sun, 25 Aug 2013 18:19:06 GMT
Author: luc
Date: Sun Aug 25 18:19:06 2013
New Revision: 1517359

URL: http://svn.apache.org/r1517359
Log:
Fixed checkstyle warnings.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/AbstractLeastSquaresOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/LevenbergMarquardtOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/AbstractOptimizer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/AbstractLeastSquaresOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/AbstractLeastSquaresOptimizer.java?rev=1517359&r1=1517358&r2=1517359&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/AbstractLeastSquaresOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/AbstractLeastSquaresOptimizer.java
Sun Aug 25 18:19:06 2013
@@ -80,29 +80,29 @@ public abstract class AbstractLeastSquar
     }
 
     /** {@inheritDoc} */
-    public OPTIM withTarget(double[] target) {
-        this.target = target.clone();
+    public OPTIM withTarget(double[] newTarget) {
+        this.target = newTarget.clone();
         return self();
     }
 
     /** {@inheritDoc} */
-    public OPTIM withWeight(RealMatrix weight) {
-        this.weight = weight; // XXX Not thread-safe
-        weightSqrt = squareRoot(weight);
+    public OPTIM withWeight(RealMatrix newWeight) {
+        this.weight = newWeight; // XXX Not thread-safe
+        weightSqrt = squareRoot(newWeight);
         return self();
     }
 
     /** {@inheritDoc} */
-    public OPTIM withModelAndJacobian(MultivariateVectorFunction model,
-                                      MultivariateMatrixFunction jacobian) {
-        this.model = model; // XXX Not thread-safe
-        this.jacobian = jacobian; // XXX Not thread-safe
+    public OPTIM withModelAndJacobian(MultivariateVectorFunction newModel,
+                                      MultivariateMatrixFunction newJacobian) {
+        this.model = newModel; // XXX Not thread-safe
+        this.jacobian = newJacobian; // XXX Not thread-safe
         return self();
     }
 
     /** {@inheritDoc} */
-    public OPTIM withStartPoint(double[] start) {
-        this.start = start.clone();
+    public OPTIM withStartPoint(double[] newStart) {
+        this.start = newStart.clone();
         return self();
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java?rev=1517359&r1=1517358&r2=1517359&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/GaussNewtonOptimizer.java
Sun Aug 25 18:19:06 2013
@@ -85,11 +85,11 @@ public class GaussNewtonOptimizer extend
     }
 
     /**
-     * @param useLU Whether to use LU decomposition.
+     * @param newUseLU Whether to use LU decomposition.
      * @return this instance.
      */
-    public GaussNewtonOptimizer withLU(boolean useLU) {
-        this.useLU = useLU;
+    public GaussNewtonOptimizer withLU(boolean newUseLU) {
+        this.useLU = newUseLU;
         return self();
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/LevenbergMarquardtOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/LevenbergMarquardtOptimizer.java?rev=1517359&r1=1517358&r2=1517359&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/LevenbergMarquardtOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/fitting/leastsquares/LevenbergMarquardtOptimizer.java
Sun Aug 25 18:19:06 2013
@@ -176,28 +176,28 @@ public class LevenbergMarquardtOptimizer
     }
 
     /**
-     * @param initialStepBoundFactor Positive input variable used in
+     * @param newInitialStepBoundFactor Positive input variable used in
      * determining the initial step bound. This bound is set to the
      * product of initialStepBoundFactor and the euclidean norm of
-     * {@code diag * x} if non-zero, or else to {@code initialStepBoundFactor}
+     * {@code diag * x} if non-zero, or else to {@code newInitialStepBoundFactor}
      * itself. In most cases factor should lie in the interval
      * {@code (0.1, 100.0)}. {@code 100} is a generally recommended value.
      * of the matrix is reduced.
      * @return this instance.
      */
-    public LevenbergMarquardtOptimizer withInitialStepBoundFactor(double initialStepBoundFactor)
{
-        this.initialStepBoundFactor = initialStepBoundFactor;
+    public LevenbergMarquardtOptimizer withInitialStepBoundFactor(double newInitialStepBoundFactor)
{
+        this.initialStepBoundFactor = newInitialStepBoundFactor;
         return self();
     }
 
     /**
      * Modifies the given parameter.
      *
-     * @param costRelativeTolerance Desired relative error in the sum of squares.
+     * @param newCostRelativeTolerance Desired relative error in the sum of squares.
      * @return this instance.
      */
-    public LevenbergMarquardtOptimizer withCostRelativeTolerance(double costRelativeTolerance)
{
-        this.costRelativeTolerance = costRelativeTolerance;
+    public LevenbergMarquardtOptimizer withCostRelativeTolerance(double newCostRelativeTolerance)
{
+        this.costRelativeTolerance = newCostRelativeTolerance;
         return self();
     }
 
@@ -216,12 +216,12 @@ public class LevenbergMarquardtOptimizer
     /**
      * Modifies the given parameter.
      *
-     * @param orthoTolerance Desired max cosine on the orthogonality between
+     * @param newOrthoTolerance Desired max cosine on the orthogonality between
      * the function vector and the columns of the Jacobian.
      * @return this instance.
      */
-    public LevenbergMarquardtOptimizer withOrthoTolerance(double orthoTolerance) {
-        this.orthoTolerance = orthoTolerance;
+    public LevenbergMarquardtOptimizer withOrthoTolerance(double newOrthoTolerance) {
+        this.orthoTolerance = newOrthoTolerance;
         return self();
     }
 
@@ -547,17 +547,17 @@ public class LevenbergMarquardtOptimizer
      */
     private static class InternalData {
         /** Weighted Jacobian. */
-        final double[][] weightedJacobian;
+        private final double[][] weightedJacobian;
         /** Columns permutation array. */
-        final int[] permutation;
+        private final int[] permutation;
         /** Rank of the Jacobian matrix. */
-        final int rank;
+        private final int rank;
         /** Diagonal elements of the R matrix in the QR decomposition. */
-        final double[] diagR;
+        private final double[] diagR;
         /** Norms of the columns of the jacobian matrix. */
-        final double[] jacNorm;
+        private final double[] jacNorm;
         /** Coefficients of the Householder transforms vectors. */
-        final double[] beta;
+        private final double[] beta;
 
         /**
          * @param weightedJacobian Weighted Jacobian.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/AbstractOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/AbstractOptimizer.java?rev=1517359&r1=1517358&r2=1517359&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/AbstractOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optim/AbstractOptimizer.java
Sun Aug 25 18:19:06 2013
@@ -60,7 +60,7 @@ public abstract class AbstractOptimizer<
      *
      * @param other Instance to copy.
      */
-    protected AbstractOptimizer(AbstractOptimizer other) {
+    protected AbstractOptimizer(AbstractOptimizer<PAIR, OPTIM> other) {
         checker = other.checker; // XXX Not thread-safe.
         evaluations.setMaximalCount(other.getMaxEvaluations());
         iterations.setMaximalCount(other.getMaxIterations());
@@ -72,13 +72,14 @@ public abstract class AbstractOptimizer<
      * @return the "self-type" instance.
      */
     protected OPTIM self() {
+        @SuppressWarnings("unchecked")
         final OPTIM optim = (OPTIM) this;
         return optim;
     }
 
     /** {@inheritDoc} */
-    public OPTIM withConvergenceChecker(ConvergenceChecker<PAIR> checker) {
-        this.checker = checker;
+    public OPTIM withConvergenceChecker(ConvergenceChecker<PAIR> newChecker) {
+        this.checker = newChecker;
         return self();
     }
 



Mime
View raw message