commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r922708 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis: polynomials/ solvers/
Date Sun, 14 Mar 2010 01:15:47 GMT
Author: sebb
Date: Sun Mar 14 01:15:47 2010
New Revision: 922708

URL: http://svn.apache.org/viewvc?rev=922708&view=rev
Log:
Make some private fields final

Modified:
    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/polynomials/PolynomialFunctionNewtonForm.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java

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=922708&r1=922707&r2=922708&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 Mar 14 01:15:47 2010
@@ -45,12 +45,12 @@ public class PolynomialFunctionLagrangeF
     /**
      * Interpolating points (abscissas).
      */
-    private double x[];
+    private final double x[];
 
     /**
      * Function values at interpolating points.
      */
-    private double y[];
+    private final double y[];
 
     /**
      * Whether the polynomial coefficients are available.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java?rev=922708&r1=922707&r2=922708&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
Sun Mar 14 01:15:47 2010
@@ -45,13 +45,13 @@ public class PolynomialFunctionNewtonFor
     /**
      * Centers of the Newton polynomial.
      */
-    private double c[];
+    private final double c[];
 
     /**
      * When all c[i] = 0, a[] becomes normal polynomial coefficients,
      * i.e. a[i] = coefficients[i].
      */
-    private double a[];
+    private final double a[];
 
     /**
      * Whether the polynomial coefficients are available.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java?rev=922708&r1=922707&r2=922708&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
Sun Mar 14 01:15:47 2010
@@ -61,7 +61,7 @@ public class PolynomialSplineFunction
     implements DifferentiableUnivariateRealFunction {
 
     /** Spline segment interval delimiters (knots).   Size is n+1 for n segments. */
-    private double knots[];
+    private final double knots[];
 
     /**
      * The polynomial functions that make up the spline.  The first element
@@ -70,13 +70,13 @@ public class PolynomialSplineFunction
      * evaluating these functions at <code>(x - knot[i])</code> where i is the
      * knot segment to which x belongs.
      */
-    private PolynomialFunction polynomials[] = null;
+    private final PolynomialFunction polynomials[];
 
     /**
      * Number of spline segments = number of polynomials
      *  = number of partition points - 1
      */
-    private int n = 0;
+    private final int n;
 
 
     /**

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=922708&r1=922707&r2=922708&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 Mar 14 01:15:47 2010
@@ -50,7 +50,7 @@ public class LaguerreSolver extends Univ
      * @deprecated as of 2.0 the function is not stored anymore in the instance
      */
     @Deprecated
-    private PolynomialFunction p;
+    private final PolynomialFunction p;
 
     /**
      * Construct a solver for the given function.
@@ -78,6 +78,7 @@ public class LaguerreSolver extends Univ
      */
     public LaguerreSolver() {
         super(100, 1E-6);
+        p = null;
     }
 
     /**



Mime
View raw message