You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/05/08 15:51:04 UTC
[6/8] [math] Code style.
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/f813385c
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/f813385c
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/f813385c
Branch: refs/heads/master
Commit: f813385c7eca24c7b959f3016cf7a55d1facc280
Parents: a38ef0e
Author: Gilles <er...@apache.org>
Authored: Tue May 8 15:54:09 2018 +0200
Committer: Gilles <er...@apache.org>
Committed: Tue May 8 15:54:09 2018 +0200
----------------------------------------------------------------------
.../commons/math4/analysis/integration/SimpsonIntegrator.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/f813385c/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 26c79d5..01179e5 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
@@ -107,15 +107,13 @@ public class SimpsonIntegrator extends BaseAbstractUnivariateIntegrator {
final double s0 = qtrap.stage(this, 0);
double oldt = qtrap.stage(this, 1);
double olds = (4 * oldt - s0) / 3.0;
- while (true)
- {
+ while (true) {
// The first iteration is the first refinement of the sum.
iterations.incrementCount();
final int i = getIterations();
final double t = qtrap.stage(this, i + 1); // 1-stage ahead of the iteration
final double s = (4 * t - oldt) / 3.0;
- if (i >= getMinimalIterationCount())
- {
+ 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()))