commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1165792 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/exception/util/ main/java/org/apache/commons/math/ode/ main/java/org/apache/commons/math/ode/nonstiff/ main/java/org/apache/commons/math/ode/sampling/ main/reso...
Date Tue, 06 Sep 2011 19:17:53 GMT
Author: luc
Date: Tue Sep  6 19:17:52 2011
New Revision: 1165792

URL: http://svn.apache.org/viewvc?rev=1165792&view=rev
Log:
removed MathUserException from ODE package

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java
    commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/ContinuousOutputModelTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/TestProblemHandler.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/OverlappingEventsTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepInterpolatorTestUtils.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepNormalizerOutputTestBase.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java Tue Sep  6 19:17:52 2011
@@ -95,7 +95,6 @@ public enum LocalizedFormats implements 
     ENDPOINTS_NOT_AN_INTERVAL("endpoints do not specify an interval: [{0}, {1}]"),
     EQUAL_VERTICES_IN_SIMPLEX("equal vertices {0} and {1} in simplex configuration"),
     EULER_ANGLES_SINGULARITY("Euler angles singularity"),
-    EVALUATION_FAILED("evaluation failed for argument = {0}"),
     EVALUATION("evaluation"), /* keep */
     EXPANSION_FACTOR_SMALLER_THAN_ONE("expansion factor smaller than one ({0})"),
     FACTORIAL_NEGATIVE_PARAMETER("must have n >= 0 for n!, got n = {0}"),

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/ContinuousOutputModel.java Tue Sep  6 19:17:52 2011
@@ -17,12 +17,12 @@
 
 package org.apache.commons.math.ode;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
-import java.io.Serializable;
 
-import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.exception.DimensionMismatchException;
+import org.apache.commons.math.exception.MathIllegalArgumentException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.ode.sampling.StepHandler;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
@@ -117,14 +117,12 @@ public class ContinuousOutputModel
 
   /** Append another model at the end of the instance.
    * @param model model to add at the end of the instance
-   * @exception MathUserException if user code called from step interpolator
-   * finalization triggers one
-   * @exception IllegalArgumentException if the model to append is not
+   * @exception MathIllegalArgumentException if the model to append is not
    * compatible with the instance (dimension of the state vector,
    * propagation direction, hole between the dates)
    */
   public void append(final ContinuousOutputModel model)
-    throws MathUserException {
+    throws MathIllegalArgumentException {
 
     if (model.steps.size() == 0) {
       return;
@@ -136,14 +134,12 @@ public class ContinuousOutputModel
     } else {
 
       if (getInterpolatedState().length != model.getInterpolatedState().length) {
-          throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE,
-                getInterpolatedState().length, model.getInterpolatedState().length);
+          throw new DimensionMismatchException(model.getInterpolatedState().length,
+                                               getInterpolatedState().length);
       }
 
       if (forward ^ model.forward) {
-          throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.PROPAGATION_DIRECTION_MISMATCH);
+          throw new MathIllegalArgumentException(LocalizedFormats.PROPAGATION_DIRECTION_MISMATCH);
       }
 
       final StepInterpolator lastInterpolator = steps.get(index);
@@ -152,8 +148,8 @@ public class ContinuousOutputModel
       final double step = current - previous;
       final double gap = model.getInitialTime() - current;
       if (FastMath.abs(gap) > 1.0e-3 * FastMath.abs(step)) {
-        throw MathRuntimeException.createIllegalArgumentException(
-              LocalizedFormats.HOLE_BETWEEN_MODELS_TIME_RANGES, FastMath.abs(gap));
+        throw new MathIllegalArgumentException(LocalizedFormats.HOLE_BETWEEN_MODELS_TIME_RANGES,
+                                               FastMath.abs(gap));
       }
 
     }
@@ -184,11 +180,8 @@ public class ContinuousOutputModel
    * the instance for later use.
    * @param interpolator interpolator for the last accepted step.
    * @param isLast true if the step is the last one
-   * @exception MathUserException if user code called from step interpolator
-   * finalization triggers one
    */
