Code style.
authorGilles <erans@apache.org>
Tue, 8 May 2018 13:57:34 +0000 (15:57 +0200)
committerGilles <erans@apache.org>
Tue, 8 May 2018 13:57:34 +0000 (15:57 +0200)
src/main/java/org/apache/commons/math4/analysis/integration/SimpsonIntegrator.java

index 01179e5..2ac7fa7 100644 (file)
@@ -97,12 +97,10 @@ public class SimpsonIntegrator extends BaseAbstractUnivariateIntegrator {
 
     /** {@inheritDoc} */
     @Override
-    protected double doIntegrate()
-        throws TooManyEvaluationsException, MaxCountExceededException {
-
+    protected double doIntegrate() {
         // Simpson's rule requires at least two trapezoid stages.
         // So we set the first sum using two trapezoid stages.
-        TrapezoidIntegrator qtrap = new TrapezoidIntegrator();
+        final TrapezoidIntegrator qtrap = new TrapezoidIntegrator();
 
         final double s0 = qtrap.stage(this, 0);
         double oldt = qtrap.stage(this, 1);
@@ -116,8 +114,8 @@ public class SimpsonIntegrator extends BaseAbstractUnivariateIntegrator {
             if (i >= getMinimalIterationCount()) {
                 final double delta = FastMath.abs(s - olds);
                 final double rLimit = getRelativeAccuracy() * (FastMath.abs(olds) + FastMath.abs(s)) * 0.5;
-                if ((delta <= rLimit) || (delta <= getAbsoluteAccuracy()))
-                {
+                if (delta <= rLimit ||
+                    delta <= getAbsoluteAccuracy()) {
                     return s;
                 }
             }