commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r674814 - in /commons/proper/math/branches/MATH_2_0/src: java/org/apache/commons/math/ode/ java/org/apache/commons/math/ode/nonstiff/ site/xdoc/ test/org/apache/commons/math/ode/ test/org/apache/commons/math/ode/nonstiff/ test/org/apache/co...
Date Tue, 08 Jul 2008 13:27:01 GMT
Author: luc
Date: Tue Jul  8 06:26:59 2008
New Revision: 674814

URL: http://svn.apache.org/viewvc?rev=674814&view=rev
Log:
The ODE integrators now support several step handlers at once, instead of just one.
This is more consistent with event handlers management.
The setStepHandler method has therefore been replaced by addStephandler, the
getStepHandler method has been replaced by getStepHandlers which returns a Collection
and a clearStepHandlers method has been added.

Modified:
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/AbstractIntegrator.java
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
    commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java
    commons/proper/math/branches/MATH_2_0/src/site/xdoc/changes.xml
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/ContinuousOutputModelTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointIntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolatorTest.java
    commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/sampling/StepNormalizerTest.java

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/AbstractIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/AbstractIntegrator.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/AbstractIntegrator.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/AbstractIntegrator.java Tue Jul  8 06:26:59 2008
@@ -17,11 +17,12 @@
 
 package org.apache.commons.math.ode;
 
+import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 
 import org.apache.commons.math.ode.events.CombinedEventsManager;
 import org.apache.commons.math.ode.events.EventHandler;
-import org.apache.commons.math.ode.sampling.DummyStepHandler;
 import org.apache.commons.math.ode.sampling.StepHandler;
 
 /**
@@ -35,7 +36,7 @@
     private final String name;
 
     /** Step handler. */
-    protected StepHandler handler;
+    protected Collection<StepHandler> stepHandlers;
 
     /** Current step start time. */
     protected double stepStart;
@@ -51,7 +52,7 @@
      */
     public AbstractIntegrator(final String name) {
         this.name = name;
-        handler = DummyStepHandler.getInstance();
+        stepHandlers = new ArrayList<StepHandler>();
         stepStart = Double.NaN;
         stepSize  = Double.NaN;
         eventsHandlersManager = new CombinedEventsManager();
@@ -63,13 +64,18 @@
     }
 
     /** {@inheritDoc} */
