commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r959802 [7/10] - in /websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3: fraction/ geometry/euclidean/threed/ geometry/euclidean/twod/ ml/neuralnet/ ml/neuralnet/sofm/ ode/ ode/events/ special/ stat/infere...
Date Mon, 27 Jul 2015 19:40:45 GMT
Modified: websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/AbstractIntegrator.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/AbstractIntegrator.html (original)
+++ websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/AbstractIntegrator.html Mon Jul 27 19:40:45 2015
@@ -286,183 +286,186 @@
 <a class="jxr_linenumber" name="L278" href="#L278">278</a> <em class="jxr_javadoccomment">     * @param yDot placeholder array where to put the time derivative of the state vector</em>
 <a class="jxr_linenumber" name="L279" href="#L279">279</a> <em class="jxr_javadoccomment">     * @exception MaxCountExceededException if the number of functions evaluations is exceeded</em>
 <a class="jxr_linenumber" name="L280" href="#L280">280</a> <em class="jxr_javadoccomment">     * @exception DimensionMismatchException if arrays dimensions do not match equations settings</em>
-<a class="jxr_linenumber" name="L281" href="#L281">281</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L282" href="#L282">282</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> computeDerivatives(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] yDot)
-<a class="jxr_linenumber" name="L283" href="#L283">283</a>         <strong class="jxr_keyword">throws</strong> MaxCountExceededException, <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html">DimensionMismatchException</a> {
-<a class="jxr_linenumber" name="L284" href="#L284">284</a>         evaluations.incrementCount();
-<a class="jxr_linenumber" name="L285" href="#L285">285</a>         expandable.computeDerivatives(t, y, yDot);
-<a class="jxr_linenumber" name="L286" href="#L286">286</a>     }
-<a class="jxr_linenumber" name="L287" href="#L287">287</a> 
-<a class="jxr_linenumber" name="L288" href="#L288">288</a>     <em class="jxr_javadoccomment">/** Set the stateInitialized flag.</em>
-<a class="jxr_linenumber" name="L289" href="#L289">289</a> <em class="jxr_javadoccomment">     * &lt;p&gt;This method must be called by integrators with the value</em>
-<a class="jxr_linenumber" name="L290" href="#L290">290</a> <em class="jxr_javadoccomment">     * {@code false} before they start integration, so a proper lazy</em>
-<a class="jxr_linenumber" name="L291" href="#L291">291</a> <em class="jxr_javadoccomment">     * initialization is done automatically on the first step.&lt;/p&gt;</em>
-<a class="jxr_linenumber" name="L292" href="#L292">292</a> <em class="jxr_javadoccomment">     * @param stateInitialized new value for the flag</em>
-<a class="jxr_linenumber" name="L293" href="#L293">293</a> <em class="jxr_javadoccomment">     * @since 2.2</em>
-<a class="jxr_linenumber" name="L294" href="#L294">294</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L295" href="#L295">295</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> setStateInitialized(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">boolean</strong> stateInitialized) {
-<a class="jxr_linenumber" name="L296" href="#L296">296</a>         <strong class="jxr_keyword">this</strong>.statesInitialized = stateInitialized;
-<a class="jxr_linenumber" name="L297" href="#L297">297</a>     }
-<a class="jxr_linenumber" name="L298" href="#L298">298</a> 
-<a class="jxr_linenumber" name="L299" href="#L299">299</a>     <em class="jxr_javadoccomment">/** Accept a step, triggering events and step handlers.</em>
-<a class="jxr_linenumber" name="L300" href="#L300">300</a> <em class="jxr_javadoccomment">     * @param interpolator step interpolator</em>
-<a class="jxr_linenumber" name="L301" href="#L301">301</a> <em class="jxr_javadoccomment">     * @param y state vector at step end time, must be reset if an event</em>
-<a class="jxr_linenumber" name="L302" href="#L302">302</a> <em class="jxr_javadoccomment">     * asks for resetting or if an events stops integration during the step</em>
-<a class="jxr_linenumber" name="L303" href="#L303">303</a> <em class="jxr_javadoccomment">     * @param yDot placeholder array where to put the time derivative of the state vector</em>
-<a class="jxr_linenumber" name="L304" href="#L304">304</a> <em class="jxr_javadoccomment">     * @param tEnd final integration time</em>
-<a class="jxr_linenumber" name="L305" href="#L305">305</a> <em class="jxr_javadoccomment">     * @return time at end of step</em>
-<a class="jxr_linenumber" name="L306" href="#L306">306</a> <em class="jxr_javadoccomment">     * @exception MaxCountExceededException if the interpolator throws one because</em>
-<a class="jxr_linenumber" name="L307" href="#L307">307</a> <em class="jxr_javadoccomment">     * the number of functions evaluations is exceeded</em>
-<a class="jxr_linenumber" name="L308" href="#L308">308</a> <em class="jxr_javadoccomment">     * @exception NoBracketingException if the location of an event cannot be bracketed</em>
-<a class="jxr_linenumber" name="L309" href="#L309">309</a> <em class="jxr_javadoccomment">     * @exception DimensionMismatchException if arrays dimensions do not match equations settings</em>
-<a class="jxr_linenumber" name="L310" href="#L310">310</a> <em class="jxr_javadoccomment">     * @since 2.2</em>
-<a class="jxr_linenumber" name="L311" href="#L311">311</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L312" href="#L312">312</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">double</strong> acceptStep(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/ode/sampling/AbstractStepInterpolator.html">AbstractStepInterpolator</a> interpolator,
-<a class="jxr_linenumber" name="L313" href="#L313">313</a>                                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] yDot, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> tEnd)
-<a class="jxr_linenumber" name="L314" href="#L314">314</a>         <strong class="jxr_keyword">throws</strong> MaxCountExceededException, DimensionMismatchException, <a href="../../../../../org/apache/commons/math3/exception/NoBracketingException.html">NoBracketingException</a> {
-<a class="jxr_linenumber" name="L315" href="#L315">315</a> 
-<a class="jxr_linenumber" name="L316" href="#L316">316</a>             <strong class="jxr_keyword">double</strong> previousT = interpolator.getGlobalPreviousTime();
-<a class="jxr_linenumber" name="L317" href="#L317">317</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> currentT = interpolator.getGlobalCurrentTime();
+<a class="jxr_linenumber" name="L281" href="#L281">281</a> <em class="jxr_javadoccomment">     * @exception NullPointerException if the ODE equations have not been set (i.e. if this method</em>
+<a class="jxr_linenumber" name="L282" href="#L282">282</a> <em class="jxr_javadoccomment">     * is called outside of a call to {@link #integrate(ExpandableStatefulODE, double)} or {@link</em>
+<a class="jxr_linenumber" name="L283" href="#L283">283</a> <em class="jxr_javadoccomment">     * #integrate(FirstOrderDifferentialEquations, double, double[], double, double[])})</em>
+<a class="jxr_linenumber" name="L284" href="#L284">284</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L285" href="#L285">285</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> computeDerivatives(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] yDot)
+<a class="jxr_linenumber" name="L286" href="#L286">286</a>         <strong class="jxr_keyword">throws</strong> MaxCountExceededException, DimensionMismatchException, NullPointerException {
+<a class="jxr_linenumber" name="L287" href="#L287">287</a>         evaluations.incrementCount();
+<a class="jxr_linenumber" name="L288" href="#L288">288</a>         expandable.computeDerivatives(t, y, yDot);
+<a class="jxr_linenumber" name="L289" href="#L289">289</a>     }
+<a class="jxr_linenumber" name="L290" href="#L290">290</a> 
+<a class="jxr_linenumber" name="L291" href="#L291">291</a>     <em class="jxr_javadoccomment">/** Set the stateInitialized flag.</em>
+<a class="jxr_linenumber" name="L292" href="#L292">292</a> <em class="jxr_javadoccomment">     * &lt;p&gt;This method must be called by integrators with the value</em>
+<a class="jxr_linenumber" name="L293" href="#L293">293</a> <em class="jxr_javadoccomment">     * {@code false} before they start integration, so a proper lazy</em>
+<a class="jxr_linenumber" name="L294" href="#L294">294</a> <em class="jxr_javadoccomment">     * initialization is done automatically on the first step.&lt;/p&gt;</em>
+<a class="jxr_linenumber" name="L295" href="#L295">295</a> <em class="jxr_javadoccomment">     * @param stateInitialized new value for the flag</em>
+<a class="jxr_linenumber" name="L296" href="#L296">296</a> <em class="jxr_javadoccomment">     * @since 2.2</em>
+<a class="jxr_linenumber" name="L297" href="#L297">297</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L298" href="#L298">298</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> setStateInitialized(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">boolean</strong> stateInitialized) {
+<a class="jxr_linenumber" name="L299" href="#L299">299</a>         <strong class="jxr_keyword">this</strong>.statesInitialized = stateInitialized;
+<a class="jxr_linenumber" name="L300" href="#L300">300</a>     }
+<a class="jxr_linenumber" name="L301" href="#L301">301</a> 
+<a class="jxr_linenumber" name="L302" href="#L302">302</a>     <em class="jxr_javadoccomment">/** Accept a step, triggering events and step handlers.</em>
+<a class="jxr_linenumber" name="L303" href="#L303">303</a> <em class="jxr_javadoccomment">     * @param interpolator step interpolator</em>
+<a class="jxr_linenumber" name="L304" href="#L304">304</a> <em class="jxr_javadoccomment">     * @param y state vector at step end time, must be reset if an event</em>
+<a class="jxr_linenumber" name="L305" href="#L305">305</a> <em class="jxr_javadoccomment">     * asks for resetting or if an events stops integration during the step</em>
+<a class="jxr_linenumber" name="L306" href="#L306">306</a> <em class="jxr_javadoccomment">     * @param yDot placeholder array where to put the time derivative of the state vector</em>
+<a class="jxr_linenumber" name="L307" href="#L307">307</a> <em class="jxr_javadoccomment">     * @param tEnd final integration time</em>
+<a class="jxr_linenumber" name="L308" href="#L308">308</a> <em class="jxr_javadoccomment">     * @return time at end of step</em>
+<a class="jxr_linenumber" name="L309" href="#L309">309</a> <em class="jxr_javadoccomment">     * @exception MaxCountExceededException if the interpolator throws one because</em>
+<a class="jxr_linenumber" name="L310" href="#L310">310</a> <em class="jxr_javadoccomment">     * the number of functions evaluations is exceeded</em>
+<a class="jxr_linenumber" name="L311" href="#L311">311</a> <em class="jxr_javadoccomment">     * @exception NoBracketingException if the location of an event cannot be bracketed</em>
+<a class="jxr_linenumber" name="L312" href="#L312">312</a> <em class="jxr_javadoccomment">     * @exception DimensionMismatchException if arrays dimensions do not match equations settings</em>
+<a class="jxr_linenumber" name="L313" href="#L313">313</a> <em class="jxr_javadoccomment">     * @since 2.2</em>
+<a class="jxr_linenumber" name="L314" href="#L314">314</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L315" href="#L315">315</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">double</strong> acceptStep(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/ode/sampling/AbstractStepInterpolator.html">AbstractStepInterpolator</a> interpolator,
+<a class="jxr_linenumber" name="L316" href="#L316">316</a>                                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] yDot, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> tEnd)
+<a class="jxr_linenumber" name="L317" href="#L317">317</a>         <strong class="jxr_keyword">throws</strong> MaxCountExceededException, DimensionMismatchException, <a href="../../../../../org/apache/commons/math3/exception/NoBracketingException.html">NoBracketingException</a> {
 <a class="jxr_linenumber" name="L318" href="#L318">318</a> 
-<a class="jxr_linenumber" name="L319" href="#L319">319</a>             <em class="jxr_comment">// initialize the events states if needed</em>
-<a class="jxr_linenumber" name="L320" href="#L320">320</a>             <strong class="jxr_keyword">if</strong> (! statesInitialized) {
-<a class="jxr_linenumber" name="L321" href="#L321">321</a>                 <strong class="jxr_keyword">for</strong> (EventState state : eventsStates) {
-<a class="jxr_linenumber" name="L322" href="#L322">322</a>                     state.reinitializeBegin(interpolator);
-<a class="jxr_linenumber" name="L323" href="#L323">323</a>                 }
-<a class="jxr_linenumber" name="L324" href="#L324">324</a>                 statesInitialized = <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L325" href="#L325">325</a>             }
-<a class="jxr_linenumber" name="L326" href="#L326">326</a> 
-<a class="jxr_linenumber" name="L327" href="#L327">327</a>             <em class="jxr_comment">// search for next events that may occur during the step</em>
-<a class="jxr_linenumber" name="L328" href="#L328">328</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> orderingSign = interpolator.isForward() ? +1 : -1;
-<a class="jxr_linenumber" name="L329" href="#L329">329</a>             SortedSet&lt;EventState&gt; occurringEvents = <strong class="jxr_keyword">new</strong> TreeSet&lt;EventState&gt;(<strong class="jxr_keyword">new</strong> Comparator&lt;EventState&gt;() {
-<a class="jxr_linenumber" name="L330" href="#L330">330</a> 
-<a class="jxr_linenumber" name="L331" href="#L331">331</a>                 <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
-<a class="jxr_linenumber" name="L332" href="#L332">332</a>                 <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> compare(<a href="../../../../../org/apache/commons/math3/ode/events/EventState.html">EventState</a> es0, <a href="../../../../../org/apache/commons/math3/ode/events/EventState.html">EventState</a> es1) {
-<a class="jxr_linenumber" name="L333" href="#L333">333</a>                     <strong class="jxr_keyword">return</strong> orderingSign * Double.compare(es0.getEventTime(), es1.getEventTime());
-<a class="jxr_linenumber" name="L334" href="#L334">334</a>                 }
-<a class="jxr_linenumber" name="L335" href="#L335">335</a> 
-<a class="jxr_linenumber" name="L336" href="#L336">336</a>             });
-<a class="jxr_linenumber" name="L337" href="#L337">337</a> 
-<a class="jxr_linenumber" name="L338" href="#L338">338</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
-<a class="jxr_linenumber" name="L339" href="#L339">339</a>                 <strong class="jxr_keyword">if</strong> (state.evaluateStep(interpolator)) {
-<a class="jxr_linenumber" name="L340" href="#L340">340</a>                     <em class="jxr_comment">// the event occurs during the current step</em>
-<a class="jxr_linenumber" name="L341" href="#L341">341</a>                     occurringEvents.add(state);
-<a class="jxr_linenumber" name="L342" href="#L342">342</a>                 }
-<a class="jxr_linenumber" name="L343" href="#L343">343</a>             }
-<a class="jxr_linenumber" name="L344" href="#L344">344</a> 
-<a class="jxr_linenumber" name="L345" href="#L345">345</a>             <strong class="jxr_keyword">while</strong> (!occurringEvents.isEmpty()) {
-<a class="jxr_linenumber" name="L346" href="#L346">346</a> 
-<a class="jxr_linenumber" name="L347" href="#L347">347</a>                 <em class="jxr_comment">// handle the chronologically first event</em>
-<a class="jxr_linenumber" name="L348" href="#L348">348</a>                 <strong class="jxr_keyword">final</strong> Iterator&lt;EventState&gt; iterator = occurringEvents.iterator();
-<a class="jxr_linenumber" name="L349" href="#L349">349</a>                 <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/ode/events/EventState.html">EventState</a> currentEvent = iterator.next();
-<a class="jxr_linenumber" name="L350" href="#L350">350</a>                 iterator.remove();
-<a class="jxr_linenumber" name="L351" href="#L351">351</a> 
-<a class="jxr_linenumber" name="L352" href="#L352">352</a>                 <em class="jxr_comment">// restrict the interpolator to the first part of the step, up to the event</em>
-<a class="jxr_linenumber" name="L353" href="#L353">353</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> eventT = currentEvent.getEventTime();
-<a class="jxr_linenumber" name="L354" href="#L354">354</a>                 interpolator.setSoftPreviousTime(previousT);
-<a class="jxr_linenumber" name="L355" href="#L355">355</a>                 interpolator.setSoftCurrentTime(eventT);
-<a class="jxr_linenumber" name="L356" href="#L356">356</a> 
-<a class="jxr_linenumber" name="L357" href="#L357">357</a>                 <em class="jxr_comment">// get state at event time</em>
-<a class="jxr_linenumber" name="L358" href="#L358">358</a>                 interpolator.setInterpolatedTime(eventT);
-<a class="jxr_linenumber" name="L359" href="#L359">359</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] eventYComplete = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[y.length];
-<a class="jxr_linenumber" name="L360" href="#L360">360</a>                 expandable.getPrimaryMapper().insertEquationData(interpolator.getInterpolatedState(),
-<a class="jxr_linenumber" name="L361" href="#L361">361</a>                                                                  eventYComplete);
-<a class="jxr_linenumber" name="L362" href="#L362">362</a>                 <strong class="jxr_keyword">int</strong> index = 0;
-<a class="jxr_linenumber" name="L363" href="#L363">363</a>                 <strong class="jxr_keyword">for</strong> (EquationsMapper secondary : expandable.getSecondaryMappers()) {
-<a class="jxr_linenumber" name="L364" href="#L364">364</a>                     secondary.insertEquationData(interpolator.getInterpolatedSecondaryState(index++),
-<a class="jxr_linenumber" name="L365" href="#L365">365</a>                                                  eventYComplete);
-<a class="jxr_linenumber" name="L366" href="#L366">366</a>                 }
-<a class="jxr_linenumber" name="L367" href="#L367">367</a> 
-<a class="jxr_linenumber" name="L368" href="#L368">368</a>                 <em class="jxr_comment">// advance all event states to current time</em>
-<a class="jxr_linenumber" name="L369" href="#L369">369</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
-<a class="jxr_linenumber" name="L370" href="#L370">370</a>                     state.stepAccepted(eventT, eventYComplete);
-<a class="jxr_linenumber" name="L371" href="#L371">371</a>                     isLastStep = isLastStep || state.stop();
-<a class="jxr_linenumber" name="L372" href="#L372">372</a>                 }
-<a class="jxr_linenumber" name="L373" href="#L373">373</a> 
-<a class="jxr_linenumber" name="L374" href="#L374">374</a>                 <em class="jxr_comment">// handle the first part of the step, up to the event</em>
-<a class="jxr_linenumber" name="L375" href="#L375">375</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> StepHandler handler : stepHandlers) {
-<a class="jxr_linenumber" name="L376" href="#L376">376</a>                     handler.handleStep(interpolator, isLastStep);
-<a class="jxr_linenumber" name="L377" href="#L377">377</a>                 }
-<a class="jxr_linenumber" name="L378" href="#L378">378</a> 
-<a class="jxr_linenumber" name="L379" href="#L379">379</a>                 <strong class="jxr_keyword">if</strong> (isLastStep) {
-<a class="jxr_linenumber" name="L380" href="#L380">380</a>                     <em class="jxr_comment">// the event asked to stop integration</em>
-<a class="jxr_linenumber" name="L381" href="#L381">381</a>                     System.arraycopy(eventYComplete, 0, y, 0, y.length);
-<a class="jxr_linenumber" name="L382" href="#L382">382</a>                     <strong class="jxr_keyword">return</strong> eventT;
-<a class="jxr_linenumber" name="L383" href="#L383">383</a>                 }
-<a class="jxr_linenumber" name="L384" href="#L384">384</a> 
-<a class="jxr_linenumber" name="L385" href="#L385">385</a>                 <strong class="jxr_keyword">boolean</strong> needReset = false;
-<a class="jxr_linenumber" name="L386" href="#L386">386</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
-<a class="jxr_linenumber" name="L387" href="#L387">387</a>                     needReset =  needReset || state.reset(eventT, eventYComplete);
-<a class="jxr_linenumber" name="L388" href="#L388">388</a>                 }
-<a class="jxr_linenumber" name="L389" href="#L389">389</a>                 <strong class="jxr_keyword">if</strong> (needReset) {
-<a class="jxr_linenumber" name="L390" href="#L390">390</a>                     <em class="jxr_comment">// some event handler has triggered changes that</em>
-<a class="jxr_linenumber" name="L391" href="#L391">391</a>                     <em class="jxr_comment">// invalidate the derivatives, we need to recompute them</em>
-<a class="jxr_linenumber" name="L392" href="#L392">392</a>                     interpolator.setInterpolatedTime(eventT);
-<a class="jxr_linenumber" name="L393" href="#L393">393</a>                     System.arraycopy(eventYComplete, 0, y, 0, y.length);
-<a class="jxr_linenumber" name="L394" href="#L394">394</a>                     computeDerivatives(eventT, y, yDot);
-<a class="jxr_linenumber" name="L395" href="#L395">395</a>                     resetOccurred = <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L396" href="#L396">396</a>                     <strong class="jxr_keyword">return</strong> eventT;
-<a class="jxr_linenumber" name="L397" href="#L397">397</a>                 }
-<a class="jxr_linenumber" name="L398" href="#L398">398</a> 
-<a class="jxr_linenumber" name="L399" href="#L399">399</a>                 <em class="jxr_comment">// prepare handling of the remaining part of the step</em>
-<a class="jxr_linenumber" name="L400" href="#L400">400</a>                 previousT = eventT;
-<a class="jxr_linenumber" name="L401" href="#L401">401</a>                 interpolator.setSoftPreviousTime(eventT);
-<a class="jxr_linenumber" name="L402" href="#L402">402</a>                 interpolator.setSoftCurrentTime(currentT);
-<a class="jxr_linenumber" name="L403" href="#L403">403</a> 
-<a class="jxr_linenumber" name="L404" href="#L404">404</a>                 <em class="jxr_comment">// check if the same event occurs again in the remaining part of the step</em>
-<a class="jxr_linenumber" name="L405" href="#L405">405</a>                 <strong class="jxr_keyword">if</strong> (currentEvent.evaluateStep(interpolator)) {
-<a class="jxr_linenumber" name="L406" href="#L406">406</a>                     <em class="jxr_comment">// the event occurs during the current step</em>
-<a class="jxr_linenumber" name="L407" href="#L407">407</a>                     occurringEvents.add(currentEvent);
-<a class="jxr_linenumber" name="L408" href="#L408">408</a>                 }
-<a class="jxr_linenumber" name="L409" href="#L409">409</a> 
-<a class="jxr_linenumber" name="L410" href="#L410">410</a>             }
-<a class="jxr_linenumber" name="L411" href="#L411">411</a> 
-<a class="jxr_linenumber" name="L412" href="#L412">412</a>             <em class="jxr_comment">// last part of the step, after the last event</em>
-<a class="jxr_linenumber" name="L413" href="#L413">413</a>             interpolator.setInterpolatedTime(currentT);
-<a class="jxr_linenumber" name="L414" href="#L414">414</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] currentY = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[y.length];
-<a class="jxr_linenumber" name="L415" href="#L415">415</a>             expandable.getPrimaryMapper().insertEquationData(interpolator.getInterpolatedState(),
-<a class="jxr_linenumber" name="L416" href="#L416">416</a>                                                              currentY);
-<a class="jxr_linenumber" name="L417" href="#L417">417</a>             <strong class="jxr_keyword">int</strong> index = 0;
-<a class="jxr_linenumber" name="L418" href="#L418">418</a>             <strong class="jxr_keyword">for</strong> (EquationsMapper secondary : expandable.getSecondaryMappers()) {
-<a class="jxr_linenumber" name="L419" href="#L419">419</a>                 secondary.insertEquationData(interpolator.getInterpolatedSecondaryState(index++),
-<a class="jxr_linenumber" name="L420" href="#L420">420</a>                                              currentY);
-<a class="jxr_linenumber" name="L421" href="#L421">421</a>             }
-<a class="jxr_linenumber" name="L422" href="#L422">422</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
-<a class="jxr_linenumber" name="L423" href="#L423">423</a>                 state.stepAccepted(currentT, currentY);
-<a class="jxr_linenumber" name="L424" href="#L424">424</a>                 isLastStep = isLastStep || state.stop();
-<a class="jxr_linenumber" name="L425" href="#L425">425</a>             }
-<a class="jxr_linenumber" name="L426" href="#L426">426</a>             isLastStep = isLastStep || Precision.equals(currentT, tEnd, 1);
-<a class="jxr_linenumber" name="L427" href="#L427">427</a> 
-<a class="jxr_linenumber" name="L428" href="#L428">428</a>             <em class="jxr_comment">// handle the remaining part of the step, after all events if any</em>
-<a class="jxr_linenumber" name="L429" href="#L429">429</a>             <strong class="jxr_keyword">for</strong> (StepHandler handler : stepHandlers) {
-<a class="jxr_linenumber" name="L430" href="#L430">430</a>                 handler.handleStep(interpolator, isLastStep);
-<a class="jxr_linenumber" name="L431" href="#L431">431</a>             }
-<a class="jxr_linenumber" name="L432" href="#L432">432</a> 
-<a class="jxr_linenumber" name="L433" href="#L433">433</a>             <strong class="jxr_keyword">return</strong> currentT;
-<a class="jxr_linenumber" name="L434" href="#L434">434</a> 
-<a class="jxr_linenumber" name="L435" href="#L435">435</a>     }
-<a class="jxr_linenumber" name="L436" href="#L436">436</a> 
-<a class="jxr_linenumber" name="L437" href="#L437">437</a>     <em class="jxr_javadoccomment">/** Check the integration span.</em>
-<a class="jxr_linenumber" name="L438" href="#L438">438</a> <em class="jxr_javadoccomment">     * @param equations set of differential equations</em>
-<a class="jxr_linenumber" name="L439" href="#L439">439</a> <em class="jxr_javadoccomment">     * @param t target time for the integration</em>
-<a class="jxr_linenumber" name="L440" href="#L440">440</a> <em class="jxr_javadoccomment">     * @exception NumberIsTooSmallException if integration span is too small</em>
-<a class="jxr_linenumber" name="L441" href="#L441">441</a> <em class="jxr_javadoccomment">     * @exception DimensionMismatchException if adaptive step size integrators</em>
-<a class="jxr_linenumber" name="L442" href="#L442">442</a> <em class="jxr_javadoccomment">     * tolerance arrays dimensions are not compatible with equations settings</em>
-<a class="jxr_linenumber" name="L443" href="#L443">443</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L444" href="#L444">444</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> sanityChecks(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/ode/ExpandableStatefulODE.html">ExpandableStatefulODE</a> equations, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t)
-<a class="jxr_linenumber" name="L445" href="#L445">445</a>         <strong class="jxr_keyword">throws</strong> NumberIsTooSmallException, <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html">DimensionMismatchException</a> {
-<a class="jxr_linenumber" name="L446" href="#L446">446</a> 
-<a class="jxr_linenumber" name="L447" href="#L447">447</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> threshold = 1000 * FastMath.ulp(FastMath.max(FastMath.abs(equations.getTime()),
-<a class="jxr_linenumber" name="L448" href="#L448">448</a>                                                                   FastMath.abs(t)));
-<a class="jxr_linenumber" name="L449" href="#L449">449</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> dt = FastMath.abs(equations.getTime() - t);
-<a class="jxr_linenumber" name="L450" href="#L450">450</a>         <strong class="jxr_keyword">if</strong> (dt &lt;= threshold) {
-<a class="jxr_linenumber" name="L451" href="#L451">451</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html">NumberIsTooSmallException</a>(LocalizedFormats.TOO_SMALL_INTEGRATION_INTERVAL,
-<a class="jxr_linenumber" name="L452" href="#L452">452</a>                                                 dt, threshold, false);
-<a class="jxr_linenumber" name="L453" href="#L453">453</a>         }
-<a class="jxr_linenumber" name="L454" href="#L454">454</a> 
-<a class="jxr_linenumber" name="L455" href="#L455">455</a>     }
-<a class="jxr_linenumber" name="L456" href="#L456">456</a> 
-<a class="jxr_linenumber" name="L457" href="#L457">457</a> }
+<a class="jxr_linenumber" name="L319" href="#L319">319</a>             <strong class="jxr_keyword">double</strong> previousT = interpolator.getGlobalPreviousTime();
+<a class="jxr_linenumber" name="L320" href="#L320">320</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> currentT = interpolator.getGlobalCurrentTime();
+<a class="jxr_linenumber" name="L321" href="#L321">321</a> 
+<a class="jxr_linenumber" name="L322" href="#L322">322</a>             <em class="jxr_comment">// initialize the events states if needed</em>
+<a class="jxr_linenumber" name="L323" href="#L323">323</a>             <strong class="jxr_keyword">if</strong> (! statesInitialized) {
+<a class="jxr_linenumber" name="L324" href="#L324">324</a>                 <strong class="jxr_keyword">for</strong> (EventState state : eventsStates) {
+<a class="jxr_linenumber" name="L325" href="#L325">325</a>                     state.reinitializeBegin(interpolator);
+<a class="jxr_linenumber" name="L326" href="#L326">326</a>                 }
+<a class="jxr_linenumber" name="L327" href="#L327">327</a>                 statesInitialized = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L328" href="#L328">328</a>             }
+<a class="jxr_linenumber" name="L329" href="#L329">329</a> 
+<a class="jxr_linenumber" name="L330" href="#L330">330</a>             <em class="jxr_comment">// search for next events that may occur during the step</em>
+<a class="jxr_linenumber" name="L331" href="#L331">331</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> orderingSign = interpolator.isForward() ? +1 : -1;
+<a class="jxr_linenumber" name="L332" href="#L332">332</a>             SortedSet&lt;EventState&gt; occurringEvents = <strong class="jxr_keyword">new</strong> TreeSet&lt;EventState&gt;(<strong class="jxr_keyword">new</strong> Comparator&lt;EventState&gt;() {
+<a class="jxr_linenumber" name="L333" href="#L333">333</a> 
+<a class="jxr_linenumber" name="L334" href="#L334">334</a>                 <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
+<a class="jxr_linenumber" name="L335" href="#L335">335</a>                 <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> compare(<a href="../../../../../org/apache/commons/math3/ode/events/EventState.html">EventState</a> es0, <a href="../../../../../org/apache/commons/math3/ode/events/EventState.html">EventState</a> es1) {
+<a class="jxr_linenumber" name="L336" href="#L336">336</a>                     <strong class="jxr_keyword">return</strong> orderingSign * Double.compare(es0.getEventTime(), es1.getEventTime());
+<a class="jxr_linenumber" name="L337" href="#L337">337</a>                 }
+<a class="jxr_linenumber" name="L338" href="#L338">338</a> 
+<a class="jxr_linenumber" name="L339" href="#L339">339</a>             });
+<a class="jxr_linenumber" name="L340" href="#L340">340</a> 
+<a class="jxr_linenumber" name="L341" href="#L341">341</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
+<a class="jxr_linenumber" name="L342" href="#L342">342</a>                 <strong class="jxr_keyword">if</strong> (state.evaluateStep(interpolator)) {
+<a class="jxr_linenumber" name="L343" href="#L343">343</a>                     <em class="jxr_comment">// the event occurs during the current step</em>
+<a class="jxr_linenumber" name="L344" href="#L344">344</a>                     occurringEvents.add(state);
+<a class="jxr_linenumber" name="L345" href="#L345">345</a>                 }
+<a class="jxr_linenumber" name="L346" href="#L346">346</a>             }
+<a class="jxr_linenumber" name="L347" href="#L347">347</a> 
+<a class="jxr_linenumber" name="L348" href="#L348">348</a>             <strong class="jxr_keyword">while</strong> (!occurringEvents.isEmpty()) {
+<a class="jxr_linenumber" name="L349" href="#L349">349</a> 
+<a class="jxr_linenumber" name="L350" href="#L350">350</a>                 <em class="jxr_comment">// handle the chronologically first event</em>
+<a class="jxr_linenumber" name="L351" href="#L351">351</a>                 <strong class="jxr_keyword">final</strong> Iterator&lt;EventState&gt; iterator = occurringEvents.iterator();
+<a class="jxr_linenumber" name="L352" href="#L352">352</a>                 <strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/ode/events/EventState.html">EventState</a> currentEvent = iterator.next();
+<a class="jxr_linenumber" name="L353" href="#L353">353</a>                 iterator.remove();
+<a class="jxr_linenumber" name="L354" href="#L354">354</a> 
+<a class="jxr_linenumber" name="L355" href="#L355">355</a>                 <em class="jxr_comment">// restrict the interpolator to the first part of the step, up to the event</em>
+<a class="jxr_linenumber" name="L356" href="#L356">356</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> eventT = currentEvent.getEventTime();
+<a class="jxr_linenumber" name="L357" href="#L357">357</a>                 interpolator.setSoftPreviousTime(previousT);
+<a class="jxr_linenumber" name="L358" href="#L358">358</a>                 interpolator.setSoftCurrentTime(eventT);
+<a class="jxr_linenumber" name="L359" href="#L359">359</a> 
+<a class="jxr_linenumber" name="L360" href="#L360">360</a>                 <em class="jxr_comment">// get state at event time</em>
+<a class="jxr_linenumber" name="L361" href="#L361">361</a>                 interpolator.setInterpolatedTime(eventT);
+<a class="jxr_linenumber" name="L362" href="#L362">362</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] eventYComplete = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[y.length];
+<a class="jxr_linenumber" name="L363" href="#L363">363</a>                 expandable.getPrimaryMapper().insertEquationData(interpolator.getInterpolatedState(),
+<a class="jxr_linenumber" name="L364" href="#L364">364</a>                                                                  eventYComplete);
+<a class="jxr_linenumber" name="L365" href="#L365">365</a>                 <strong class="jxr_keyword">int</strong> index = 0;
+<a class="jxr_linenumber" name="L366" href="#L366">366</a>                 <strong class="jxr_keyword">for</strong> (EquationsMapper secondary : expandable.getSecondaryMappers()) {
+<a class="jxr_linenumber" name="L367" href="#L367">367</a>                     secondary.insertEquationData(interpolator.getInterpolatedSecondaryState(index++),
+<a class="jxr_linenumber" name="L368" href="#L368">368</a>                                                  eventYComplete);
+<a class="jxr_linenumber" name="L369" href="#L369">369</a>                 }
+<a class="jxr_linenumber" name="L370" href="#L370">370</a> 
+<a class="jxr_linenumber" name="L371" href="#L371">371</a>                 <em class="jxr_comment">// advance all event states to current time</em>
+<a class="jxr_linenumber" name="L372" href="#L372">372</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
+<a class="jxr_linenumber" name="L373" href="#L373">373</a>                     state.stepAccepted(eventT, eventYComplete);
+<a class="jxr_linenumber" name="L374" href="#L374">374</a>                     isLastStep = isLastStep || state.stop();
+<a class="jxr_linenumber" name="L375" href="#L375">375</a>                 }
+<a class="jxr_linenumber" name="L376" href="#L376">376</a> 
+<a class="jxr_linenumber" name="L377" href="#L377">377</a>                 <em class="jxr_comment">// handle the first part of the step, up to the event</em>
+<a class="jxr_linenumber" name="L378" href="#L378">378</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> StepHandler handler : stepHandlers) {
+<a class="jxr_linenumber" name="L379" href="#L379">379</a>                     handler.handleStep(interpolator, isLastStep);
+<a class="jxr_linenumber" name="L380" href="#L380">380</a>                 }
+<a class="jxr_linenumber" name="L381" href="#L381">381</a> 
+<a class="jxr_linenumber" name="L382" href="#L382">382</a>                 <strong class="jxr_keyword">if</strong> (isLastStep) {
+<a class="jxr_linenumber" name="L383" href="#L383">383</a>                     <em class="jxr_comment">// the event asked to stop integration</em>
+<a class="jxr_linenumber" name="L384" href="#L384">384</a>                     System.arraycopy(eventYComplete, 0, y, 0, y.length);
+<a class="jxr_linenumber" name="L385" href="#L385">385</a>                     <strong class="jxr_keyword">return</strong> eventT;
+<a class="jxr_linenumber" name="L386" href="#L386">386</a>                 }
+<a class="jxr_linenumber" name="L387" href="#L387">387</a> 
+<a class="jxr_linenumber" name="L388" href="#L388">388</a>                 <strong class="jxr_keyword">boolean</strong> needReset = false;
+<a class="jxr_linenumber" name="L389" href="#L389">389</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
+<a class="jxr_linenumber" name="L390" href="#L390">390</a>                     needReset =  needReset || state.reset(eventT, eventYComplete);
+<a class="jxr_linenumber" name="L391" href="#L391">391</a>                 }
+<a class="jxr_linenumber" name="L392" href="#L392">392</a>                 <strong class="jxr_keyword">if</strong> (needReset) {
+<a class="jxr_linenumber" name="L393" href="#L393">393</a>                     <em class="jxr_comment">// some event handler has triggered changes that</em>
+<a class="jxr_linenumber" name="L394" href="#L394">394</a>                     <em class="jxr_comment">// invalidate the derivatives, we need to recompute them</em>
+<a class="jxr_linenumber" name="L395" href="#L395">395</a>                     interpolator.setInterpolatedTime(eventT);
+<a class="jxr_linenumber" name="L396" href="#L396">396</a>                     System.arraycopy(eventYComplete, 0, y, 0, y.length);
+<a class="jxr_linenumber" name="L397" href="#L397">397</a>                     computeDerivatives(eventT, y, yDot);
+<a class="jxr_linenumber" name="L398" href="#L398">398</a>                     resetOccurred = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L399" href="#L399">399</a>                     <strong class="jxr_keyword">return</strong> eventT;
+<a class="jxr_linenumber" name="L400" href="#L400">400</a>                 }
+<a class="jxr_linenumber" name="L401" href="#L401">401</a> 
+<a class="jxr_linenumber" name="L402" href="#L402">402</a>                 <em class="jxr_comment">// prepare handling of the remaining part of the step</em>
+<a class="jxr_linenumber" name="L403" href="#L403">403</a>                 previousT = eventT;
+<a class="jxr_linenumber" name="L404" href="#L404">404</a>                 interpolator.setSoftPreviousTime(eventT);
+<a class="jxr_linenumber" name="L405" href="#L405">405</a>                 interpolator.setSoftCurrentTime(currentT);
+<a class="jxr_linenumber" name="L406" href="#L406">406</a> 
+<a class="jxr_linenumber" name="L407" href="#L407">407</a>                 <em class="jxr_comment">// check if the same event occurs again in the remaining part of the step</em>
+<a class="jxr_linenumber" name="L408" href="#L408">408</a>                 <strong class="jxr_keyword">if</strong> (currentEvent.evaluateStep(interpolator)) {
+<a class="jxr_linenumber" name="L409" href="#L409">409</a>                     <em class="jxr_comment">// the event occurs during the current step</em>
+<a class="jxr_linenumber" name="L410" href="#L410">410</a>                     occurringEvents.add(currentEvent);
+<a class="jxr_linenumber" name="L411" href="#L411">411</a>                 }
+<a class="jxr_linenumber" name="L412" href="#L412">412</a> 
+<a class="jxr_linenumber" name="L413" href="#L413">413</a>             }
+<a class="jxr_linenumber" name="L414" href="#L414">414</a> 
+<a class="jxr_linenumber" name="L415" href="#L415">415</a>             <em class="jxr_comment">// last part of the step, after the last event</em>
+<a class="jxr_linenumber" name="L416" href="#L416">416</a>             interpolator.setInterpolatedTime(currentT);
+<a class="jxr_linenumber" name="L417" href="#L417">417</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] currentY = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[y.length];
+<a class="jxr_linenumber" name="L418" href="#L418">418</a>             expandable.getPrimaryMapper().insertEquationData(interpolator.getInterpolatedState(),
+<a class="jxr_linenumber" name="L419" href="#L419">419</a>                                                              currentY);
+<a class="jxr_linenumber" name="L420" href="#L420">420</a>             <strong class="jxr_keyword">int</strong> index = 0;
+<a class="jxr_linenumber" name="L421" href="#L421">421</a>             <strong class="jxr_keyword">for</strong> (EquationsMapper secondary : expandable.getSecondaryMappers()) {
+<a class="jxr_linenumber" name="L422" href="#L422">422</a>                 secondary.insertEquationData(interpolator.getInterpolatedSecondaryState(index++),
+<a class="jxr_linenumber" name="L423" href="#L423">423</a>                                              currentY);
+<a class="jxr_linenumber" name="L424" href="#L424">424</a>             }
+<a class="jxr_linenumber" name="L425" href="#L425">425</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> EventState state : eventsStates) {
+<a class="jxr_linenumber" name="L426" href="#L426">426</a>                 state.stepAccepted(currentT, currentY);
+<a class="jxr_linenumber" name="L427" href="#L427">427</a>                 isLastStep = isLastStep || state.stop();
+<a class="jxr_linenumber" name="L428" href="#L428">428</a>             }
+<a class="jxr_linenumber" name="L429" href="#L429">429</a>             isLastStep = isLastStep || Precision.equals(currentT, tEnd, 1);
+<a class="jxr_linenumber" name="L430" href="#L430">430</a> 
+<a class="jxr_linenumber" name="L431" href="#L431">431</a>             <em class="jxr_comment">// handle the remaining part of the step, after all events if any</em>
+<a class="jxr_linenumber" name="L432" href="#L432">432</a>             <strong class="jxr_keyword">for</strong> (StepHandler handler : stepHandlers) {
+<a class="jxr_linenumber" name="L433" href="#L433">433</a>                 handler.handleStep(interpolator, isLastStep);
+<a class="jxr_linenumber" name="L434" href="#L434">434</a>             }
+<a class="jxr_linenumber" name="L435" href="#L435">435</a> 
+<a class="jxr_linenumber" name="L436" href="#L436">436</a>             <strong class="jxr_keyword">return</strong> currentT;
+<a class="jxr_linenumber" name="L437" href="#L437">437</a> 
+<a class="jxr_linenumber" name="L438" href="#L438">438</a>     }
+<a class="jxr_linenumber" name="L439" href="#L439">439</a> 
+<a class="jxr_linenumber" name="L440" href="#L440">440</a>     <em class="jxr_javadoccomment">/** Check the integration span.</em>
+<a class="jxr_linenumber" name="L441" href="#L441">441</a> <em class="jxr_javadoccomment">     * @param equations set of differential equations</em>
+<a class="jxr_linenumber" name="L442" href="#L442">442</a> <em class="jxr_javadoccomment">     * @param t target time for the integration</em>
+<a class="jxr_linenumber" name="L443" href="#L443">443</a> <em class="jxr_javadoccomment">     * @exception NumberIsTooSmallException if integration span is too small</em>
+<a class="jxr_linenumber" name="L444" href="#L444">444</a> <em class="jxr_javadoccomment">     * @exception DimensionMismatchException if adaptive step size integrators</em>
+<a class="jxr_linenumber" name="L445" href="#L445">445</a> <em class="jxr_javadoccomment">     * tolerance arrays dimensions are not compatible with equations settings</em>
+<a class="jxr_linenumber" name="L446" href="#L446">446</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L447" href="#L447">447</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">void</strong> sanityChecks(<strong class="jxr_keyword">final</strong> <a href="../../../../../org/apache/commons/math3/ode/ExpandableStatefulODE.html">ExpandableStatefulODE</a> equations, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t)
+<a class="jxr_linenumber" name="L448" href="#L448">448</a>         <strong class="jxr_keyword">throws</strong> NumberIsTooSmallException, <a href="../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html">DimensionMismatchException</a> {
+<a class="jxr_linenumber" name="L449" href="#L449">449</a> 
+<a class="jxr_linenumber" name="L450" href="#L450">450</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> threshold = 1000 * FastMath.ulp(FastMath.max(FastMath.abs(equations.getTime()),
+<a class="jxr_linenumber" name="L451" href="#L451">451</a>                                                                   FastMath.abs(t)));
+<a class="jxr_linenumber" name="L452" href="#L452">452</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> dt = FastMath.abs(equations.getTime() - t);
+<a class="jxr_linenumber" name="L453" href="#L453">453</a>         <strong class="jxr_keyword">if</strong> (dt &lt;= threshold) {
+<a class="jxr_linenumber" name="L454" href="#L454">454</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/commons/math3/exception/NumberIsTooSmallException.html">NumberIsTooSmallException</a>(LocalizedFormats.TOO_SMALL_INTEGRATION_INTERVAL,
+<a class="jxr_linenumber" name="L455" href="#L455">455</a>                                                 dt, threshold, false);
+<a class="jxr_linenumber" name="L456" href="#L456">456</a>         }
+<a class="jxr_linenumber" name="L457" href="#L457">457</a> 
+<a class="jxr_linenumber" name="L458" href="#L458">458</a>     }
+<a class="jxr_linenumber" name="L459" href="#L459">459</a> 
+<a class="jxr_linenumber" name="L460" href="#L460">460</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2003&#x2013;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/UnknownParameterException.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/UnknownParameterException.html (original)
+++ websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/UnknownParameterException.html Mon Jul 27 19:40:45 2015
@@ -46,7 +46,7 @@
 <a class="jxr_linenumber" name="L38" href="#L38">38</a>  <em class="jxr_javadoccomment">     * @param name parameter name.</em>
 <a class="jxr_linenumber" name="L39" href="#L39">39</a>  <em class="jxr_javadoccomment">     */</em>
 <a class="jxr_linenumber" name="L40" href="#L40">40</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/commons/math3/ode/UnknownParameterException.html">UnknownParameterException</a>(<strong class="jxr_keyword">final</strong> String name) {
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>          <strong class="jxr_keyword">super</strong>(LocalizedFormats.UNKNOWN_PARAMETER);
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>          <strong class="jxr_keyword">super</strong>(LocalizedFormats.UNKNOWN_PARAMETER, name);
 <a class="jxr_linenumber" name="L42" href="#L42">42</a>          <strong class="jxr_keyword">this</strong>.name = name;
 <a class="jxr_linenumber" name="L43" href="#L43">43</a>      }
 <a class="jxr_linenumber" name="L44" href="#L44">44</a>  

