Code style.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/2eaa0fc5 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/2eaa0fc5 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/2eaa0fc5 Branch: refs/heads/master Commit: 2eaa0fc5c169c6c6721f4f67de3159a78b0fb990 Parents: f813385 Author: Gilles <[email protected]> Authored: Tue May 8 15:57:34 2018 +0200 Committer: Gilles <[email protected]> Committed: Tue May 8 15:57:34 2018 +0200 ---------------------------------------------------------------------- .../math4/analysis/integration/SimpsonIntegrator.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/2eaa0fc5/src/main/java/org/apache/commons/math4/analysis/integration/SimpsonIntegrator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/analysis/integration/SimpsonIntegrator.java b/src/main/java/org/apache/commons/math4/analysis/integration/SimpsonIntegrator.java index 01179e5..2ac7fa7 100644 --- a/src/main/java/org/apache/commons/math4/analysis/integration/SimpsonIntegrator.java +++ b/src/main/java/org/apache/commons/math4/analysis/integration/SimpsonIntegrator.java @@ -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; } }
