Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 87535 invoked from network); 14 Mar 2010 01:16:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Mar 2010 01:16:51 -0000 Received: (qmail 43228 invoked by uid 500); 14 Mar 2010 01:16:09 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 43155 invoked by uid 500); 14 Mar 2010 01:16:09 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 43148 invoked by uid 99); 14 Mar 2010 01:16:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Mar 2010 01:16:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Mar 2010 01:16:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BCC3B23889B2; Sun, 14 Mar 2010 01:15:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100314011547.BCC3B23889B2@eris.apache.org> 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 (x - knot[i]) 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; } /**