Modified: websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/events/EventState.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/events/EventState.html (original)
+++ websites/production/commons/content/proper/commons-math/xref/org/apache/commons/math3/ode/events/EventState.html Mon Jul 27 19:40:45 2015
@@ -304,127 +304,138 @@
 <a class="jxr_linenumber" name="L296" href="#L296">296</a>                             ta = forward ? ta + convergence : ta - convergence;
 <a class="jxr_linenumber" name="L297" href="#L297">297</a>                             ga = f.value(ta);
 <a class="jxr_linenumber" name="L298" href="#L298">298</a>                         } <strong class="jxr_keyword">while</strong> ((g0Positive ^ (ga &gt;= 0)) &amp;&amp; (forward ^ (ta &gt;= tb)));
-<a class="jxr_linenumber" name="L299" href="#L299">299</a>                         --i;
-<a class="jxr_linenumber" name="L300" href="#L300">300</a>                     } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (Double.isNaN(previousEventTime) ||
-<a class="jxr_linenumber" name="L301" href="#L301">301</a>                                (FastMath.abs(previousEventTime - root) &gt; convergence)) {
-<a class="jxr_linenumber" name="L302" href="#L302">302</a>                         pendingEventTime = root;
-<a class="jxr_linenumber" name="L303" href="#L303">303</a>                         pendingEvent = <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L304" href="#L304">304</a>                         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L305" href="#L305">305</a>                     } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L306" href="#L306">306</a>                         <em class="jxr_comment">// no sign change: there is no event for now</em>
-<a class="jxr_linenumber" name="L307" href="#L307">307</a>                         ta = tb;
-<a class="jxr_linenumber" name="L308" href="#L308">308</a>                         ga = gb;
-<a class="jxr_linenumber" name="L309" href="#L309">309</a>                     }
-<a class="jxr_linenumber" name="L310" href="#L310">310</a> 
-<a class="jxr_linenumber" name="L311" href="#L311">311</a>                 } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L312" href="#L312">312</a>                     <em class="jxr_comment">// no sign change: there is no event for now</em>
-<a class="jxr_linenumber" name="L313" href="#L313">313</a>                     ta = tb;
-<a class="jxr_linenumber" name="L314" href="#L314">314</a>                     ga = gb;
-<a class="jxr_linenumber" name="L315" href="#L315">315</a>                 }
-<a class="jxr_linenumber" name="L316" href="#L316">316</a> 
-<a class="jxr_linenumber" name="L317" href="#L317">317</a>             }
-<a class="jxr_linenumber" name="L318" href="#L318">318</a> 
-<a class="jxr_linenumber" name="L319" href="#L319">319</a>             <em class="jxr_comment">// no event during the whole step</em>
-<a class="jxr_linenumber" name="L320" href="#L320">320</a>             pendingEvent     = false;
-<a class="jxr_linenumber" name="L321" href="#L321">321</a>             pendingEventTime = Double.NaN;
-<a class="jxr_linenumber" name="L322" href="#L322">322</a>             <strong class="jxr_keyword">return</strong> false;
-<a class="jxr_linenumber" name="L323" href="#L323">323</a> 
-<a class="jxr_linenumber" name="L324" href="#L324">324</a>         } <strong class="jxr_keyword">catch</strong> (LocalMaxCountExceededException lmcee) {
-<a class="jxr_linenumber" name="L325" href="#L325">325</a>             <strong class="jxr_keyword">throw</strong> lmcee.getException();
-<a class="jxr_linenumber" name="L326" href="#L326">326</a>         }
+<a class="jxr_linenumber" name="L299" href="#L299">299</a> 
+<a class="jxr_linenumber" name="L300" href="#L300">300</a>                         <strong class="jxr_keyword">if</strong> (forward ^ (ta &gt;= tb)) {
+<a class="jxr_linenumber" name="L301" href="#L301">301</a>                             <em class="jxr_comment">// we were able to skip this spurious root</em>
+<a class="jxr_linenumber" name="L302" href="#L302">302</a>                             --i;
+<a class="jxr_linenumber" name="L303" href="#L303">303</a>                         } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L304" href="#L304">304</a>                             <em class="jxr_comment">// we can't avoid this root before the end of the step,</em>
+<a class="jxr_linenumber" name="L305" href="#L305">305</a>                             <em class="jxr_comment">// we have to handle it despite it is close to the former one</em>
+<a class="jxr_linenumber" name="L306" href="#L306">306</a>                             <em class="jxr_comment">// maybe we have two very close roots</em>
+<a class="jxr_linenumber" name="L307" href="#L307">307</a>                             pendingEventTime = root;
+<a class="jxr_linenumber" name="L308" href="#L308">308</a>                             pendingEvent = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L309" href="#L309">309</a>                             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L310" href="#L310">310</a>                         }
+<a class="jxr_linenumber" name="L311" href="#L311">311</a>                     } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (Double.isNaN(previousEventTime) ||
+<a class="jxr_linenumber" name="L312" href="#L312">312</a>                                (FastMath.abs(previousEventTime - root) &gt; convergence)) {
+<a class="jxr_linenumber" name="L313" href="#L313">313</a>                         pendingEventTime = root;
+<a class="jxr_linenumber" name="L314" href="#L314">314</a>                         pendingEvent = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L315" href="#L315">315</a>                         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L316" href="#L316">316</a>                     } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L317" href="#L317">317</a>                         <em class="jxr_comment">// no sign change: there is no event for now</em>
+<a class="jxr_linenumber" name="L318" href="#L318">318</a>                         ta = tb;
+<a class="jxr_linenumber" name="L319" href="#L319">319</a>                         ga = gb;
+<a class="jxr_linenumber" name="L320" href="#L320">320</a>                     }
+<a class="jxr_linenumber" name="L321" href="#L321">321</a> 
+<a class="jxr_linenumber" name="L322" href="#L322">322</a>                 } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L323" href="#L323">323</a>                     <em class="jxr_comment">// no sign change: there is no event for now</em>
+<a class="jxr_linenumber" name="L324" href="#L324">324</a>                     ta = tb;
+<a class="jxr_linenumber" name="L325" href="#L325">325</a>                     ga = gb;
+<a class="jxr_linenumber" name="L326" href="#L326">326</a>                 }
 <a class="jxr_linenumber" name="L327" href="#L327">327</a> 
