commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r996195 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
Date Sat, 11 Sep 2010 19:06:11 GMT
Author: luc
Date: Sat Sep 11 19:06:11 2010
New Revision: 996195

URL: http://svn.apache.org/viewvc?rev=996195&view=rev
Log:
use the new Brent solver constructor instead of setting accuracy and max iteration afterwards

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java?rev=996195&r1=996194&r2=996195&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
Sat Sep 11 19:06:11 2010
@@ -224,9 +224,7 @@ public class EventState {
                             }
                         }
                     };
-                    final BrentSolver solver = new BrentSolver();
-                    solver.setAbsoluteAccuracy(convergence);
-                    solver.setMaximalIterationCount(maxIterationCount);
+                    final BrentSolver solver = new BrentSolver(maxIterationCount, convergence);
                     final double root = (ta <= tb) ? solver.solve(f, ta, tb) : solver.solve(f,
tb, ta);
                     if ((FastMath.abs(root - ta) <= convergence) &&
                          (FastMath.abs(root - previousEventTime) <= convergence)) {



Mime
View raw message