-    public void setStepHandler(final StepHandler handler) {
-        this.handler = handler;
+    public void addStepHandler(final StepHandler handler) {
+        stepHandlers.add(handler);
     }
 
     /** {@inheritDoc} */
-    public StepHandler getStepHandler() {
-        return handler;
+    public Collection<StepHandler> getStepHandlers() {
+        return Collections.unmodifiableCollection(stepHandlers);
+    }
+
+    /** {@inheritDoc} */
+    public void clearStepHandlers() {
+        stepHandlers.clear();
     }
 
     /** {@inheritDoc} */
@@ -82,15 +88,27 @@
     }
 
     /** {@inheritDoc} */
-    public Collection<EventHandler> getEventsHandlers() {
+    public Collection<EventHandler> getEventHandlers() {
         return eventsHandlersManager.getEventsHandlers();
     }
 
     /** {@inheritDoc} */
-    public void clearEventsHandlers() {
+    public void clearEventHandlers() {
         eventsHandlersManager.clearEventsHandlers();
     }
 
+    /** Check if one of the step handlers requires dense output.
+     * @return true if one of the step handlers requires dense output
+     */
+    protected boolean requiresDenseOutput() {
+        for (StepHandler handler : stepHandlers) {
+            if (handler.requiresDenseOutput()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     /** {@inheritDoc} */
     public double getCurrentStepStart() {
         return stepStart;

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/FirstOrderIntegrator.java Tue Jul  8 06:26:59 2008
@@ -45,17 +45,30 @@
    */
   public String getName();
 
-  /** Set the step handler for this integrator.
-   * The handler will be called by the integrator for each accepted
-   * step.
+  /** Add a step handler to this integrator.
+   * <p>The handler will be called by the integrator for each accepted
+   * step.</p>
    * @param handler handler for the accepted steps
+   * @see #getStepHandlers()
+   * @see #clearStepHandlers()
+   * @since 2.0
    */
-  public void setStepHandler (StepHandler handler);
+  public void addStepHandler (StepHandler handler);
 
-  /** Get the step handler for this integrator.
-   * @return the step handler for this integrator
+  /** Get all the step handlers that have been added to the integrator.
+   * @return an unmodifiable collection of the added events handlers
+   * @see #addStepHandler(StepHandler)
+   * @see #clearStepHandlers()
+   * @since 2.0
+   */
+  public Collection<StepHandler> getStepHandlers();
+
+  /** Remove all the step handlers that have been added to the integrator.
+   * @see #addStepHandler(StepHandler)
+   * @see #getStepHandlers()
+   * @since 2.0
    */
-  public StepHandler getStepHandler();
+  public void clearStepHandlers();
 
   /** Add an event handler to the integrator.
    * @param handler event handler
@@ -65,24 +78,24 @@
    * @param convergence convergence threshold in the event time search
    * @param maxIterationCount upper limit of the iteration count in
    * the event time search
-   * @see #getEventsHandlers()
-   * @see #clearEventsHandlers()
+   * @see #getEventHandlers()
+   * @see #clearEventHandlers()
    */
   public void addEventHandler(EventHandler handler, double maxCheckInterval,
                               double convergence, int maxIterationCount);
 
-  /** Get all the events handlers that have been added to the integrator.
+  /** Get all the event handlers that have been added to the integrator.
    * @return an unmodifiable collection of the added events handlers
    * @see #addEventHandler(EventHandler, double, double, int)
-   * @see #clearEventsHandlers()
+   * @see #clearEventHandlers()
    */
-  public Collection<EventHandler> getEventsHandlers();
+  public Collection<EventHandler> getEventHandlers();
 
-  /** Remove all the events handlers that have been added to the integrator.
+  /** Remove all the event handlers that have been added to the integrator.
    * @see #addEventHandler(EventHandler, double, double, int)
-   * @see #getEventsHandlers()
+   * @see #getEventHandlers()
    */
-  public void clearEventsHandlers();
+  public void clearEventHandlers();
 
   /** Integrate the differential equations up to the given time.
    * <p>This method solves an Initial Value Problem (IVP).</p>

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java Tue Jul  8 06:26:59 2008
@@ -22,6 +22,7 @@
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.sampling.AbstractStepInterpolator;
 import org.apache.commons.math.ode.sampling.DummyStepInterpolator;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 /**
  * This class implements the common part of all embedded Runge-Kutta
@@ -180,7 +181,7 @@
 
     // set up an interpolator sharing the integrator arrays
     AbstractStepInterpolator interpolator;
-    if (handler.requiresDenseOutput() || (! eventsHandlersManager.isEmpty())) {
+    if (requiresDenseOutput() || (! eventsHandlersManager.isEmpty())) {
       final RungeKuttaStepInterpolator rki = (RungeKuttaStepInterpolator) prototype.copy();
       rki.reinitialize(equations, yTmp, yDotK, forward);
       interpolator = rki;
@@ -193,7 +194,9 @@
     double  hNew      = 0;
     boolean firstTime = true;
     boolean lastStep;
-    handler.reset();
+    for (StepHandler handler : stepHandlers) {
+        handler.reset();
+    }
     do {
 
       interpolator.shift();
@@ -289,7 +292,9 @@
 
       // provide the step data to the step handler
       interpolator.storeTime(nextStep);
-      handler.handleStep(interpolator, lastStep);
+      for (StepHandler handler : stepHandlers) {
+          handler.handleStep(interpolator, lastStep);
+      }
       stepStart = nextStep;
 
       if (fsal) {

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java Tue Jul  8 06:26:59 2008
@@ -117,7 +117,7 @@
                                       final double scalRelativeTolerance) {
     super(METHOD_NAME, minStep, maxStep,
           scalAbsoluteTolerance, scalRelativeTolerance);
-    denseOutput = (handler.requiresDenseOutput() || (! eventsHandlersManager.isEmpty()));
+    denseOutput = requiresDenseOutput() || (! eventsHandlersManager.isEmpty());
     setStabilityCheck(true, -1, -1, -1);
     setStepsizeControl(-1, -1, -1, -1);
     setOrderControl(-1, -1, -1);
@@ -140,7 +140,7 @@
                                       final double[] vecRelativeTolerance) {
     super(METHOD_NAME, minStep, maxStep,
           vecAbsoluteTolerance, vecRelativeTolerance);
-    denseOutput = (handler.requiresDenseOutput() || (! eventsHandlersManager.isEmpty()));
+    denseOutput = requiresDenseOutput() || (! eventsHandlersManager.isEmpty());
     setStabilityCheck(true, -1, -1, -1);
     setStepsizeControl(-1, -1, -1, -1);
     setOrderControl(-1, -1, -1);
@@ -281,15 +281,11 @@
 
   }
 
-  /** Set the step handler for this integrator.
-   * The handler will be called by the integrator for each accepted
-   * step.
-   * @param handler handler for the accepted steps
-   */
-  public void setStepHandler (final StepHandler handler) {
+  /** {@inheritDoc} */
+  public void addStepHandler (final StepHandler handler) {
 
-    super.setStepHandler(handler);
-    denseOutput = (handler.requiresDenseOutput() || (! eventsHandlersManager.isEmpty()));
+    super.addStepHandler(handler);
+    denseOutput = requiresDenseOutput() || (! eventsHandlersManager.isEmpty());
 
     // reinitialize the arrays
     initializeArrays();
@@ -302,7 +298,7 @@
                               final double convergence,
                               final int maxIterationCount) {
     super.addEventHandler(function, maxCheckInterval, convergence, maxIterationCount);
-    denseOutput = (handler.requiresDenseOutput() || (! eventsHandlersManager.isEmpty()));
+    denseOutput = requiresDenseOutput() || (! eventsHandlersManager.isEmpty());
 
     // reinitialize the arrays
     initializeArrays();
@@ -585,7 +581,9 @@
     boolean newStep          = true;
     boolean lastStep         = false;
     boolean firstStepAlreadyComputed = false;
-    handler.reset();
+    for (StepHandler handler : stepHandlers) {
+        handler.reset();
+    }
     costPerTimeUnit[0] = 0;
     while (! lastStep) {
 
@@ -858,7 +856,9 @@
 
         // provide the step data to the step handler
         interpolator.storeTime(nextStep);
-        handler.handleStep(interpolator, lastStep);
+        for (StepHandler handler : stepHandlers) {
+            handler.handleStep(interpolator, lastStep);
+        }
         stepStart = nextStep;
 
         if (eventsHandlersManager.reset(stepStart, y) && ! lastStep) {

Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java Tue Jul  8 06:26:59 2008
@@ -24,6 +24,7 @@
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.sampling.AbstractStepInterpolator;
 import org.apache.commons.math.ode.sampling.DummyStepInterpolator;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 /**
  * This class implements the common part of all fixed step Runge-Kutta
@@ -96,7 +97,7 @@
 
     // set up an interpolator sharing the integrator arrays
     AbstractStepInterpolator interpolator;
-    if (handler.requiresDenseOutput() || (! eventsHandlersManager.isEmpty())) {
+    if (requiresDenseOutput() || (! eventsHandlersManager.isEmpty())) {
       final RungeKuttaStepInterpolator rki = (RungeKuttaStepInterpolator) prototype.copy();
       rki.reinitialize(equations, yTmp, yDotK, forward);
       interpolator = rki;
@@ -110,7 +111,9 @@
     boolean lastStep  = false;
     stepStart = t0;
     stepSize  = (t - t0) / nbStep;
-    handler.reset();
+    for (StepHandler handler : stepHandlers) {
+        handler.reset();
+    }
     for (long i = 0; ! lastStep; ++i) {
 
       interpolator.shift();
@@ -168,7 +171,9 @@
 
       // provide the step data to the step handler
       interpolator.storeTime(nextStep);
-      handler.handleStep(interpolator, lastStep);
+      for (StepHandler handler : stepHandlers) {
+          handler.handleStep(interpolator, lastStep);
+      }
       stepStart = nextStep;
 
       if (eventsHandlersManager.reset(stepStart, y) && ! lastStep) {

Modified: commons/proper/math/branches/MATH_2_0/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/site/xdoc/changes.xml?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/branches/MATH_2_0/src/site/xdoc/changes.xml Tue Jul  8 06:26:59 2008
@@ -39,6 +39,13 @@
   </properties>
   <body>
     <release version="2.0" date="TBD" description="TBD">
+      <action dev="luc" type="update">
+        The ODE integrators now support several step handlers at once, instead of just one.
+        This is more consistent with event handlers management.
+        The setStepHandler method has therefore been replaced by addStephandler, the
+        getStepHandler method has been replaced by getStepHandlers which returns a Collection
+        and a clearStepHandlers method has been added.
+      </action>
       <action dev="luc" type="add">
         All step interpolators for ODE integrators now provide interpolation for
         both the state and its time derivatives. The interpolated derivatives are

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/ContinuousOutputModelTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/ContinuousOutputModelTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/ContinuousOutputModelTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/ContinuousOutputModelTest.java Tue Jul  8 06:26:59 2008
@@ -41,11 +41,11 @@
 
   public void testBoundaries()
     throws DerivativeException, IntegratorException {
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
-    ContinuousOutputModel cm = (ContinuousOutputModel) integ.getStepHandler();
+    ContinuousOutputModel cm = (ContinuousOutputModel) integ.getStepHandlers().iterator().next();
     cm.setInterpolatedTime(2.0 * pb.getInitialTime() - pb.getFinalTime());
     cm.setInterpolatedTime(2.0 * pb.getFinalTime() - pb.getInitialTime());
     cm.setInterpolatedTime(0.5 * (pb.getFinalTime() + pb.getInitialTime()));
@@ -55,7 +55,7 @@
     throws DerivativeException, IntegratorException {
 
     ContinuousOutputModel cm = new ContinuousOutputModel();
-    integ.setStepHandler(cm);
+    integ.addStepHandler(cm);
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -101,7 +101,7 @@
       ContinuousOutputModel cm1 = new ContinuousOutputModel();
       FirstOrderIntegrator integ1 =
           new DormandPrince853Integrator(0, 1.0, 1.0e-8, 1.0e-8);
-      integ1.setStepHandler(cm1);
+      integ1.addStepHandler(cm1);
       integ1.integrate(problem, Math.PI, new double[] { -1.0, 0.0 },
                        0, new double[2]);
 
@@ -109,7 +109,7 @@
       ContinuousOutputModel cm2 = new ContinuousOutputModel();
       FirstOrderIntegrator integ2 =
           new DormandPrince853Integrator(0, 0.1, 1.0e-12, 1.0e-12);
-      integ2.setStepHandler(cm2);
+      integ2.addStepHandler(cm2);
       integ2.integrate(problem, 2.0 * Math.PI, new double[] { 1.0, 0.0 },
                        Math.PI, new double[2]);
 

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -81,13 +81,13 @@
 
         FirstOrderIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
         TestProblemHandler handler = new TestProblemHandler(pb, integ);
-        integ.setStepHandler(handler);
+        integ.addStepHandler(handler);
         EventHandler[] functions = pb.getEventsHandlers();
         for (int l = 0; l < functions.length; ++l) {
           integ.addEventHandler(functions[l],
                                      Double.POSITIVE_INFINITY, 1.0e-6 * step, 1000);
         }
-        assertEquals(functions.length, integ.getEventsHandlers().size());
+        assertEquals(functions.length, integ.getEventHandlers().size());
         double stopTime = integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                                           pb.getFinalTime(), new double[pb.getDimension()]);
         if (functions.length == 0) {
@@ -100,8 +100,8 @@
         }
         previousError = error;
         assertEquals(0, handler.getMaximalTimeError(), 1.0e-12);
-        integ.clearEventsHandlers();
-        assertEquals(0, integ.getEventsHandlers().size());
+        integ.clearEventHandlers();
+        assertEquals(0, integ.getEventHandlers().size());
       }
 
     }
@@ -116,7 +116,7 @@
 
     FirstOrderIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
@@ -134,7 +134,7 @@
 
     FirstOrderIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
@@ -151,7 +151,7 @@
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
 
     FirstOrderIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
-    integ.setStepHandler(new KeplerHandler(pb));
+    integ.addStepHandler(new KeplerHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -30,6 +30,7 @@
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 public class ClassicalRungeKuttaStepInterpolatorTest
   extends StepInterpolatorAbstractTest {
@@ -53,14 +54,16 @@
     TestProblem3 pb = new TestProblem3(0.9);
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
     ClassicalRungeKuttaIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 700000);
     assertTrue(bos.size () < 701000);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -64,7 +64,7 @@
                                                                  vecAbsoluteTolerance,
                                                                  vecRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -91,7 +91,7 @@
                                     scalRelativeTolerance);
 
     DP54SmallLastHandler handler = new DP54SmallLastHandler(minStep);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.setInitialStepSize(1.7);
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
@@ -152,7 +152,7 @@
       integ.setSafety(0.8);
       integ.setMaxGrowth(5.0);
       integ.setMinReduction(0.3);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -187,13 +187,13 @@
                                                                scalAbsoluteTolerance,
                                                                scalRelativeTolerance);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     EventHandler[] functions = pb.getEventsHandlers();
     for (int l = 0; l < functions.length; ++l) {
       integ.addEventHandler(functions[l],
                                  Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 1000);
     }
-    assertEquals(functions.length, integ.getEventsHandlers().size());
+    assertEquals(functions.length, integ.getEventHandlers().size());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -201,8 +201,8 @@
     assertTrue(handler.getMaximalValueError() < 5.0e-6);
     assertEquals(0, handler.getMaximalTimeError(), 1.0e-12);
     assertEquals(12.0, handler.getLastTime(), 1.0e-8 * maxStep);
-    integ.clearEventsHandlers();
-    assertEquals(0, integ.getEventsHandlers().size());
+    integ.clearEventHandlers();
+    assertEquals(0, integ.getEventHandlers().size());
 
   }
 
@@ -218,7 +218,7 @@
     FirstOrderIntegrator integ = new DormandPrince54Integrator(minStep, maxStep,
                                                                scalAbsoluteTolerance,
                                                                scalRelativeTolerance);
-    integ.setStepHandler(new KeplerHandler(pb));
+    integ.addStepHandler(new KeplerHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -239,7 +239,7 @@
     FirstOrderIntegrator integ = new DormandPrince54Integrator(minStep, maxStep,
                                                                scalAbsoluteTolerance,
                                                                scalRelativeTolerance);
-    integ.setStepHandler(new VariableHandler());
+    integ.addStepHandler(new VariableHandler());
     double stopTime = integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                                       pb.getFinalTime(), new double[pb.getDimension()]);
     assertEquals(pb.getFinalTime(), stopTime, 1.0e-10);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -64,14 +64,16 @@
     DormandPrince54Integrator integ = new DormandPrince54Integrator(minStep, maxStep,
                                                                     scalAbsoluteTolerance,
                                                                     scalRelativeTolerance);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 119500);
     assertTrue(bos.size () < 120500);
@@ -110,7 +112,7 @@
       DormandPrince54Integrator integ = new DormandPrince54Integrator(minStep, maxStep,
                                                                       scalAbsoluteTolerance,
                                                                       scalRelativeTolerance);
-      integ.setStepHandler(new StepHandler() {
+      integ.addStepHandler(new StepHandler() {
         private static final long serialVersionUID = -6768136169276197L;
         public void handleStep(StepInterpolator interpolator, boolean isLast)
           throws DerivativeException {

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -79,7 +79,7 @@
                                                                   vecAbsoluteTolerance,
                                                                   vecRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -106,7 +106,7 @@
                                                                   scalAbsoluteTolerance,
                                                                   scalRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -138,13 +138,13 @@
                                                                 scalAbsoluteTolerance,
                                                                 scalRelativeTolerance);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     EventHandler[] functions = pb.getEventsHandlers();
     for (int l = 0; l < functions.length; ++l) {
       integ.addEventHandler(functions[l],
                                  Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 1000);
     }
-    assertEquals(functions.length, integ.getEventsHandlers().size());
+    assertEquals(functions.length, integ.getEventHandlers().size());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -152,8 +152,8 @@
     assertTrue(handler.getMaximalValueError() < 5.0e-8);
     assertEquals(0, handler.getMaximalTimeError(), 1.0e-12);
     assertEquals(12.0, handler.getLastTime(), 1.0e-8 * maxStep);
-    integ.clearEventsHandlers();
-    assertEquals(0, integ.getEventsHandlers().size());
+    integ.clearEventHandlers();
+    assertEquals(0, integ.getEventHandlers().size());
 
   }
 
@@ -169,7 +169,7 @@
     FirstOrderIntegrator integ = new DormandPrince853Integrator(minStep, maxStep,
                                                                 scalAbsoluteTolerance,
                                                                 scalRelativeTolerance);
-    integ.setStepHandler(new KeplerHandler(pb));
+    integ.addStepHandler(new KeplerHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -190,7 +190,7 @@
     FirstOrderIntegrator integ = new DormandPrince853Integrator(minStep, maxStep,
                                                                scalAbsoluteTolerance,
                                                                scalRelativeTolerance);
-    integ.setStepHandler(new VariableHandler());
+    integ.addStepHandler(new VariableHandler());
     double stopTime = integ.integrate(pb,
                                       pb.getInitialTime(), pb.getInitialState(),
                                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -210,13 +210,13 @@
     FirstOrderIntegrator integ = new DormandPrince853Integrator(minStep, maxStep,
                                                                 scalAbsoluteTolerance,
                                                                 scalRelativeTolerance);
-    integ.setStepHandler(DummyStepHandler.getInstance());
+    integ.addStepHandler(DummyStepHandler.getInstance());
     integ.integrate(pb1,
                     pb1.getInitialTime(), pb1.getInitialState(),
                     pb1.getFinalTime(), new double[pb1.getDimension()]);
     int callsWithoutDenseOutput = pb1.getCalls();
 
-    integ.setStepHandler(new InterpolatingStepHandler());
+    integ.addStepHandler(new InterpolatingStepHandler());
     integ.integrate(pb2,
                     pb2.getInitialTime(), pb2.getInitialState(),
                     pb2.getFinalTime(), new double[pb2.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -64,14 +64,16 @@
     DormandPrince853Integrator integ = new DormandPrince853Integrator(minStep, maxStep,
                                                                       scalAbsoluteTolerance,
                                                                       scalRelativeTolerance);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 86000);
     assertTrue(bos.size () < 87000);
@@ -110,7 +112,7 @@
     DormandPrince853Integrator integ = new DormandPrince853Integrator(minStep, maxStep,
                                                                       scalAbsoluteTolerance,
                                                                       scalRelativeTolerance);
-    integ.setStepHandler(new StepHandler() {
+    integ.addStepHandler(new StepHandler() {
         private static final long serialVersionUID = 2209212559670665268L;
         public void handleStep(StepInterpolator interpolator, boolean isLast)
         throws DerivativeException {

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -60,7 +60,7 @@
 
         FirstOrderIntegrator integ = new EulerIntegrator(step);
         TestProblemHandler handler = new TestProblemHandler(pb, integ);
-        integ.setStepHandler(handler);
+        integ.addStepHandler(handler);
         EventHandler[] functions = pb.getEventsHandlers();
         for (int l = 0; l < functions.length; ++l) {
           integ.addEventHandler(functions[l],
@@ -93,7 +93,7 @@
 
     FirstOrderIntegrator integ = new EulerIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -113,7 +113,7 @@
 
     FirstOrderIntegrator integ = new EulerIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -31,6 +31,7 @@
 import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.IntegratorException;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 public class EulerStepInterpolatorTest
   extends StepInterpolatorAbstractTest {
@@ -132,14 +133,16 @@
     TestProblem1 pb = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
     EulerIntegrator integ = new EulerIntegrator(step);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 82000);
     assertTrue(bos.size () < 83000);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -62,7 +62,7 @@
 
         FirstOrderIntegrator integ = new GillIntegrator(step);
         TestProblemHandler handler = new TestProblemHandler(pb, integ);
-        integ.setStepHandler(handler);
+        integ.addStepHandler(handler);
         EventHandler[] functions = pb.getEventsHandlers();
         for (int l = 0; l < functions.length; ++l) {
           integ.addEventHandler(functions[l],
@@ -95,7 +95,7 @@
 
     FirstOrderIntegrator integ = new GillIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
@@ -114,7 +114,7 @@
 
     FirstOrderIntegrator integ = new GillIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
@@ -131,7 +131,7 @@
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
 
     FirstOrderIntegrator integ = new GillIntegrator(step);
-    integ.setStepHandler(new KeplerStepHandler(pb));
+    integ.addStepHandler(new KeplerStepHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -29,6 +29,7 @@
 import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.nonstiff.GillIntegrator;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 public class GillStepInterpolatorTest
   extends StepInterpolatorAbstractTest {
@@ -52,14 +53,16 @@
     TestProblem3 pb = new TestProblem3(0.9);
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
     GillIntegrator integ = new GillIntegrator(step);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 700000);
     assertTrue(bos.size () < 701000);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -78,7 +78,7 @@
         new GraggBulirschStoerIntegrator(minStep, maxStep,
                                          vecAbsoluteTolerance, vecRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -105,7 +105,7 @@
         new GraggBulirschStoerIntegrator(minStep, maxStep,
                                          absTolerance, relTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -158,7 +158,7 @@
   private double getMaxError(FirstOrderIntegrator integrator, TestProblemAbstract pb)
     throws DerivativeException, IntegratorException {
       TestProblemHandler handler = new TestProblemHandler(pb, integrator);
-      integrator.setStepHandler(handler);
+      integrator.addStepHandler(handler);
       integrator.integrate(pb,
                            pb.getInitialTime(), pb.getInitialState(),
                            pb.getFinalTime(), new double[pb.getDimension()]);
@@ -178,13 +178,13 @@
                                                                   scalAbsoluteTolerance,
                                                                   scalRelativeTolerance);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     EventHandler[] functions = pb.getEventsHandlers();
     for (int l = 0; l < functions.length; ++l) {
       integ.addEventHandler(functions[l],
                                  Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 1000);
     }
-    assertEquals(functions.length, integ.getEventsHandlers().size());
+    assertEquals(functions.length, integ.getEventHandlers().size());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -192,8 +192,8 @@
     assertTrue(handler.getMaximalValueError() < 5.0e-8);
     assertEquals(0, handler.getMaximalTimeError(), 1.0e-12);
     assertEquals(12.0, handler.getLastTime(), 1.0e-8 * maxStep);
-    integ.clearEventsHandlers();
-    assertEquals(0, integ.getEventsHandlers().size());
+    integ.clearEventHandlers();
+    assertEquals(0, integ.getEventHandlers().size());
 
   }
 
@@ -209,7 +209,7 @@
     FirstOrderIntegrator integ =
       new GraggBulirschStoerIntegrator(minStep, maxStep,
                                        absTolerance, relTolerance);
-    integ.setStepHandler(new KeplerStepHandler(pb));
+    integ.addStepHandler(new KeplerStepHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -229,7 +229,7 @@
     FirstOrderIntegrator integ =
       new GraggBulirschStoerIntegrator(minStep, maxStep,
                                        absTolerance, relTolerance);
-    integ.setStepHandler(new VariableStepHandler());
+    integ.addStepHandler(new VariableStepHandler());
     double stopTime = integ.integrate(pb,
                                       pb.getInitialTime(), pb.getInitialState(),
                                       pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -66,14 +66,16 @@
     GraggBulirschStoerIntegrator integ =
       new GraggBulirschStoerIntegrator(minStep, maxStep,
                                        absTolerance, relTolerance);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 34000);
     assertTrue(bos.size () < 35000);
@@ -112,7 +114,7 @@
     GraggBulirschStoerIntegrator integ = new GraggBulirschStoerIntegrator(minStep, maxStep,
                                                                           scalAbsoluteTolerance,
                                                                           scalRelativeTolerance);
-    integ.setStepHandler(new StepHandler() {
+    integ.addStepHandler(new StepHandler() {
         private static final long serialVersionUID = -5947183291381232297L;
         public void handleStep(StepInterpolator interpolator, boolean isLast)
         throws DerivativeException {

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -92,7 +92,7 @@
                                                               vecAbsoluteTolerance,
                                                               vecRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -119,7 +119,7 @@
                                                               scalAbsoluteTolerance,
                                                               scalRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
       integ.integrate(pb,
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
@@ -151,13 +151,13 @@
                                                             scalAbsoluteTolerance,
                                                             scalRelativeTolerance);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     EventHandler[] functions = pb.getEventsHandlers();
     for (int l = 0; l < functions.length; ++l) {
       integ.addEventHandler(functions[l],
                                  Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 1000);
     }
-    assertEquals(functions.length, integ.getEventsHandlers().size());
+    assertEquals(functions.length, integ.getEventHandlers().size());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -165,8 +165,8 @@
     assertTrue(handler.getMaximalValueError() < 1.0e-7);
     assertEquals(0, handler.getMaximalTimeError(), 1.0e-12);
     assertEquals(12.0, handler.getLastTime(), 1.0e-8 * maxStep);
-    integ.clearEventsHandlers();
-    assertEquals(0, integ.getEventsHandlers().size());
+    integ.clearEventHandlers();
+    assertEquals(0, integ.getEventHandlers().size());
 
   }
 
@@ -183,7 +183,7 @@
           new HighamHall54Integrator(minStep, maxStep,
                                      scalAbsoluteTolerance, scalRelativeTolerance);
       TestProblemHandler handler = new TestProblemHandler(pb, integ);
-      integ.setStepHandler(handler);
+      integ.addStepHandler(handler);
 
       integ.addEventHandler(new EventHandler() {
         public int eventOccurred(double t, double[] y) {
@@ -229,7 +229,7 @@
         new HighamHall54Integrator(minStep, maxStep,
                                    scalAbsoluteTolerance, scalRelativeTolerance);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
 
     integ.addEventHandler(new EventHandler() {
       public int eventOccurred(double t, double[] y) {
@@ -332,7 +332,7 @@
     FirstOrderIntegrator integ = new HighamHall54Integrator(minStep, maxStep,
                                                             vecAbsoluteTolerance,
                                                             vecRelativeTolerance);
-    integ.setStepHandler(new KeplerHandler(pb));
+    integ.addStepHandler(new KeplerHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -64,14 +64,16 @@
     HighamHall54Integrator integ = new HighamHall54Integrator(minStep, maxStep,
                                                               scalAbsoluteTolerance,
                                                               scalRelativeTolerance);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 158000);
     assertTrue(bos.size () < 159000);
@@ -110,7 +112,7 @@
     HighamHall54Integrator integ = new HighamHall54Integrator(minStep, maxStep,
                                                               scalAbsoluteTolerance,
                                                               scalRelativeTolerance);
-    integ.setStepHandler(new StepHandler() {
+    integ.addStepHandler(new StepHandler() {
         private static final long serialVersionUID = 9111679755950880352L;
         public void handleStep(StepInterpolator interpolator, boolean isLast)
         throws DerivativeException {

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointIntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointIntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointIntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -59,7 +59,7 @@
           * Math.pow(2.0, -i);
         FirstOrderIntegrator integ = new MidpointIntegrator(step);
         TestProblemHandler handler = new TestProblemHandler(pb, integ);
-        integ.setStepHandler(handler);
+        integ.addStepHandler(handler);
         EventHandler[] functions = pb.getEventsHandlers();
         for (int l = 0; l < functions.length; ++l) {
           integ.addEventHandler(functions[l],
@@ -93,7 +93,7 @@
 
     FirstOrderIntegrator integ = new MidpointIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
@@ -113,7 +113,7 @@
 
     FirstOrderIntegrator integ = new MidpointIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -30,6 +30,7 @@
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 public class MidpointStepInterpolatorTest
   extends StepInterpolatorAbstractTest {
@@ -53,14 +54,16 @@
     TestProblem1 pb = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
     MidpointIntegrator integ = new MidpointIntegrator(step);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 98000);
     assertTrue(bos.size () < 99000);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/StepInterpolatorAbstractTest.java Tue Jul  8 06:26:59 2008
@@ -34,7 +34,7 @@
                                                final TestProblemAbstract problem,
                                                final double threshold)
         throws DerivativeException, IntegratorException {
-        integrator.setStepHandler(new StepHandler() {
+        integrator.addStepHandler(new StepHandler() {
 
             private static final long serialVersionUID = 2462564234755682953L;
 

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java Tue Jul  8 06:26:59 2008
@@ -62,7 +62,7 @@
 
         FirstOrderIntegrator integ = new ThreeEighthesIntegrator(step);
         TestProblemHandler handler = new TestProblemHandler(pb, integ);
-        integ.setStepHandler(handler);
+        integ.addStepHandler(handler);
         EventHandler[] functions = pb.getEventsHandlers();
         for (int l = 0; l < functions.length; ++l) {
           integ.addEventHandler(functions[l],
@@ -95,7 +95,7 @@
 
     FirstOrderIntegrator integ = new ThreeEighthesIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
@@ -114,7 +114,7 @@
 
     FirstOrderIntegrator integ = new ThreeEighthesIntegrator(step);
     TestProblemHandler handler = new TestProblemHandler(pb, integ);
-    integ.setStepHandler(handler);
+    integ.addStepHandler(handler);
     integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
@@ -131,7 +131,7 @@
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
 
     FirstOrderIntegrator integ = new ThreeEighthesIntegrator(step);
-    integ.setStepHandler(new KeplerHandler(pb));
+    integ.addStepHandler(new KeplerHandler(pb));
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolatorTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolatorTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolatorTest.java Tue Jul  8 06:26:59 2008
@@ -30,6 +30,7 @@
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
+import org.apache.commons.math.ode.sampling.StepHandler;
 
 public class ThreeEighthesStepInterpolatorTest
   extends StepInterpolatorAbstractTest {
@@ -53,14 +54,16 @@
     TestProblem3 pb = new TestProblem3(0.9);
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
     ThreeEighthesIntegrator integ = new ThreeEighthesIntegrator(step);
-    integ.setStepHandler(new ContinuousOutputModel());
+    integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
                     pb.getFinalTime(), new double[pb.getDimension()]);
 
     ByteArrayOutputStream bos = new ByteArrayOutputStream();
     ObjectOutputStream    oos = new ObjectOutputStream(bos);
-    oos.writeObject(integ.getStepHandler());
+    for (StepHandler handler : integ.getStepHandlers()) {
+        oos.writeObject(handler);
+    }
 
     assertTrue(bos.size () > 700000);
     assertTrue(bos.size () < 701000);

Modified: commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/sampling/StepNormalizerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/sampling/StepNormalizerTest.java?rev=674814&r1=674813&r2=674814&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/sampling/StepNormalizerTest.java (original)
+++ commons/proper/math/branches/MATH_2_0/src/test/org/apache/commons/math/ode/sampling/StepNormalizerTest.java Tue Jul  8 06:26:59 2008
@@ -40,7 +40,7 @@
     throws DerivativeException, IntegratorException {
     double range = pb.getFinalTime() - pb.getInitialTime();
     setLastSeen(false);
-    integ.setStepHandler(new StepNormalizer(range / 10.0,
+    integ.addStepHandler(new StepNormalizer(range / 10.0,
                                        new FixedStepHandler() {
                                          private boolean firstCall = true;
                                          public void handleStep(double t,
@@ -67,7 +67,7 @@
     throws DerivativeException, IntegratorException {
     final double range = pb.getFinalTime() - pb.getInitialTime();
     setLastSeen(false);
-    integ.setStepHandler(new StepNormalizer(range / 10.5,
+    integ.addStepHandler(new StepNormalizer(range / 10.5,
                                        new FixedStepHandler() {
                                          public void handleStep(double t,
                                                                 double[] y,



Mime
View raw message