-<a class="jxr_linenumber" name="L328" href="#L328">328</a>     }
+<a class="jxr_linenumber" name="L328" href="#L328">328</a>             }
 <a class="jxr_linenumber" name="L329" href="#L329">329</a> 
-<a class="jxr_linenumber" name="L330" href="#L330">330</a>     <em class="jxr_javadoccomment">/** Get the occurrence time of the event triggered in the current step.</em>
-<a class="jxr_linenumber" name="L331" href="#L331">331</a> <em class="jxr_javadoccomment">     * @return occurrence time of the event triggered in the current</em>
-<a class="jxr_linenumber" name="L332" href="#L332">332</a> <em class="jxr_javadoccomment">     * step or infinity if no events are triggered</em>
-<a class="jxr_linenumber" name="L333" href="#L333">333</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L334" href="#L334">334</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getEventTime() {
-<a class="jxr_linenumber" name="L335" href="#L335">335</a>         <strong class="jxr_keyword">return</strong> pendingEvent ?
-<a class="jxr_linenumber" name="L336" href="#L336">336</a>                pendingEventTime :
-<a class="jxr_linenumber" name="L337" href="#L337">337</a>                (forward ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY);
-<a class="jxr_linenumber" name="L338" href="#L338">338</a>     }
-<a class="jxr_linenumber" name="L339" href="#L339">339</a> 
-<a class="jxr_linenumber" name="L340" href="#L340">340</a>     <em class="jxr_javadoccomment">/** Acknowledge the fact the step has been accepted by the integrator.</em>
-<a class="jxr_linenumber" name="L341" href="#L341">341</a> <em class="jxr_javadoccomment">     * @param t value of the independent &lt;i&gt;time&lt;/i&gt; variable at the</em>
-<a class="jxr_linenumber" name="L342" href="#L342">342</a> <em class="jxr_javadoccomment">     * end of the step</em>
-<a class="jxr_linenumber" name="L343" href="#L343">343</a> <em class="jxr_javadoccomment">     * @param y array containing the current value of the state vector</em>
-<a class="jxr_linenumber" name="L344" href="#L344">344</a> <em class="jxr_javadoccomment">     * at the end of the step</em>
-<a class="jxr_linenumber" name="L345" href="#L345">345</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L346" href="#L346">346</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> stepAccepted(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y) {
-<a class="jxr_linenumber" name="L347" href="#L347">347</a> 
-<a class="jxr_linenumber" name="L348" href="#L348">348</a>         t0 = t;
-<a class="jxr_linenumber" name="L349" href="#L349">349</a>         g0 = handler.g(t, y);
+<a class="jxr_linenumber" name="L330" href="#L330">330</a>             <em class="jxr_comment">// no event during the whole step</em>
+<a class="jxr_linenumber" name="L331" href="#L331">331</a>             pendingEvent     = false;
+<a class="jxr_linenumber" name="L332" href="#L332">332</a>             pendingEventTime = Double.NaN;
+<a class="jxr_linenumber" name="L333" href="#L333">333</a>             <strong class="jxr_keyword">return</strong> false;
+<a class="jxr_linenumber" name="L334" href="#L334">334</a> 
+<a class="jxr_linenumber" name="L335" href="#L335">335</a>         } <strong class="jxr_keyword">catch</strong> (LocalMaxCountExceededException lmcee) {
+<a class="jxr_linenumber" name="L336" href="#L336">336</a>             <strong class="jxr_keyword">throw</strong> lmcee.getException();
+<a class="jxr_linenumber" name="L337" href="#L337">337</a>         }
+<a class="jxr_linenumber" name="L338" href="#L338">338</a> 
+<a class="jxr_linenumber" name="L339" href="#L339">339</a>     }
+<a class="jxr_linenumber" name="L340" href="#L340">340</a> 
+<a class="jxr_linenumber" name="L341" href="#L341">341</a>     <em class="jxr_javadoccomment">/** Get the occurrence time of the event triggered in the current step.</em>
+<a class="jxr_linenumber" name="L342" href="#L342">342</a> <em class="jxr_javadoccomment">     * @return occurrence time of the event triggered in the current</em>
+<a class="jxr_linenumber" name="L343" href="#L343">343</a> <em class="jxr_javadoccomment">     * step or infinity if no events are triggered</em>
+<a class="jxr_linenumber" name="L344" href="#L344">344</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L345" href="#L345">345</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> getEventTime() {
+<a class="jxr_linenumber" name="L346" href="#L346">346</a>         <strong class="jxr_keyword">return</strong> pendingEvent ?
+<a class="jxr_linenumber" name="L347" href="#L347">347</a>                pendingEventTime :
+<a class="jxr_linenumber" name="L348" href="#L348">348</a>                (forward ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY);
+<a class="jxr_linenumber" name="L349" href="#L349">349</a>     }
 <a class="jxr_linenumber" name="L350" href="#L350">350</a> 
-<a class="jxr_linenumber" name="L351" href="#L351">351</a>         <strong class="jxr_keyword">if</strong> (pendingEvent &amp;&amp; (FastMath.abs(pendingEventTime - t) &lt;= convergence)) {
-<a class="jxr_linenumber" name="L352" href="#L352">352</a>             <em class="jxr_comment">// force the sign to its value "just after the event"</em>
-<a class="jxr_linenumber" name="L353" href="#L353">353</a>             previousEventTime = t;
-<a class="jxr_linenumber" name="L354" href="#L354">354</a>             g0Positive        = increasing;
-<a class="jxr_linenumber" name="L355" href="#L355">355</a>             nextAction        = handler.eventOccurred(t, y, !(increasing ^ forward));
-<a class="jxr_linenumber" name="L356" href="#L356">356</a>         } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L357" href="#L357">357</a>             g0Positive = g0 &gt;= 0;
-<a class="jxr_linenumber" name="L358" href="#L358">358</a>             nextAction = EventHandler.Action.CONTINUE;
-<a class="jxr_linenumber" name="L359" href="#L359">359</a>         }
-<a class="jxr_linenumber" name="L360" href="#L360">360</a>     }
+<a class="jxr_linenumber" name="L351" href="#L351">351</a>     <em class="jxr_javadoccomment">/** Acknowledge the fact the step has been accepted by the integrator.</em>
+<a class="jxr_linenumber" name="L352" href="#L352">352</a> <em class="jxr_javadoccomment">     * @param t value of the independent &lt;i&gt;time&lt;/i&gt; variable at the</em>
+<a class="jxr_linenumber" name="L353" href="#L353">353</a> <em class="jxr_javadoccomment">     * end of the step</em>
+<a class="jxr_linenumber" name="L354" href="#L354">354</a> <em class="jxr_javadoccomment">     * @param y array containing the current value of the state vector</em>
+<a class="jxr_linenumber" name="L355" href="#L355">355</a> <em class="jxr_javadoccomment">     * at the end of the step</em>
+<a class="jxr_linenumber" name="L356" href="#L356">356</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L357" href="#L357">357</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> stepAccepted(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y) {
+<a class="jxr_linenumber" name="L358" href="#L358">358</a> 
+<a class="jxr_linenumber" name="L359" href="#L359">359</a>         t0 = t;
+<a class="jxr_linenumber" name="L360" href="#L360">360</a>         g0 = handler.g(t, y);
 <a class="jxr_linenumber" name="L361" href="#L361">361</a> 
-<a class="jxr_linenumber" name="L362" href="#L362">362</a>     <em class="jxr_javadoccomment">/** Check if the integration should be stopped at the end of the</em>
-<a class="jxr_linenumber" name="L363" href="#L363">363</a> <em class="jxr_javadoccomment">     * current step.</em>
-<a class="jxr_linenumber" name="L364" href="#L364">364</a> <em class="jxr_javadoccomment">     * @return true if the integration should be stopped</em>
-<a class="jxr_linenumber" name="L365" href="#L365">365</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L366" href="#L366">366</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> stop() {
-<a class="jxr_linenumber" name="L367" href="#L367">367</a>         <strong class="jxr_keyword">return</strong> nextAction == EventHandler.Action.STOP;
-<a class="jxr_linenumber" name="L368" href="#L368">368</a>     }
-<a class="jxr_linenumber" name="L369" href="#L369">369</a> 
-<a class="jxr_linenumber" name="L370" href="#L370">370</a>     <em class="jxr_javadoccomment">/** Let the event handler reset the state if it wants.</em>
-<a class="jxr_linenumber" name="L371" href="#L371">371</a> <em class="jxr_javadoccomment">     * @param t value of the independent &lt;i&gt;time&lt;/i&gt; variable at the</em>
-<a class="jxr_linenumber" name="L372" href="#L372">372</a> <em class="jxr_javadoccomment">     * beginning of the next step</em>
-<a class="jxr_linenumber" name="L373" href="#L373">373</a> <em class="jxr_javadoccomment">     * @param y array were to put the desired state vector at the beginning</em>
-<a class="jxr_linenumber" name="L374" href="#L374">374</a> <em class="jxr_javadoccomment">     * of the next step</em>
-<a class="jxr_linenumber" name="L375" href="#L375">375</a> <em class="jxr_javadoccomment">     * @return true if the integrator should reset the derivatives too</em>
+<a class="jxr_linenumber" name="L362" href="#L362">362</a>         <strong class="jxr_keyword">if</strong> (pendingEvent &amp;&amp; (FastMath.abs(pendingEventTime - t) &lt;= convergence)) {
+<a class="jxr_linenumber" name="L363" href="#L363">363</a>             <em class="jxr_comment">// force the sign to its value "just after the event"</em>
+<a class="jxr_linenumber" name="L364" href="#L364">364</a>             previousEventTime = t;
+<a class="jxr_linenumber" name="L365" href="#L365">365</a>             g0Positive        = increasing;
+<a class="jxr_linenumber" name="L366" href="#L366">366</a>             nextAction        = handler.eventOccurred(t, y, !(increasing ^ forward));
+<a class="jxr_linenumber" name="L367" href="#L367">367</a>         } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L368" href="#L368">368</a>             g0Positive = g0 &gt;= 0;
+<a class="jxr_linenumber" name="L369" href="#L369">369</a>             nextAction = EventHandler.Action.CONTINUE;
+<a class="jxr_linenumber" name="L370" href="#L370">370</a>         }
+<a class="jxr_linenumber" name="L371" href="#L371">371</a>     }
+<a class="jxr_linenumber" name="L372" href="#L372">372</a> 
+<a class="jxr_linenumber" name="L373" href="#L373">373</a>     <em class="jxr_javadoccomment">/** Check if the integration should be stopped at the end of the</em>
+<a class="jxr_linenumber" name="L374" href="#L374">374</a> <em class="jxr_javadoccomment">     * current step.</em>
+<a class="jxr_linenumber" name="L375" href="#L375">375</a> <em class="jxr_javadoccomment">     * @return true if the integration should be stopped</em>
 <a class="jxr_linenumber" name="L376" href="#L376">376</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L377" href="#L377">377</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> reset(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y) {
-<a class="jxr_linenumber" name="L378" href="#L378">378</a> 
-<a class="jxr_linenumber" name="L379" href="#L379">379</a>         <strong class="jxr_keyword">if</strong> (!(pendingEvent &amp;&amp; (FastMath.abs(pendingEventTime - t) &lt;= convergence))) {
-<a class="jxr_linenumber" name="L380" href="#L380">380</a>             <strong class="jxr_keyword">return</strong> false;
-<a class="jxr_linenumber" name="L381" href="#L381">381</a>         }
-<a class="jxr_linenumber" name="L382" href="#L382">382</a> 
-<a class="jxr_linenumber" name="L383" href="#L383">383</a>         <strong class="jxr_keyword">if</strong> (nextAction == EventHandler.Action.RESET_STATE) {
-<a class="jxr_linenumber" name="L384" href="#L384">384</a>             handler.resetState(t, y);
-<a class="jxr_linenumber" name="L385" href="#L385">385</a>         }
-<a class="jxr_linenumber" name="L386" href="#L386">386</a>         pendingEvent      = false;
-<a class="jxr_linenumber" name="L387" href="#L387">387</a>         pendingEventTime  = Double.NaN;
-<a class="jxr_linenumber" name="L388" href="#L388">388</a> 
-<a class="jxr_linenumber" name="L389" href="#L389">389</a>         <strong class="jxr_keyword">return</strong> (nextAction == EventHandler.Action.RESET_STATE) ||
-<a class="jxr_linenumber" name="L390" href="#L390">390</a>                (nextAction == EventHandler.Action.RESET_DERIVATIVES);
-<a class="jxr_linenumber" name="L391" href="#L391">391</a> 
-<a class="jxr_linenumber" name="L392" href="#L392">392</a>     }
+<a class="jxr_linenumber" name="L377" href="#L377">377</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> stop() {
+<a class="jxr_linenumber" name="L378" href="#L378">378</a>         <strong class="jxr_keyword">return</strong> nextAction == EventHandler.Action.STOP;
+<a class="jxr_linenumber" name="L379" href="#L379">379</a>     }
+<a class="jxr_linenumber" name="L380" href="#L380">380</a> 
+<a class="jxr_linenumber" name="L381" href="#L381">381</a>     <em class="jxr_javadoccomment">/** Let the event handler reset the state if it wants.</em>
+<a class="jxr_linenumber" name="L382" href="#L382">382</a> <em class="jxr_javadoccomment">     * @param t value of the independent &lt;i&gt;time&lt;/i&gt; variable at the</em>
+<a class="jxr_linenumber" name="L383" href="#L383">383</a> <em class="jxr_javadoccomment">     * beginning of the next step</em>
+<a class="jxr_linenumber" name="L384" href="#L384">384</a> <em class="jxr_javadoccomment">     * @param y array were to put the desired state vector at the beginning</em>
+<a class="jxr_linenumber" name="L385" href="#L385">385</a> <em class="jxr_javadoccomment">     * of the next step</em>
+<a class="jxr_linenumber" name="L386" href="#L386">386</a> <em class="jxr_javadoccomment">     * @return true if the integrator should reset the derivatives too</em>
+<a class="jxr_linenumber" name="L387" href="#L387">387</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L388" href="#L388">388</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> reset(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> t, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] y) {
+<a class="jxr_linenumber" name="L389" href="#L389">389</a> 
+<a class="jxr_linenumber" name="L390" href="#L390">390</a>         <strong class="jxr_keyword">if</strong> (!(pendingEvent &amp;&amp; (FastMath.abs(pendingEventTime - t) &lt;= convergence))) {
+<a class="jxr_linenumber" name="L391" href="#L391">391</a>             <strong class="jxr_keyword">return</strong> false;
+<a class="jxr_linenumber" name="L392" href="#L392">392</a>         }
 <a class="jxr_linenumber" name="L393" href="#L393">393</a> 
-<a class="jxr_linenumber" name="L394" href="#L394">394</a>     <em class="jxr_javadoccomment">/** Local wrapper to propagate exceptions. */</em>
-<a class="jxr_linenumber" name="L395" href="#L395">395</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/math3/ode/events/EventState.html">LocalMaxCountExceededException</a> <strong class="jxr_keyword">extends</strong> RuntimeException {
-<a class="jxr_linenumber" name="L396" href="#L396">396</a> 
-<a class="jxr_linenumber" name="L397" href="#L397">397</a>         <em class="jxr_javadoccomment">/** Serializable UID. */</em>
-<a class="jxr_linenumber" name="L398" href="#L398">398</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> serialVersionUID = 20120901L;
+<a class="jxr_linenumber" name="L394" href="#L394">394</a>         <strong class="jxr_keyword">if</strong> (nextAction == EventHandler.Action.RESET_STATE) {
+<a class="jxr_linenumber" name="L395" href="#L395">395</a>             handler.resetState(t, y);
+<a class="jxr_linenumber" name="L396" href="#L396">396</a>         }
+<a class="jxr_linenumber" name="L397" href="#L397">397</a>         pendingEvent      = false;
+<a class="jxr_linenumber" name="L398" href="#L398">398</a>         pendingEventTime  = Double.NaN;
 <a class="jxr_linenumber" name="L399" href="#L399">399</a> 
