Repository: commons-math Updated Branches: refs/heads/MATH_3_X f6b8dabda -> bfc2d4902
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/bfc2d490 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/bfc2d490 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/bfc2d490 Branch: refs/heads/MATH_3_X Commit: bfc2d4902193f68b74e1edae7f86e5582def99f4 Parents: f6b8dab Author: Luc Maisonobe <l...@apache.org> Authored: Thu Sep 10 15:12:38 2015 +0200 Committer: Luc Maisonobe <l...@apache.org> Committed: Thu Sep 10 15:12:38 2015 +0200 ---------------------------------------------------------------------- .../commons/math3/ode/events/EventFilter.java | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/bfc2d490/src/main/java/org/apache/commons/math3/ode/events/EventFilter.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/ode/events/EventFilter.java b/src/main/java/org/apache/commons/math3/ode/events/EventFilter.java index 387cdd8..ffc2715 100644 --- a/src/main/java/org/apache/commons/math3/ode/events/EventFilter.java +++ b/src/main/java/org/apache/commons/math3/ode/events/EventFilter.java @@ -115,12 +115,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; @@ -154,12 +154,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;