-  public void handleStep(final StepInterpolator interpolator, final boolean isLast)
-    throws MathUserException {
+  public void handleStep(final StepInterpolator interpolator, final boolean isLast) {
 
     if (steps.size() == 0) {
       initialTime = interpolator.getPreviousTime();
@@ -333,10 +326,8 @@ public class ContinuousOutputModel
   /**
    * Get the state vector of the interpolated point.
    * @return state vector at time {@link #getInterpolatedTime}
-   * @exception MathUserException if user code called from step interpolator
-   * finalization triggers one
    */
-  public double[] getInterpolatedState() throws MathUserException {
+  public double[] getInterpolatedState() {
     return steps.get(index).getInterpolatedState();
   }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderConverter.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.exception.MathUserException;
 
 /** This class converts second order differential equations to first
  * order ones.
@@ -97,11 +96,8 @@ public class FirstOrderConverter impleme
    * @param t current value of the independent <I>time</I> variable
    * @param y array containing the current value of the state vector
    * @param yDot placeholder array where to put the time derivative of the state vector
-   * @throws MathUserException this exception is propagated to the caller if the
-   * underlying user function triggers one
    */
-  public void computeDerivatives(final double t, final double[] y, final double[] yDot)
-      throws MathUserException {
+  public void computeDerivatives(final double t, final double[] y, final double[] yDot) {
 
     // split the state vector in two
     System.arraycopy(y, 0,         z,    0, dimension);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderDifferentialEquations.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.exception.MathUserException;
 
 
 /** This interface represents a first order differential equations set.
@@ -58,10 +57,7 @@ public interface FirstOrderDifferentialE
      * @param t current value of the independent <I>time</I> variable
      * @param y array containing the current value of the state vector
      * @param yDot placeholder array where to put the time derivative of the state vector
-     * @throws MathUserException this user-defined exception should be used if an error is
-     * is triggered by user code
      */
-    void computeDerivatives(double t, double[] y, double[] yDot)
-        throws MathUserException;
+    void computeDerivatives(double t, double[] y, double[] yDot);
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/MultistepIntegrator.java Tue Sep  6 19:17:52 2011
@@ -19,7 +19,6 @@ package org.apache.commons.math.ode;
 
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.exception.MathIllegalStateException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.linear.Array2DRowRealMatrix;
 import org.apache.commons.math.ode.nonstiff.AdaptiveStepsizeIntegrator;
@@ -417,8 +416,7 @@ public abstract class MultistepIntegrato
         }
 
         /** {@inheritDoc} */
-        public void computeDerivatives(double t, double[] y, double[] dot)
-                throws MathUserException {
+        public void computeDerivatives(double t, double[] y, double[] dot) {
             MultistepIntegrator.this.computeDerivatives(t, y, dot);
         }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.exception.MathUserException;
 
 /** This interface represents a second order differential equations set.
 
@@ -60,10 +59,7 @@ public interface SecondOrderDifferential
      * of the state vector
      * @param yDDot placeholder array where to put the second time derivative
      * of the state vector
-     * @throws MathUserException this user-defined exception should be used if an error is
-     * is triggered by user code
      */
-    void computeSecondDerivatives(double t, double[] y, double[] yDot, double[] yDDot)
-        throws MathUserException;
+    void computeSecondDerivatives(double t, double[] y, double[] yDot, double[] yDDot);
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java Tue Sep  6 19:17:52 2011
@@ -259,14 +259,11 @@ public abstract class AdaptiveStepsizeIn
    * @param y1 work array for a state vector
    * @param yDot1 work array for the first time derivative of y1
    * @return first integration step
-   * @exception MathUserException this exception is propagated to
-   * the caller if the underlying user function triggers one
    */
   public double initializeStep(final FirstOrderDifferentialEquations equations,
                                final boolean forward, final int order, final double[] scale,
                                final double t0, final double[] y0, final double[] yDot0,
-                               final double[] y1, final double[] yDot1)
-      throws MathUserException {
+                               final double[] y1, final double[] yDot1) {
 
     if (initialStep > 0) {
       // use the user provided value

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -82,8 +81,7 @@ class ClassicalRungeKuttaStepInterpolato
     /** {@inheritDoc} */
     @Override
     protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                            final double oneMinusThetaH)
-        throws MathUserException {
+                                            final double oneMinusThetaH) {
 
         final double fourTheta      = 4 * theta;
         final double oneMinusTheta  = 1 - theta;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.AbstractIntegrator;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
@@ -165,8 +164,7 @@ class DormandPrince54StepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-    throws MathUserException {
+                                          final double oneMinusThetaH) {
 
     if (! vectorsInitialized) {
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.AbstractIntegrator;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
@@ -311,8 +310,7 @@ class DormandPrince853StepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-    throws MathUserException {
+                                          final double oneMinusThetaH) {
 
     if (! vectorsInitialized) {
 
@@ -385,8 +383,7 @@ class DormandPrince853StepInterpolator
 
   /** {@inheritDoc} */
   @Override
-  protected void doFinalize()
-    throws MathUserException {
+  protected void doFinalize() {
 
     if (currentState == null) {
       // we are finalizing an uninitialized instance
@@ -436,7 +433,7 @@ class DormandPrince853StepInterpolator
     try {
       // save the local attributes
       finalizeStep();
-    } catch (MathUserException e) {
+    } catch (Exception e) {
         IOException ioe = new IOException(e.getLocalizedMessage());
         ioe.initCause(e);
         throw ioe;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -78,8 +77,7 @@ class EulerStepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-    throws MathUserException {
+                                          final double oneMinusThetaH) {
 
     for (int i = 0; i < interpolatedState.length; ++i) {
       interpolatedState[i] = currentState[i] - oneMinusThetaH * yDotK[0][i];

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 import org.apache.commons.math.util.FastMath;
 
@@ -90,8 +89,7 @@ class GillStepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-    throws MathUserException {
+                                          final double oneMinusThetaH) {
 
     final double twoTheta  = 2 * theta;
     final double fourTheta = 4 * theta;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegrator.java Tue Sep  6 19:17:52 2011
@@ -20,7 +20,6 @@ package org.apache.commons.math.ode.nons
 import org.apache.commons.math.analysis.solvers.UnivariateRealSolver;
 import org.apache.commons.math.exception.MathIllegalArgumentException;
 import org.apache.commons.math.exception.MathIllegalStateException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.events.EventHandler;
 import org.apache.commons.math.ode.sampling.AbstractStepInterpolator;
@@ -451,14 +450,11 @@ public class GraggBulirschStoerIntegrato
    * @param yTmp placeholder for one state vector
    * @return true if computation was done properly,
    *         false if stability check failed before end of computation
-   * @throws MathUserException this exception is propagated to the caller if the
-   * underlying user function triggers one
    */
   private boolean tryStep(final double t0, final double[] y0, final double step, final int k,
                           final double[] scale, final double[][] f,
                           final double[] yMiddle, final double[] yEnd,
-                          final double[] yTmp)
-    throws MathUserException {
+                          final double[] yTmp) {
 
     final int    n        = sequence[k];
     final double subStep  = step / n;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -70,8 +69,7 @@ class HighamHall54StepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-    throws MathUserException {
+                                          final double oneMinusThetaH) {
 
     final double theta2 = theta * theta;
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/MidpointStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -80,8 +79,7 @@ class MidpointStepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-    throws MathUserException {
+                                          final double oneMinusThetaH) {
 
     final double coeff1    = oneMinusThetaH * theta;
     final double coeff2    = oneMinusThetaH * (1.0 + theta);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -85,8 +84,7 @@ class ThreeEighthesStepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
-                                          final double oneMinusThetaH)
-      throws MathUserException {
+                                          final double oneMinusThetaH) {
 
       final double fourTheta2 = 4 * theta * theta;
       final double s          = oneMinusThetaH / 8.0;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/AbstractStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -21,8 +21,6 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-import org.apache.commons.math.exception.MathUserException;
-
 /** This abstract class represents an interpolator over the last step
  * during an ODE integration.
  *
@@ -197,7 +195,7 @@ public abstract class AbstractStepInterp
   }
 
   /** {@inheritDoc} */
-   public StepInterpolator copy() throws MathUserException {
+   public StepInterpolator copy() {
 
      // finalize the step before performing copy
      finalizeStep();
@@ -326,15 +324,12 @@ public abstract class AbstractStepInterp
    * (theta is zero at the previous time step and one at the current time step)
    * @param oneMinusThetaH time gap between the interpolated time and
    * the current time
-   * @throws MathUserException this exception is propagated to the caller if the
-   * underlying user function triggers one
    */
   protected abstract void computeInterpolatedStateAndDerivatives(double theta,
-                                                                 double oneMinusThetaH)
-    throws MathUserException;
+                                                                 double oneMinusThetaH);
 
   /** {@inheritDoc} */
-  public double[] getInterpolatedState() throws MathUserException {
+  public double[] getInterpolatedState() {
 
       // lazy evaluation of the state
       if (dirtyState) {
@@ -349,7 +344,7 @@ public abstract class AbstractStepInterp
   }
 
   /** {@inheritDoc} */
-  public double[] getInterpolatedDerivatives() throws MathUserException {
+  public double[] getInterpolatedDerivatives() {
 
       // lazy evaluation of the state
       if (dirtyState) {
@@ -401,11 +396,8 @@ public abstract class AbstractStepInterp
    * Therefore, subclasses are not allowed not reimplement it, they
    * should rather reimplement <code>doFinalize</code>.</p>
 
-   * @throws MathUserException this exception is propagated to the
-   * caller if the underlying user function triggers one
    */
-  public final void finalizeStep()
-    throws MathUserException {
+  public final void finalizeStep() {
     if (! finalized) {
       doFinalize();
       finalized = true;
@@ -415,11 +407,8 @@ public abstract class AbstractStepInterp
   /**
    * Really finalize the step.
    * The default implementation of this method does nothing.
-   * @throws MathUserException this exception is propagated to the
-   * caller if the underlying user function triggers one
    */
-  protected void doFinalize()
-    throws MathUserException {
+  protected void doFinalize() {
   }
 
   /** {@inheritDoc} */
@@ -465,7 +454,7 @@ public abstract class AbstractStepInterp
     // finalize the step (and don't bother saving the now true flag)
     try {
       finalizeStep();
-    } catch (MathUserException e) {
+    } catch (Exception e) {
         IOException ioe = new IOException(e.getLocalizedMessage());
         ioe.initCause(e);
         throw ioe;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/FixedStepHandler.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 
 package org.apache.commons.math.ode.sampling;
 
-import org.apache.commons.math.exception.MathUserException;
 
 /**
  * This interface represents a handler that should be called after
@@ -55,8 +54,7 @@ public interface FixedStepHandler  {
    * provide at the end of the integration a complete array of all
    * steps), it should build a local copy store this copy.
    * @param isLast true if the step is the last one
-   * @throws MathUserException if some error condition is encountered
    */
-  void handleStep(double t, double[] y, double[] yDot, boolean isLast) throws MathUserException;
+  void handleStep(double t, double[] y, double[] yDot, boolean isLast);
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -22,7 +22,6 @@ import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.Arrays;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.linear.Array2DRowRealMatrix;
 import org.apache.commons.math.util.FastMath;
 
@@ -171,11 +170,8 @@ public class NordsieckStepInterpolator e
      * to be preserved across several calls.</p>
      * @return state vector at time {@link #getInterpolatedTime}
      * @see #getInterpolatedDerivatives()
-     * @throws MathUserException if this call induces an automatic
-     * step finalization that throws one
      */
-    public double[] getInterpolatedStateVariation()
-        throws MathUserException {
+    public double[] getInterpolatedStateVariation() {
         // compute and ignore interpolated state
         // to make sure state variation is computed as a side effect
         getInterpolatedState();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepInterpolator.java Tue Sep  6 19:17:52 2011
@@ -19,8 +19,6 @@ package org.apache.commons.math.ode.samp
 
 import java.io.Externalizable;
 
-import org.apache.commons.math.exception.MathUserException;
-
 /** This interface represents an interpolator over the last step
  * during an ODE integration.
  *
@@ -89,10 +87,8 @@ public interface StepInterpolator extend
    * to be preserved across several calls.</p>
    * @return state vector at time {@link #getInterpolatedTime}
    * @see #getInterpolatedDerivatives()
-   * @exception MathUserException if user code called from step interpolator
-   * finalization triggers one
    */
-  double[] getInterpolatedState() throws MathUserException;
+  double[] getInterpolatedState();
 
   /**
    * Get the derivatives of the state vector of the interpolated point.
@@ -101,11 +97,9 @@ public interface StepInterpolator extend
    * to be preserved across several calls.</p>
    * @return derivatives of the state vector at time {@link #getInterpolatedTime}
    * @see #getInterpolatedState()
-   * @exception MathUserException if user code called from step interpolator
-   * finalization triggers one
    * @since 2.0
    */
-  double[] getInterpolatedDerivatives() throws MathUserException;
+  double[] getInterpolatedDerivatives();
 
   /** Check if the natural integration direction is forward.
    * <p>This method provides the integration direction as specified by
@@ -123,10 +117,8 @@ public interface StepInterpolator extend
    * original one. Both can be used with different settings for
    * interpolated time without any side effect.</p>
    * @return a deep copy of the instance, which can be used independently.
-   * @exception MathUserException if user code called from step interpolator
-   * finalization triggers one
    * @see #setInterpolatedTime(double)
    */
-   StepInterpolator copy() throws MathUserException;
+   StepInterpolator copy();
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/sampling/StepNormalizer.java Tue Sep  6 19:17:52 2011
@@ -17,10 +17,6 @@
 
 package org.apache.commons.math.ode.sampling;
 
-import org.apache.commons.math.exception.MathUserException;
-import org.apache.commons.math.ode.sampling.FixedStepHandler;
-import org.apache.commons.math.ode.sampling.StepHandler;
-import org.apache.commons.math.ode.sampling.StepInterpolator;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.util.MathUtils;
 
@@ -194,11 +190,8 @@ public class StepNormalizer implements S
      * should build a local copy using the clone method and store this
      * copy.
      * @param isLast true if the step is the last one
-     * @throws MathUserException this exception is propagated to the
-     * caller if the underlying user function triggers one
      */
-    public void handleStep(final StepInterpolator interpolator,
-                           final boolean isLast) throws MathUserException {
+    public void handleStep(final StepInterpolator interpolator, final boolean isLast) {
         // The first time, update the last state with the start information.
         if (lastState == null) {
             firstTime = interpolator.getPreviousTime();
@@ -270,10 +263,8 @@ public class StepNormalizer implements S
     /**
      * Invokes the underlying step handler for the current normalized step.
      * @param isLast true if the step is the last one
-     * @throws MathUserException this exception is propagated to the
-     * caller if the underlying user function triggers one
      */
-    private void doNormalizedStep(boolean isLast) throws MathUserException {
+    private void doNormalizedStep(boolean isLast) {
         if (!bounds.firstIncluded() && firstTime == lastTime) {
             return;
         }

Modified: commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties (original)
+++ commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties Tue Sep  6 19:17:52 2011
@@ -66,7 +66,6 @@ EMPTY_STRING_FOR_IMAGINARY_CHARACTER = c
 ENDPOINTS_NOT_AN_INTERVAL = les bornes ne d\u00e9finissent pas un intervalle : [{0}, {1}]
 EQUAL_VERTICES_IN_SIMPLEX = sommets {0} et {1} \u00e9gaux dans la configuration du simplex
 EULER_ANGLES_SINGULARITY = singularit\u00e9 d''angles d''Euler
-EVALUATION_FAILED = erreur d''\u00e9valuation pour l''argument {0}
 EVALUATION = \u00e9valuation
 EXPANSION_FACTOR_SMALLER_THAN_ONE = facteur d''extension inf\u00e9rieur \u00e0 un ({0})
 FACTORIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le calcul de n!, or n = {0}

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/ContinuousOutputModelTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/ContinuousOutputModelTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/ContinuousOutputModelTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/ContinuousOutputModelTest.java Tue Sep  6 19:17:52 2011
@@ -19,7 +19,6 @@ package org.apache.commons.math.ode;
 
 import java.util.Random;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.nonstiff.DormandPrince54Integrator;
 import org.apache.commons.math.ode.nonstiff.DormandPrince853Integrator;
 import org.apache.commons.math.ode.sampling.DummyStepInterpolator;
@@ -84,8 +83,7 @@ public class ContinuousOutputModelTest {
       // theoretical solution: y[0] = cos(t), y[1] = sin(t)
       FirstOrderDifferentialEquations problem =
           new FirstOrderDifferentialEquations() {
-              public void computeDerivatives(double t, double[] y, double[] dot)
-                  throws MathUserException {
+              public void computeDerivatives(double t, double[] y, double[] dot) {
                   dot[0] = -y[1];
                   dot[1] =  y[0];
               }
@@ -130,8 +128,7 @@ public class ContinuousOutputModelTest {
   }
 
   @Test
-  public void testErrorConditions()
-    throws MathUserException {
+  public void testErrorConditions() {
 
       ContinuousOutputModel cm = new ContinuousOutputModel();
       cm.handleStep(buildInterpolator(0, new double[] { 0.0, 1.0, -2.0 }, 1), true);
@@ -151,8 +148,7 @@ public class ContinuousOutputModelTest {
   }
 
   private boolean checkAppendError(ContinuousOutputModel cm,
-                                   double t0, double[] y0, double t1)
-  throws MathUserException {
+                                   double t0, double[] y0, double t1) {
       try {
           ContinuousOutputModel otherCm = new ContinuousOutputModel();
           otherCm.handleStep(buildInterpolator(t0, y0, t1), true);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/TestProblemHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/TestProblemHandler.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/TestProblemHandler.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/TestProblemHandler.java Tue Sep  6 19:17:52 2011
@@ -17,8 +17,6 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.exception.MathUserException;
-import org.apache.commons.math.ode.ODEIntegrator;
 import org.apache.commons.math.ode.sampling.StepHandler;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 import org.apache.commons.math.util.FastMath;
@@ -67,9 +65,7 @@ public class TestProblemHandler
     expectedStepStart = Double.NaN;
   }
 
-  public void handleStep(StepInterpolator interpolator,
-                         boolean isLast)
-    throws MathUserException {
+  public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
     double start = integrator.getCurrentStepStart();
     if (FastMath.abs((start - problem.getInitialTime()) / integrator.getCurrentSignedStepsize()) > 0.001) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/OverlappingEventsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/OverlappingEventsTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/OverlappingEventsTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/OverlappingEventsTest.java Tue Sep  6 19:17:52 2011
@@ -21,7 +21,6 @@ import java.util.List;
 
 import org.apache.commons.math.analysis.solvers.BaseSecantSolver;
 import org.apache.commons.math.analysis.solvers.PegasusSolver;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.nonstiff.DormandPrince853Integrator;
@@ -114,7 +113,7 @@ public class OverlappingEventsTest imple
     }
 
     /** {@inheritDoc} */
-    public void computeDerivatives(double t, double[] y, double[] yDot) throws MathUserException {
+    public void computeDerivatives(double t, double[] y, double[] yDot) {
         yDot[0] = 1.0;
         yDot[1] = 2.0;
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaIntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -19,7 +19,6 @@ package org.apache.commons.math.ode.nons
 
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.NumberIsTooSmallException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
@@ -248,8 +247,7 @@ public class ClassicalRungeKuttaIntegrat
     public void reset() {
       maxError = 0;
     }
-    public void handleStep(StepInterpolator interpolator,
-                           boolean isLast) throws MathUserException {
+    public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
       double[] interpolatedY = interpolator.getInterpolatedState ();
       double[] theoreticalY  = pb.computeTheoreticalState(interpolator.getCurrentTime());

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54IntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -18,7 +18,6 @@
 package org.apache.commons.math.ode.nonstiff;
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.NumberIsTooSmallException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.TestProblem1;
@@ -272,9 +271,7 @@ public class DormandPrince54IntegratorTe
       nbSteps = 0;
       maxError = 0;
     }
-    public void handleStep(StepInterpolator interpolator,
-                           boolean isLast)
-    throws MathUserException {
+    public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
       ++nbSteps;
       for (int a = 1; a < 10; ++a) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince54StepInterpolatorTest.java Tue Sep  6 19:17:52 2011
@@ -25,7 +25,6 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Random;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -113,8 +112,7 @@ public class DormandPrince54StepInterpol
                                                                       scalAbsoluteTolerance,
                                                                       scalRelativeTolerance);
       integ.addStepHandler(new StepHandler() {
-        public void handleStep(StepInterpolator interpolator, boolean isLast)
-          throws MathUserException {
+        public void handleStep(StepInterpolator interpolator, boolean isLast) {
               StepInterpolator cloned = interpolator.copy();
               double tA = cloned.getPreviousTime();
               double tB = cloned.getCurrentTime();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853IntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -18,7 +18,6 @@
 package org.apache.commons.math.ode.nonstiff;
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.NumberIsTooSmallException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
@@ -296,9 +295,7 @@ public class DormandPrince853IntegratorT
       nbSteps = 0;
       maxError = 0;
     }
-    public void handleStep(StepInterpolator interpolator,
-                           boolean isLast)
-    throws MathUserException {
+    public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
       ++nbSteps;
       for (int a = 1; a < 10; ++a) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/DormandPrince853StepInterpolatorTest.java Tue Sep  6 19:17:52 2011
@@ -25,7 +25,6 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Random;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -113,8 +112,7 @@ public class DormandPrince853StepInterpo
                                                                       scalAbsoluteTolerance,
                                                                       scalRelativeTolerance);
     integ.addStepHandler(new StepHandler() {
-        public void handleStep(StepInterpolator interpolator, boolean isLast)
-        throws MathUserException {
+        public void handleStep(StepInterpolator interpolator, boolean isLast) {
             StepInterpolator cloned = interpolator.copy();
             double tA = cloned.getPreviousTime();
             double tB = cloned.getCurrentTime();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerStepInterpolatorTest.java Tue Sep  6 19:17:52 2011
@@ -25,7 +25,6 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Random;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.TestProblem1;
 import org.apache.commons.math.ode.TestProblem3;
@@ -56,8 +55,7 @@ public class EulerStepInterpolatorTest {
   }
 
   @Test
-  public void interpolationAtBounds()
-    throws MathUserException {
+  public void interpolationAtBounds() {
 
     double   t0 = 0;
     double[] y0 = {0.0, 1.0, -2.0};
@@ -93,8 +91,7 @@ public class EulerStepInterpolatorTest {
   }
 
   @Test
-  public void interpolationInside()
-  throws MathUserException {
+  public void interpolationInside() {
 
     double[]   y    =   { 1.0, 3.0, -4.0 };
     double[][] yDot = { { 1.0, 2.0, -2.0 } };

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillIntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -19,7 +19,6 @@ package org.apache.commons.math.ode.nons
 
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.TestProblem1;
@@ -183,8 +182,7 @@ public class GillIntegratorTest {
     public void reset() {
       maxError = 0;
     }
-    public void handleStep(StepInterpolator interpolator,
-                           boolean isLast) throws MathUserException {
+    public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
       double[] interpolatedY = interpolator.getInterpolatedState();
       double[] theoreticalY  = pb.computeTheoreticalState(interpolator.getCurrentTime());

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerIntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -18,7 +18,6 @@
 package org.apache.commons.math.ode.nonstiff;
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.NumberIsTooSmallException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
@@ -275,7 +274,7 @@ public class GraggBulirschStoerIntegrato
 
           public void reset() {}
 
-          public void handleStep(StepInterpolator interpolator, boolean isLast) throws MathUserException {
+          public void handleStep(StepInterpolator interpolator, boolean isLast) {
               double t = interpolator.getCurrentTime();
               interpolator.setInterpolatedTime(t);
               double[] y = interpolator.getInterpolatedState();
@@ -308,9 +307,7 @@ public class GraggBulirschStoerIntegrato
       nbSteps = 0;
       maxError = 0;
     }
-    public void handleStep(StepInterpolator interpolator,
-                           boolean isLast)
-    throws MathUserException {
+    public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
       ++nbSteps;
       for (int a = 1; a < 100; ++a) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolatorTest.java Tue Sep  6 19:17:52 2011
@@ -25,7 +25,6 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Random;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -115,8 +114,7 @@ public class GraggBulirschStoerStepInter
                                                                           scalAbsoluteTolerance,
                                                                           scalRelativeTolerance);
     integ.addStepHandler(new StepHandler() {
-        public void handleStep(StepInterpolator interpolator, boolean isLast)
-        throws MathUserException {
+        public void handleStep(StepInterpolator interpolator, boolean isLast) {
             StepInterpolator cloned = interpolator.copy();
             double tA = cloned.getPreviousTime();
             double tB = cloned.getCurrentTime();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -19,7 +19,7 @@ package org.apache.commons.math.ode.nons
 
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.exception.MathIllegalNumberException;
 import org.apache.commons.math.exception.NumberIsTooSmallException;
 import org.apache.commons.math.exception.TooManyEvaluationsException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
@@ -43,12 +43,11 @@ public class HighamHall54IntegratorTest 
           new HighamHall54Integrator(0.0, 1.0, 1.0e-10, 1.0e-10);
       FirstOrderDifferentialEquations equations =
           new FirstOrderDifferentialEquations() {
-            public void computeDerivatives(double t, double[] y, double[] dot)
-            throws MathUserException {
+            public void computeDerivatives(double t, double[] y, double[] dot) {
             if (t < -0.5) {
-                throw new MathUserException(LocalizedFormats.SIMPLE_MESSAGE, "oops");
+                throw new LocalException(t);
             } else {
-                throw new MathUserException(new RuntimeException("oops"));
+                throw new RuntimeException("oops");
            }
           }
           public int getDimension() {
@@ -59,14 +58,14 @@ public class HighamHall54IntegratorTest 
       try  {
         integrator.integrate(equations, -1.0, new double[1], 0.0, new double[1]);
         Assert.fail("an exception should have been thrown");
-      } catch(MathUserException de) {
+      } catch(LocalException de) {
         // expected behavior
       }
 
       try  {
         integrator.integrate(equations, 0.0, new double[1], 1.0, new double[1]);
         Assert.fail("an exception should have been thrown");
-      } catch(MathUserException de) {
+      } catch(RuntimeException de) {
         // expected behavior
       }
 
@@ -187,8 +186,8 @@ public class HighamHall54IntegratorTest 
 
   }
 
-  @Test
-  public void testEventsErrors() throws Exception {
+  @Test(expected=LocalException.class)
+  public void testEventsErrors() {
 
       final TestProblem1 pb = new TestProblem1();
       double minStep = 0;
@@ -210,7 +209,7 @@ public class HighamHall54IntegratorTest 
           double middle = (pb.getInitialTime() + pb.getFinalTime()) / 2;
           double offset = t - middle;
           if (offset > 0) {
-            throw new MathUserException(LocalizedFormats.EVALUATION_FAILED, t);
+            throw new LocalException(t);
           }
           return offset;
         }
@@ -218,17 +217,19 @@ public class HighamHall54IntegratorTest 
         }
       }, Double.POSITIVE_INFINITY, 1.0e-8 * maxStep, 1000);
 
-      try {
-        integ.integrate(pb,
-                        pb.getInitialTime(), pb.getInitialState(),
-                        pb.getFinalTime(), new double[pb.getDimension()]);
-        Assert.fail("an exception should have been thrown");
-      } catch (MathUserException ie) {
-        // expected behavior
-      }
+      integ.integrate(pb,
+                      pb.getInitialTime(), pb.getInitialState(),
+                      pb.getFinalTime(), new double[pb.getDimension()]);
 
   }
 
+  private static class LocalException extends MathIllegalNumberException {
+    private static final long serialVersionUID = 3041292643919807960L;
+    protected LocalException(Number wrong) {
+        super(LocalizedFormats.SIMPLE_MESSAGE, wrong);
+    }
+  }
+
   @Test
   public void testEventsNoConvergence() throws Exception {
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54StepInterpolatorTest.java Tue Sep  6 19:17:52 2011
@@ -25,7 +25,6 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Random;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.ContinuousOutputModel;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -113,8 +112,7 @@ public class HighamHall54StepInterpolato
                                                               scalAbsoluteTolerance,
                                                               scalRelativeTolerance);
     integ.addStepHandler(new StepHandler() {
-        public void handleStep(StepInterpolator interpolator, boolean isLast)
-        throws MathUserException {
+        public void handleStep(StepInterpolator interpolator, boolean isLast) {
             StepInterpolator cloned = interpolator.copy();
             double tA = cloned.getPreviousTime();
             double tB = cloned.getCurrentTime();

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ThreeEighthesIntegratorTest.java Tue Sep  6 19:17:52 2011
@@ -19,7 +19,6 @@ package org.apache.commons.math.ode.nons
 
 
 import org.apache.commons.math.exception.DimensionMismatchException;
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.TestProblem1;
@@ -175,8 +174,7 @@ public class ThreeEighthesIntegratorTest
       maxError = 0;
     }
 
-    public void handleStep(StepInterpolator interpolator,
-                           boolean isLast) throws MathUserException {
+    public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
       double[] interpolatedY = interpolator.getInterpolatedState();
       double[] theoreticalY  = pb.computeTheoreticalState(interpolator.getCurrentTime());

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/DummyStepInterpolatorTest.java Tue Sep  6 19:17:52 2011
@@ -18,16 +18,14 @@
 package org.apache.commons.math.ode.sampling;
 
 
-import java.io.ByteArrayOutputStream;
 import java.io.ByteArrayInputStream;
-import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 
-import org.apache.commons.math.exception.MathUserException;
+import org.apache.commons.math.exception.MathIllegalStateException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
-import org.apache.commons.math.ode.sampling.AbstractStepInterpolator;
-import org.apache.commons.math.ode.sampling.DummyStepInterpolator;
 import org.apache.commons.math.util.FastMath;
 import org.junit.Assert;
 import org.junit.Test;
@@ -35,7 +33,7 @@ import org.junit.Test;
 public class DummyStepInterpolatorTest {
 
   @Test
-  public void testNoReset() throws MathUserException {
+  public void testNoReset() {
 
     double[]   y    =   { 0.0, 1.0, -2.0 };
     DummyStepInterpolator interpolator = new DummyStepInterpolator(y, new double[y.length], true);
@@ -51,8 +49,7 @@ public class DummyStepInterpolatorTest {
   }
 
   @Test
-  public void testFixedState()
-    throws MathUserException {
+  public void testFixedState() {
 
     double[]   y    =   { 1.0, 3.0, -4.0 };
     DummyStepInterpolator interpolator = new DummyStepInterpolator(y, new double[y.length], true);
@@ -76,7 +73,7 @@ public class DummyStepInterpolatorTest {
 
   @Test
   public void testSerialization()
-  throws MathUserException, IOException, ClassNotFoundException {
+  throws IOException, ClassNotFoundException {
 
     double[]   y    =   { 0.0, 1.0, -2.0 };
     DummyStepInterpolator interpolator = new DummyStepInterpolator(y, new double[y.length], true);
@@ -132,8 +129,8 @@ public class DummyStepInterpolatorTest {
           super(y, new double[y.length], forward);
       }
       @Override
-      protected void doFinalize() throws MathUserException {
-          throw new MathUserException(LocalizedFormats.SIMPLE_MESSAGE, "");
+      protected void doFinalize() {
+          throw new MathIllegalStateException(LocalizedFormats.SIMPLE_MESSAGE, "");
       }
   }
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepInterpolatorTestUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepInterpolatorTestUtils.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepInterpolatorTestUtils.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepInterpolatorTestUtils.java Tue Sep  6 19:17:52 2011
@@ -17,7 +17,6 @@
 package org.apache.commons.math.ode.sampling;
 
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.TestProblemAbstract;
 import org.apache.commons.math.util.FastMath;
@@ -30,8 +29,7 @@ public class StepInterpolatorTestUtils {
                                                    final double threshold) {
         integrator.addStepHandler(new StepHandler() {
 
-            public void handleStep(StepInterpolator interpolator, boolean isLast)
-                throws MathUserException {
+            public void handleStep(StepInterpolator interpolator, boolean isLast) {
 
                 final double h = 0.001 * (interpolator.getCurrentTime() - interpolator.getPreviousTime());
                 final double t = interpolator.getCurrentTime() - 300 * h;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepNormalizerOutputTestBase.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepNormalizerOutputTestBase.java?rev=1165792&r1=1165791&r2=1165792&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepNormalizerOutputTestBase.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/sampling/StepNormalizerOutputTestBase.java Tue Sep  6 19:17:52 2011
@@ -5,7 +5,6 @@ import static org.junit.Assert.assertArr
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.nonstiff.GraggBulirschStoerIntegrator;
@@ -208,14 +207,12 @@ public abstract class StepNormalizerOutp
     }
 
     /** {@inheritDoc} */
-    public void computeDerivatives(double t, double[] y, double[] yDot)
-        throws MathUserException {
+    public void computeDerivatives(double t, double[] y, double[] yDot) {
         yDot[0] = y[0];
     }
 
     /** {@inheritDoc} */
-    public void handleStep(double t, double[] y, double[] yDot, boolean isLast)
-        throws MathUserException {
+    public void handleStep(double t, double[] y, double[] yDot, boolean isLast) {
         output.add(t);
     }
 }



Mime
View raw message