-<a class="jxr_linenumber" name="L400" href="#L400">400</a>         <em class="jxr_javadoccomment">/** Wrapped exception. */</em>
-<a class="jxr_linenumber" name="L401" href="#L401">401</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/exception/MaxCountExceededException.html">MaxCountExceededException</a> wrapped;
+<a class="jxr_linenumber" name="L400" href="#L400">400</a>         <strong class="jxr_keyword">return</strong> (nextAction == EventHandler.Action.RESET_STATE) ||
+<a class="jxr_linenumber" name="L401" href="#L401">401</a>                (nextAction == EventHandler.Action.RESET_DERIVATIVES);
 <a class="jxr_linenumber" name="L402" href="#L402">402</a> 
-<a class="jxr_linenumber" name="L403" href="#L403">403</a>         <em class="jxr_javadoccomment">/** Simple constructor.</em>
-<a class="jxr_linenumber" name="L404" href="#L404">404</a> <em class="jxr_javadoccomment">         * @param exception exception to wrap</em>
-<a class="jxr_linenumber" name="L405" href="#L405">405</a> <em class="jxr_javadoccomment">         */</em>
-<a class="jxr_linenumber" name="L406" href="#L406">406</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/math3/ode/events/EventState.html">LocalMaxCountExceededException</a>(<strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/exception/MaxCountExceededException.html">MaxCountExceededException</a> exception) {
-<a class="jxr_linenumber" name="L407" href="#L407">407</a>             wrapped = exception;
-<a class="jxr_linenumber" name="L408" href="#L408">408</a>         }
-<a class="jxr_linenumber" name="L409" href="#L409">409</a> 
-<a class="jxr_linenumber" name="L410" href="#L410">410</a>         <em class="jxr_javadoccomment">/** Get the wrapped exception.</em>
-<a class="jxr_linenumber" name="L411" href="#L411">411</a> <em class="jxr_javadoccomment">         * @return wrapped exception</em>
-<a class="jxr_linenumber" name="L412" href="#L412">412</a> <em class="jxr_javadoccomment">         */</em>
-<a class="jxr_linenumber" name="L413" href="#L413">413</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/math3/exception/MaxCountExceededException.html">MaxCountExceededException</a> getException() {
-<a class="jxr_linenumber" name="L414" href="#L414">414</a>             <strong class="jxr_keyword">return</strong> wrapped;
-<a class="jxr_linenumber" name="L415" href="#L415">415</a>         }
-<a class="jxr_linenumber" name="L416" href="#L416">416</a> 
-<a class="jxr_linenumber" name="L417" href="#L417">417</a>     }
-<a class="jxr_linenumber" name="L418" href="#L418">418</a> 
-<a class="jxr_linenumber" name="L419" href="#L419">419</a> }
+<a class="jxr_linenumber" name="L403" href="#L403">403</a>     }
+<a class="jxr_linenumber" name="L404" href="#L404">404</a> 
+<a class="jxr_linenumber" name="L405" href="#L405">405</a>     <em class="jxr_javadoccomment">/** Local wrapper to propagate exceptions. */</em>
+<a class="jxr_linenumber" name="L406" href="#L406">406</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/math3/ode/events/EventState.html">LocalMaxCountExceededException</a> <strong class="jxr_keyword">extends</strong> RuntimeException {
+<a class="jxr_linenumber" name="L407" href="#L407">407</a> 
+<a class="jxr_linenumber" name="L408" href="#L408">408</a>         <em class="jxr_javadoccomment">/** Serializable UID. */</em>
+<a class="jxr_linenumber" name="L409" href="#L409">409</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> serialVersionUID = 20120901L;
+<a class="jxr_linenumber" name="L410" href="#L410">410</a> 
+<a class="jxr_linenumber" name="L411" href="#L411">411</a>         <em class="jxr_javadoccomment">/** Wrapped exception. */</em>
+<a class="jxr_linenumber" name="L412" href="#L412">412</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/exception/MaxCountExceededException.html">MaxCountExceededException</a> wrapped;
+<a class="jxr_linenumber" name="L413" href="#L413">413</a> 
+<a class="jxr_linenumber" name="L414" href="#L414">414</a>         <em class="jxr_javadoccomment">/** Simple constructor.</em>
+<a class="jxr_linenumber" name="L415" href="#L415">415</a> <em class="jxr_javadoccomment">         * @param exception exception to wrap</em>
+<a class="jxr_linenumber" name="L416" href="#L416">416</a> <em class="jxr_javadoccomment">         */</em>
+<a class="jxr_linenumber" name="L417" href="#L417">417</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/math3/ode/events/EventState.html">LocalMaxCountExceededException</a>(<strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/exception/MaxCountExceededException.html">MaxCountExceededException</a> exception) {
+<a class="jxr_linenumber" name="L418" href="#L418">418</a>             wrapped = exception;
+<a class="jxr_linenumber" name="L419" href="#L419">419</a>         }
+<a class="jxr_linenumber" name="L420" href="#L420">420</a> 
+<a class="jxr_linenumber" name="L421" href="#L421">421</a>         <em class="jxr_javadoccomment">/** Get the wrapped exception.</em>
+<a class="jxr_linenumber" name="L422" href="#L422">422</a> <em class="jxr_javadoccomment">         * @return wrapped exception</em>
+<a class="jxr_linenumber" name="L423" href="#L423">423</a> <em class="jxr_javadoccomment">         */</em>
+<a class="jxr_linenumber" name="L424" href="#L424">424</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/math3/exception/MaxCountExceededException.html">MaxCountExceededException</a> getException() {
+<a class="jxr_linenumber" name="L425" href="#L425">425</a>             <strong class="jxr_keyword">return</strong> wrapped;
+<a class="jxr_linenumber" name="L426" href="#L426">426</a>         }
+<a class="jxr_linenumber" name="L427" href="#L427">427</a> 
+<a class="jxr_linenumber" name="L428" href="#L428">428</a>     }
+<a class="jxr_linenumber" name="L429" href="#L429">429</a> 
+<a class="jxr_linenumber" name="L430" href="#L430">430</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2003&#x2013;2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>



Mime
View raw message