From commits-return-48138-apmail-commons-commits-archive=commons.apache.org@commons.apache.org Thu Sep 10 13:09:47 2015 Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6BF97178B3 for ; Thu, 10 Sep 2015 13:09:47 +0000 (UTC) Received: (qmail 80872 invoked by uid 500); 10 Sep 2015 13:09:47 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 80802 invoked by uid 500); 10 Sep 2015 13:09:47 -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 80793 invoked by uid 99); 10 Sep 2015 13:09:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2015 13:09:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F2E5CE0E57; Thu, 10 Sep 2015 13:09:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: luc@apache.org To: commits@commons.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [math] Clarified comments. Date: Thu, 10 Sep 2015 13:09:46 +0000 (UTC) Repository: commons-math Updated Branches: refs/heads/master 9ee68c2ff -> 9856f285e Clarified comments. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/9856f285 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/9856f285 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/9856f285 Branch: refs/heads/master Commit: 9856f285e40dabe5fa94fc442dc0e2515a49f4e5 Parents: 9ee68c2 Author: Luc Maisonobe Authored: Thu Sep 10 15:09:20 2015 +0200 Committer: Luc Maisonobe Committed: Thu Sep 10 15:09:20 2015 +0200 ---------------------------------------------------------------------- .../commons/math4/ode/events/EventFilter.java | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/9856f285/src/main/java/org/apache/commons/math4/ode/events/EventFilter.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/ode/events/EventFilter.java b/src/main/java/org/apache/commons/math4/ode/events/EventFilter.java index c1aa39f..7becb89 100644 --- a/src/main/java/org/apache/commons/math4/ode/events/EventFilter.java +++ b/src/main/java/org/apache/commons/math4/ode/events/EventFilter.java @@ -117,12 +117,12 @@ public class EventFilter implements EventHandler { final Transformer previous = transformers[last]; final Transformer next = filter.selectTransformer(previous, rawG, forward); if (next != previous) { - // there is a root somewhere between extremeT end t - // the new transformer, which is valid on both sides of the root, - // so it is valid for t (this is how we have just computed it above), - // but it was already valid before, so we store the switch at extremeT - // for safety, to ensure the previous transformer is not applied too - // close of the root + // there is a root somewhere between extremeT and t. + // the new transformer is valid for t (this is how we have just computed + // it above), but it is in fact valid on both sides of the root, so + // it was already valid before t and even up to previous time. We store + // the switch at extremeT for safety, to ensure the previous transformer + // is not applied too close of the root System.arraycopy(updates, 1, updates, 0, last); System.arraycopy(transformers, 1, transformers, 0, last); updates[last] = extremeT; @@ -156,12 +156,12 @@ public class EventFilter implements EventHandler { final Transformer previous = transformers[0]; final Transformer next = filter.selectTransformer(previous, rawG, forward); if (next != previous) { - // there is a root somewhere between extremeT end t - // the new transformer, which is valid on both sides of the root, - // so it is valid for t (this is how we have just computed it above), - // but it was already valid before, so we store the switch at extremeT - // for safety, to ensure the previous transformer is not applied too - // close of the root + // there is a root somewhere between extremeT and t. + // the new transformer is valid for t (this is how we have just computed + // it above), but it is in fact valid on both sides of the root, so + // it was already valid before t and even up to previous time. We store + // the switch at extremeT for safety, to ensure the previous transformer + // is not applied too close of the root System.arraycopy(updates, 0, updates, 1, updates.length - 1); System.arraycopy(transformers, 0, transformers, 1, transformers.length - 1); updates[0] = extremeT;