From f51a7ca5fef18c31078d80cff428c1e365e562c7 Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Sun, 22 Jul 2012 22:45:15 +0000 Subject: [PATCH] Fixed CheckStyle warnings. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1364453 13f79535-47bb-0310-9956-ffa450edef68 --- .../integration/IterativeLegendreGaussIntegrator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/math3/analysis/integration/IterativeLegendreGaussIntegrator.java b/src/main/java/org/apache/commons/math3/analysis/integration/IterativeLegendreGaussIntegrator.java index 9d0aa1e23..8f2c1683e 100644 --- a/src/main/java/org/apache/commons/math3/analysis/integration/IterativeLegendreGaussIntegrator.java +++ b/src/main/java/org/apache/commons/math3/analysis/integration/IterativeLegendreGaussIntegrator.java @@ -38,7 +38,7 @@ import org.apache.commons.math3.util.FastMath; public class IterativeLegendreGaussIntegrator extends BaseAbstractUnivariateIntegrator { /** Factory that computes the points and weights. */ - private static final GaussIntegratorFactory factory + private static final GaussIntegratorFactory FACTORY = new GaussIntegratorFactory(); /** Number of integration points (per interval). */ private final int numberOfPoints; @@ -117,7 +117,7 @@ public class IterativeLegendreGaussIntegrator getRelativeAccuracy() * (FastMath.abs(oldt) + FastMath.abs(t)) * 0.5); // check convergence - if (iterations.getCount() + 1 >= getMinimalIterationCount() && + if (iterations.getCount() + 1 >= getMinimalIterationCount() && delta <= limit) { return t; } @@ -146,7 +146,7 @@ public class IterativeLegendreGaussIntegrator return computeObjectiveValue(x); } }; - + final double min = getMin(); final double max = getMax(); final double step = (max - min) / n; @@ -156,7 +156,7 @@ public class IterativeLegendreGaussIntegrator // Integrate over each sub-interval [a, b]. final double a = min + i * step; final double b = a + step; - final GaussIntegrator g = factory.legendreHighPrecision(numberOfPoints, a, b); + final GaussIntegrator g = FACTORY.legendreHighPrecision(numberOfPoints, a, b); sum += g.integrate(f); }