commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1037328 [4/5] - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/integration/ main/java/org/apache/commons/math/analysis/solvers/ main/java/org/apache/commons/math/ex...
Date Sat, 20 Nov 2010 21:01:55 GMT
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/QuinticFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/QuinticFunction.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/QuinticFunction.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/QuinticFunction.java Sat Nov 20 21:01:50 2010
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
-
 /**
  * Auxiliary class for testing solvers.
  *
@@ -28,13 +26,13 @@ public class QuinticFunction implements 
     /* Evaluate quintic.
      * @see org.apache.commons.math.UnivariateRealFunction#value(double)
      */
-    public double value(double x) throws FunctionEvaluationException {
+    public double value(double x) {
         return (x-1)*(x-0.5)*x*(x+0.5)*(x+1);
     }
 
     public UnivariateRealFunction derivative() {
         return new UnivariateRealFunction() {
-            public double value(double x) throws FunctionEvaluationException {
+            public double value(double x) {
                 return (5*x*x-3.75)*x*x+0.25;
             }
         };

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SinFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SinFunction.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SinFunction.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SinFunction.java Sat Nov 20 21:01:50 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.FastMath;
 
 /**
@@ -34,7 +33,7 @@ public class SinFunction implements Diff
     /* Evaluate sinus fuction.
      * @see org.apache.commons.math.UnivariateRealFunction#value(double)
      */
-    public double value(double x) throws FunctionEvaluationException {
+    public double value(double x) {
         return FastMath.sin(x);
     }
 
@@ -42,7 +41,7 @@ public class SinFunction implements Diff
      */
     public UnivariateRealFunction derivative() {
         return new UnivariateRealFunction() {
-            public double value(double x) throws FunctionEvaluationException {
+            public double value(double x) {
                 return FastMath.cos(x);
             }
         };

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java Sat Nov 20 21:01:50 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
+import org.apache.commons.math.exception.MathUserException;
 
 /**
  * Auxiliary class for testing optimizers.
@@ -43,7 +43,7 @@ public class SumSincFunction implements 
      * @param point Argument.
      * @return the value of this function at point {@code x}.
      */
-    public double value(double[] point) throws FunctionEvaluationException {
+    public double value(double[] point) throws MathUserException {
         double sum = 0;
         for (int i = 0, max = point.length; i < max; i++) {
             final double x = point[i];
@@ -58,7 +58,7 @@ public class SumSincFunction implements 
      */
     public MultivariateRealFunction partialDerivative(final int k) {
         return new MultivariateRealFunction() {
-            public double value(double[] point) throws FunctionEvaluationException {
+            public double value(double[] point) throws MathUserException {
                 return sincDeriv.value(point[k]);
             }
         };
@@ -70,7 +70,7 @@ public class SumSincFunction implements 
     public MultivariateVectorialFunction gradient() {
         return new MultivariateVectorialFunction() {
             public double[] value(double[] point)
-                throws FunctionEvaluationException {
+                throws MathUserException {
                 final int n = point.length;
                 final double[] r = new double[n];
                 for (int i = 0; i < n; i++) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java Sat Nov 20 21:01:50 2010
@@ -19,12 +19,12 @@ package org.apache.commons.math.analysis
 import java.util.Random;
 
 import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.MathException;
 import org.apache.commons.math.analysis.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.analysis.polynomials.PolynomialFunction;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.util.FastMath;
 
 import junit.framework.*;
@@ -77,7 +77,7 @@ extends TestCase {
     }
 
     public void testExactIntegration()
-        throws ConvergenceException, FunctionEvaluationException {
+        throws ConvergenceException, MathUserException {
         Random random = new Random(86343623467878363l);
         for (int n = 2; n < 6; ++n) {
             LegendreGaussIntegrator integrator =

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java Sat Nov 20 21:01:50 2010
@@ -21,6 +21,7 @@ import org.apache.commons.math.exception
 import org.apache.commons.math.analysis.Expm1Function;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.util.FastMath;
 
 import junit.framework.TestCase;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/Array2DRowRealMatrixTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/Array2DRowRealMatrixTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/Array2DRowRealMatrixTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/Array2DRowRealMatrixTest.java Sat Nov 20 21:01:50 2010
@@ -19,6 +19,7 @@ package org.apache.commons.math.linear;
 import junit.framework.TestCase;
 
 import org.apache.commons.math.TestUtils;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.exception.MatrixDimensionMismatchException;
 import org.apache.commons.math.exception.OutOfRangeException;
@@ -876,7 +877,7 @@ public final class Array2DRowRealMatrixT
 
     }
 
-    public void testWalk() {
+    public void testWalk() throws MathUserException {
         int rows    = 150;
         int columns = 75;
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java Sat Nov 20 21:01:50 2010
@@ -21,7 +21,6 @@ import java.util.Iterator;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.util.FastMath;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockFieldMatrixTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockFieldMatrixTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockFieldMatrixTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockFieldMatrixTest.java Sat Nov 20 21:01:50 2010
@@ -22,6 +22,7 @@ import java.util.Random;
 import junit.framework.TestCase;
 
 import org.apache.commons.math.TestUtils;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.fraction.Fraction;
 import org.apache.commons.math.fraction.FractionField;
 import org.apache.commons.math.exception.MatrixDimensionMismatchException;
@@ -1197,7 +1198,7 @@ public final class BlockFieldMatrixTest 
 
     }
 
-    public void testWalk() {
+    public void testWalk() throws MathUserException {
         int rows    = 150;
         int columns = 75;
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/BlockRealMatrixTest.java Sat Nov 20 21:01:50 2010
@@ -22,6 +22,7 @@ import java.util.Random;
 import junit.framework.TestCase;
 
 import org.apache.commons.math.TestUtils;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.exception.MatrixDimensionMismatchException;
 import org.apache.commons.math.exception.OutOfRangeException;
@@ -1099,7 +1100,7 @@ public final class BlockRealMatrixTest e
 
     }
 
-    public void testWalk() {
+    public void testWalk() throws MathUserException {
         int rows    = 150;
         int columns = 75;
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/FieldMatrixImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/FieldMatrixImplTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/FieldMatrixImplTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/FieldMatrixImplTest.java Sat Nov 20 21:01:50 2010
@@ -19,6 +19,7 @@ package org.apache.commons.math.linear;
 import junit.framework.TestCase;
 
 import org.apache.commons.math.TestUtils;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.fraction.Fraction;
 import org.apache.commons.math.fraction.FractionField;
 import org.apache.commons.math.exception.MatrixDimensionMismatchException;
@@ -884,7 +885,7 @@ public final class FieldMatrixImplTest e
 
     }
 
-    public void testWalk() {
+    public void testWalk() throws MathUserException {
         int rows    = 150;
         int columns = 75;
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRDecompositionImplTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRDecompositionImplTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRDecompositionImplTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRDecompositionImplTest.java Sat Nov 20 21:01:50 2010
@@ -19,6 +19,8 @@ package org.apache.commons.math.linear;
 
 import java.util.Random;
 
+import org.apache.commons.math.exception.MathUserException;
+
 import junit.framework.TestCase;
 
 public class QRDecompositionImplTest extends TestCase {
@@ -51,8 +53,9 @@ public class QRDecompositionImplTest ext
         super(name);
     }
 
-    /** test dimensions */
-    public void testDimensions() {
+    /** test dimensions 
+     * @throws MathUserException */
+    public void testDimensions() throws MathUserException {
         checkDimension(MatrixUtils.createRealMatrix(testData3x3NonSingular));
 
         checkDimension(MatrixUtils.createRealMatrix(testData4x3));
@@ -77,8 +80,9 @@ public class QRDecompositionImplTest ext
         assertEquals(columns, qr.getR().getColumnDimension());
     }
 
-    /** test A = QR */
-    public void testAEqualQR() {
+    /** test A = QR 
+     * @throws MathUserException */
+    public void testAEqualQR() throws MathUserException {
         checkAEqualQR(MatrixUtils.createRealMatrix(testData3x3NonSingular));
 
         checkAEqualQR(MatrixUtils.createRealMatrix(testData3x3Singular));
@@ -102,8 +106,9 @@ public class QRDecompositionImplTest ext
         assertEquals(0, norm, normTolerance);
     }
 
-    /** test the orthogonality of Q */
-    public void testQOrthogonal() {
+    /** test the orthogonality of Q 
+     * @throws MathUserException */
+    public void testQOrthogonal() throws MathUserException {
         checkQOrthogonal(MatrixUtils.createRealMatrix(testData3x3NonSingular));
 
         checkQOrthogonal(MatrixUtils.createRealMatrix(testData3x3Singular));
@@ -129,7 +134,7 @@ public class QRDecompositionImplTest ext
     }
 
     /** test that R is upper triangular */
-    public void testRUpperTriangular() {
+    public void testRUpperTriangular() throws MathUserException {
         RealMatrix matrix = MatrixUtils.createRealMatrix(testData3x3NonSingular);
         checkUpperTriangular(new QRDecompositionImpl(matrix).getR());
 
@@ -153,7 +158,7 @@ public class QRDecompositionImplTest ext
 
     }
 
-    private void checkUpperTriangular(RealMatrix m) {
+    private void checkUpperTriangular(RealMatrix m) throws MathUserException {
         m.walkInOptimizedOrder(new DefaultRealMatrixPreservingVisitor() {
             @Override
             public void visit(int row, int column, double value) {
@@ -164,8 +169,9 @@ public class QRDecompositionImplTest ext
         });
     }
 
-    /** test that H is trapezoidal */
-    public void testHTrapezoidal() {
+    /** test that H is trapezoidal 
+     * @throws MathUserException */
+    public void testHTrapezoidal() throws MathUserException {
         RealMatrix matrix = MatrixUtils.createRealMatrix(testData3x3NonSingular);
         checkTrapezoidal(new QRDecompositionImpl(matrix).getH());
 
@@ -189,7 +195,7 @@ public class QRDecompositionImplTest ext
 
     }
 
-    private void checkTrapezoidal(RealMatrix m) {
+    private void checkTrapezoidal(RealMatrix m) throws MathUserException {
         m.walkInOptimizedOrder(new DefaultRealMatrixPreservingVisitor() {
             @Override
             public void visit(int row, int column, double value) {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRSolverTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRSolverTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/QRSolverTest.java Sat Nov 20 21:01:50 2010
@@ -19,6 +19,7 @@ package org.apache.commons.math.linear;
 
 import java.util.Random;
 
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.SingularMatrixException;
 import junit.framework.TestCase;
 
@@ -159,7 +160,7 @@ public class QRSolverTest extends TestCa
 
     }
 
-    public void testOverdetermined() {
+    public void testOverdetermined() throws MathUserException {
         final Random r    = new Random(5559252868205245l);
         int          p    = (7 * BlockRealMatrix.BLOCK_SIZE) / 4;
         int          q    = (5 * BlockRealMatrix.BLOCK_SIZE) / 4;
@@ -182,7 +183,7 @@ public class QRSolverTest extends TestCa
 
     }
 
-    public void testUnderdetermined() {
+    public void testUnderdetermined() throws MathUserException {
         final Random r    = new Random(42185006424567123l);
         int          p    = (5 * BlockRealMatrix.BLOCK_SIZE) / 4;
         int          q    = (7 * BlockRealMatrix.BLOCK_SIZE) / 4;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/SparseRealVectorTest.java Sat Nov 20 21:01:50 2010
@@ -21,7 +21,6 @@ import java.util.Iterator;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.util.FastMath;

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -20,8 +20,8 @@ package org.apache.commons.math.ode;
 import junit.framework.*;
 import java.util.Random;
 
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.ContinuousOutputModel;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.nonstiff.DormandPrince54Integrator;
@@ -40,7 +40,7 @@ public class ContinuousOutputModelTest
   }
 
   public void testBoundaries()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
     integ.addStepHandler(new ContinuousOutputModel());
     integ.integrate(pb,
                     pb.getInitialTime(), pb.getInitialState(),
@@ -52,7 +52,7 @@ public class ContinuousOutputModelTest
   }
 
   public void testRandomAccess()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     ContinuousOutputModel cm = new ContinuousOutputModel();
     integ.addStepHandler(cm);
@@ -81,14 +81,14 @@ public class ContinuousOutputModelTest
   }
 
   public void testModelsMerging()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
       // theoretical solution: y[0] = cos(t), y[1] = sin(t)
       FirstOrderDifferentialEquations problem =
           new FirstOrderDifferentialEquations() {
               private static final long serialVersionUID = 2472449657345878299L;
               public void computeDerivatives(double t, double[] y, double[] dot)
-                  throws DerivativeException {
+                  throws MathUserException {
                   dot[0] = -y[1];
                   dot[1] =  y[0];
               }
@@ -133,7 +133,7 @@ public class ContinuousOutputModelTest
   }
 
   public void testErrorConditions()
-    throws DerivativeException {
+    throws MathUserException {
 
       ContinuousOutputModel cm = new ContinuousOutputModel();
       cm.handleStep(buildInterpolator(0, new double[] { 0.0, 1.0, -2.0 }, 1), true);
@@ -154,7 +154,7 @@ public class ContinuousOutputModelTest
 
   private boolean checkAppendError(ContinuousOutputModel cm,
                                    double t0, double[] y0, double t1)
-  throws DerivativeException {
+  throws MathUserException {
       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/FirstOrderConverterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/FirstOrderConverterTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/FirstOrderConverterTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/FirstOrderConverterTest.java Sat Nov 20 21:01:50 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderConverter;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.SecondOrderDifferentialEquations;
@@ -42,7 +42,7 @@ public class FirstOrderConverterTest
   }
 
   public void testDecreasingSteps()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     double previousError = Double.NaN;
     for (int i = 0; i < 10; ++i) {
@@ -59,14 +59,14 @@ public class FirstOrderConverterTest
   }
 
   public void testSmallStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
     double error = integrateWithSpecifiedStep(4.0, 0.0, 1.0, 1.0e-4)
                    - FastMath.sin(4.0);
     assertTrue(FastMath.abs(error) < 1.0e-10);
   }
 
   public void testBigStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
     double error = integrateWithSpecifiedStep(4.0, 0.0, 1.0, 0.5)
                    - FastMath.sin(4.0);
     assertTrue(FastMath.abs(error) > 0.1);
@@ -100,7 +100,7 @@ public class FirstOrderConverterTest
   private double integrateWithSpecifiedStep(double omega,
                                             double t0, double t,
                                             double step)
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     double[] y0 = new double[2];
     y0[0] = FastMath.sin(omega * t0);
     y0[1] = omega * FastMath.cos(omega * t0);

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.ode;
 
-import org.apache.commons.math.ode.DerivativeException;
+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;
@@ -73,7 +73,7 @@ public class TestProblemHandler
 
   public void handleStep(StepInterpolator interpolator,
                          boolean isLast)
-    throws DerivativeException {
+    throws MathUserException {
 
     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/EventStateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/EventStateTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/EventStateTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/events/EventStateTest.java Sat Nov 20 21:01:50 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.ode.even
 import junit.framework.Assert;
 
 import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.sampling.AbstractStepInterpolator;
 import org.apache.commons.math.ode.sampling.DummyStepInterpolator;
 import org.junit.Test;
@@ -30,7 +30,7 @@ public class EventStateTest {
     // JIRA: MATH-322
     @Test
     public void closeEvents()
-        throws EventException, ConvergenceException, DerivativeException {
+        throws EventException, ConvergenceException, MathUserException {
 
         final double r1  = 90.0;
         final double r2  = 135.0;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobiansTest.java Sat Nov 20 21:01:50 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.ode.jacobians;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.nonstiff.DormandPrince54Integrator;
@@ -30,7 +30,7 @@ public class FirstOrderIntegratorWithJac
 
     @Test
     public void testLowAccuracyExternalDifferentiation()
-        throws IntegratorException, DerivativeException {
+        throws IntegratorException, MathUserException {
         // this test does not really test FirstOrderIntegratorWithJacobians,
         // it only shows that WITHOUT this class, attempting to recover
         // the jacobians from external differentiation on simple integration
@@ -63,7 +63,7 @@ public class FirstOrderIntegratorWithJac
 
     @Test
     public void testHighAccuracyExternalDifferentiation()
-        throws IntegratorException, DerivativeException {
+        throws IntegratorException, MathUserException {
         FirstOrderIntegrator integ =
             new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-10, 1.0e-10 }, new double[] { 1.0e-10, 1.0e-10 });
         double hP = 1.0e-12;
@@ -91,7 +91,7 @@ public class FirstOrderIntegratorWithJac
 
     @Test
     public void testInternalDifferentiation()
-        throws IntegratorException, DerivativeException {
+        throws IntegratorException, MathUserException {
         FirstOrderIntegrator integ =
             new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-4, 1.0e-4 }, new double[] { 1.0e-4, 1.0e-4 });
         double hP = 1.0e-12;
@@ -124,7 +124,7 @@ public class FirstOrderIntegratorWithJac
 
     @Test
     public void testAnalyticalDifferentiation()
-        throws IntegratorException, DerivativeException {
+        throws IntegratorException, MathUserException {
         FirstOrderIntegrator integ =
             new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-4, 1.0e-4 }, new double[] { 1.0e-4, 1.0e-4 });
         SummaryStatistics residualsP0 = new SummaryStatistics();
@@ -153,7 +153,7 @@ public class FirstOrderIntegratorWithJac
     }
 
     @Test
-    public void testFinalResult() throws IntegratorException, DerivativeException {
+    public void testFinalResult() throws IntegratorException, MathUserException {
         FirstOrderIntegrator integ =
             new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-10, 1.0e-10 }, new double[] { 1.0e-10, 1.0e-10 });
         double[] y = new double[] { 0.0, 1.0 };
@@ -180,7 +180,7 @@ public class FirstOrderIntegratorWithJac
     }
 
     @Test
-    public void testStepHandlerResult() throws IntegratorException, DerivativeException {
+    public void testStepHandlerResult() throws IntegratorException, MathUserException {
         FirstOrderIntegrator integ =
             new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-10, 1.0e-10 }, new double[] { 1.0e-10, 1.0e-10 });
         double[] y = new double[] { 0.0, 1.0 };
@@ -200,7 +200,7 @@ public class FirstOrderIntegratorWithJac
             }
 
             public void handleStep(StepInterpolatorWithJacobians interpolator, boolean isLast)
-                throws DerivativeException {
+                throws MathUserException {
                 double     t     = interpolator.getCurrentTime();
                 double[]   y     = interpolator.getInterpolatedY();
                 double[][] dydy0 = interpolator.getInterpolatedDyDy0();
@@ -244,7 +244,7 @@ public class FirstOrderIntegratorWithJac
     }
 
     @Test
-    public void testEventHandler() throws IntegratorException, DerivativeException {
+    public void testEventHandler() throws IntegratorException, MathUserException {
         FirstOrderIntegrator integ =
             new DormandPrince54Integrator(1.0e-8, 100.0, new double[] { 1.0e-10, 1.0e-10 }, new double[] { 1.0e-10, 1.0e-10 });
         double[] y = new double[] { 0.0, 1.0 };

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegratorTest.java Sat Nov 20 21:01:50 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.ode.nons
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem1;
@@ -33,7 +33,7 @@ import org.junit.Test;
 public class AdamsBashforthIntegratorTest {
 
     @Test(expected=IntegratorException.class)
-    public void dimensionCheck() throws DerivativeException, IntegratorException {
+    public void dimensionCheck() throws MathUserException, IntegratorException {
         TestProblem1 pb = new TestProblem1();
         FirstOrderIntegrator integ =
             new AdamsBashforthIntegrator(2, 0.0, 1.0, 1.0e-10, 1.0e-10);
@@ -43,7 +43,7 @@ public class AdamsBashforthIntegratorTes
     }
 
     @Test(expected=IntegratorException.class)
-    public void testMinStep() throws DerivativeException, IntegratorException {
+    public void testMinStep() throws MathUserException, IntegratorException {
 
           TestProblem1 pb = new TestProblem1();
           double minStep = 0.1 * (pb.getFinalTime() - pb.getInitialTime());
@@ -64,7 +64,7 @@ public class AdamsBashforthIntegratorTes
 
     @Test
     public void testIncreasingTolerance()
-        throws DerivativeException, IntegratorException {
+        throws MathUserException, IntegratorException {
 
         int previousCalls = Integer.MAX_VALUE;
         for (int i = -12; i < -5; ++i) {
@@ -99,8 +99,8 @@ public class AdamsBashforthIntegratorTes
 
     }
 
-    @Test(expected = DerivativeException.class)
-    public void exceedMaxEvaluations() throws DerivativeException, IntegratorException {
+    @Test(expected = MathUserException.class)
+    public void exceedMaxEvaluations() throws MathUserException, IntegratorException {
 
         TestProblem1 pb  = new TestProblem1();
         double range = pb.getFinalTime() - pb.getInitialTime();
@@ -116,7 +116,7 @@ public class AdamsBashforthIntegratorTes
     }
 
     @Test
-    public void backward() throws DerivativeException, IntegratorException {
+    public void backward() throws MathUserException, IntegratorException {
 
         TestProblem5 pb = new TestProblem5();
         double range = FastMath.abs(pb.getFinalTime() - pb.getInitialTime());
@@ -134,7 +134,7 @@ public class AdamsBashforthIntegratorTes
     }
 
     @Test
-    public void polynomial() throws DerivativeException, IntegratorException {
+    public void polynomial() throws MathUserException, IntegratorException {
         TestProblem6 pb = new TestProblem6();
         double range = FastMath.abs(pb.getFinalTime() - pb.getInitialTime());
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegratorTest.java Sat Nov 20 21:01:50 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.ode.nons
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem1;
@@ -33,7 +33,7 @@ import org.junit.Test;
 public class AdamsMoultonIntegratorTest {
 
     @Test(expected=IntegratorException.class)
-    public void dimensionCheck() throws DerivativeException, IntegratorException {
+    public void dimensionCheck() throws MathUserException, IntegratorException {
         TestProblem1 pb = new TestProblem1();
         FirstOrderIntegrator integ =
             new AdamsMoultonIntegrator(2, 0.0, 1.0, 1.0e-10, 1.0e-10);
@@ -43,7 +43,7 @@ public class AdamsMoultonIntegratorTest 
     }
 
     @Test(expected=IntegratorException.class)
-    public void testMinStep() throws DerivativeException, IntegratorException {
+    public void testMinStep() throws MathUserException, IntegratorException {
 
           TestProblem1 pb = new TestProblem1();
           double minStep = 0.1 * (pb.getFinalTime() - pb.getInitialTime());
@@ -64,7 +64,7 @@ public class AdamsMoultonIntegratorTest 
 
     @Test
     public void testIncreasingTolerance()
-        throws DerivativeException, IntegratorException {
+        throws MathUserException, IntegratorException {
 
         int previousCalls = Integer.MAX_VALUE;
         for (int i = -12; i < -2; ++i) {
@@ -99,8 +99,8 @@ public class AdamsMoultonIntegratorTest 
 
     }
 
-    @Test(expected = DerivativeException.class)
-    public void exceedMaxEvaluations() throws DerivativeException, IntegratorException {
+    @Test(expected = MathUserException.class)
+    public void exceedMaxEvaluations() throws MathUserException, IntegratorException {
 
         TestProblem1 pb  = new TestProblem1();
         double range = pb.getFinalTime() - pb.getInitialTime();
@@ -116,7 +116,7 @@ public class AdamsMoultonIntegratorTest 
     }
 
     @Test
-    public void backward() throws DerivativeException, IntegratorException {
+    public void backward() throws MathUserException, IntegratorException {
 
         TestProblem5 pb = new TestProblem5();
         double range = FastMath.abs(pb.getFinalTime() - pb.getInitialTime());
@@ -134,7 +134,7 @@ public class AdamsMoultonIntegratorTest 
     }
 
     @Test
-    public void polynomial() throws DerivativeException, IntegratorException {
+    public void polynomial() throws MathUserException, IntegratorException {
         TestProblem6 pb = new TestProblem6();
         double range = FastMath.abs(pb.getFinalTime() - pb.getInitialTime());
 

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.ode.nons
 
 import junit.framework.*;
 
-import org.apache.commons.math.ode.DerivativeException;
+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.IntegratorException;
@@ -42,7 +42,7 @@ public class ClassicalRungeKuttaIntegrat
     super(name);
   }
 
-  public void testMissedEndEvent() throws IntegratorException, DerivativeException {
+  public void testMissedEndEvent() throws IntegratorException, MathUserException {
       final double   t0     = 1878250320.0000029;
       final double   tEvent = 1878250379.9999986;
       final double[] k      = { 1.0e-4, 1.0e-5, 1.0e-6 };
@@ -102,7 +102,7 @@ public class ClassicalRungeKuttaIntegrat
                                                         0.0, new double[pb.getDimension()+10],
                                                         1.0, new double[pb.getDimension()]);
         fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -112,7 +112,7 @@ public class ClassicalRungeKuttaIntegrat
                                                           0.0, new double[pb.getDimension()],
                                                           1.0, new double[pb.getDimension()+10]);
           fail("an exception should have been thrown");
-      } catch(DerivativeException de) {
+      } catch(MathUserException de) {
         fail("wrong exception caught");
       } catch(IntegratorException ie) {
       }
@@ -122,14 +122,14 @@ public class ClassicalRungeKuttaIntegrat
                                                         0.0, new double[pb.getDimension()],
                                                         0.0, new double[pb.getDimension()]);
         fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
   }
 
   public void testDecreasingSteps()
-    throws DerivativeException, IntegratorException  {
+    throws MathUserException, IntegratorException  {
 
     TestProblemAbstract[] problems = TestProblemFactory.getProblems();
     for (int k = 0; k < problems.length; ++k) {
@@ -170,7 +170,7 @@ public class ClassicalRungeKuttaIntegrat
   }
 
   public void testSmallStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem1 pb = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
@@ -188,7 +188,7 @@ public class ClassicalRungeKuttaIntegrat
   }
 
   public void testBigStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem1 pb = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.2;
@@ -206,7 +206,7 @@ public class ClassicalRungeKuttaIntegrat
   }
 
   public void testBackward()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem5 pb = new TestProblem5();
     double step = FastMath.abs(pb.getFinalTime() - pb.getInitialTime()) * 0.001;
@@ -224,7 +224,7 @@ public class ClassicalRungeKuttaIntegrat
   }
 
   public void testKepler()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
@@ -248,7 +248,7 @@ public class ClassicalRungeKuttaIntegrat
       maxError = 0;
     }
     public void handleStep(StepInterpolator interpolator,
-                           boolean isLast) throws DerivativeException {
+                           boolean isLast) throws MathUserException {
 
       double[] interpolatedY = interpolator.getInterpolatedState ();
       double[] theoreticalY  = pb.computeTheoreticalState(interpolator.getCurrentTime());
@@ -270,7 +270,7 @@ public class ClassicalRungeKuttaIntegrat
   }
 
   public void testStepSize()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
       final double step = 1.23456;
       FirstOrderIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
       integ.addStepHandler(new StepHandler() {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/ClassicalRungeKuttaStepInterpolatorTest.java Sat Nov 20 21:01:50 2010
@@ -26,8 +26,8 @@ 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.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -38,7 +38,7 @@ public class ClassicalRungeKuttaStepInte
 
   @Test
   public void derivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
     ClassicalRungeKuttaIntegrator integ = new ClassicalRungeKuttaIntegrator(step);
@@ -47,7 +47,7 @@ public class ClassicalRungeKuttaStepInte
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem3 pb = new TestProblem3(0.9);

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem1;
@@ -51,7 +51,7 @@ public class DormandPrince54IntegratorTe
                            0.0, new double[pb.getDimension()+10],
                            1.0, new double[pb.getDimension()+10]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -75,7 +75,7 @@ public class DormandPrince54IntegratorTe
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -83,7 +83,7 @@ public class DormandPrince54IntegratorTe
   }
 
   public void testSmallLastStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblemAbstract pb = new TestProblem5();
     double minStep = 1.25;
@@ -108,7 +108,7 @@ public class DormandPrince54IntegratorTe
   }
 
   public void testBackward()
-      throws DerivativeException, IntegratorException {
+      throws MathUserException, IntegratorException {
 
       TestProblem5 pb = new TestProblem5();
       double minStep = 0;
@@ -162,7 +162,7 @@ public class DormandPrince54IntegratorTe
   }
 
   public void testIncreasingTolerance()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     int previousCalls = Integer.MAX_VALUE;
     for (int i = -12; i < -2; ++i) {
@@ -203,7 +203,7 @@ public class DormandPrince54IntegratorTe
   }
 
   public void testEvents()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem4 pb = new TestProblem4();
     double minStep = 0;
@@ -235,7 +235,7 @@ public class DormandPrince54IntegratorTe
   }
 
   public void testKepler()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double minStep = 0;
@@ -257,7 +257,7 @@ public class DormandPrince54IntegratorTe
   }
 
   public void testVariableSteps()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double minStep = 0;
@@ -288,7 +288,7 @@ public class DormandPrince54IntegratorTe
     }
     public void handleStep(StepInterpolator interpolator,
                            boolean isLast)
-    throws DerivativeException {
+    throws MathUserException {
 
       ++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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -27,8 +27,8 @@ 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.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -41,7 +41,7 @@ public class DormandPrince54StepInterpol
 
   @Test
   public void derivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.1);
     double minStep = 0;
     double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -55,7 +55,7 @@ public class DormandPrince54StepInterpol
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem3 pb = new TestProblem3(0.9);
@@ -106,7 +106,7 @@ public class DormandPrince54StepInterpol
 
   @Test
   public void checkClone()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
       TestProblem3 pb = new TestProblem3(0.9);
       double minStep = 0;
       double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -117,7 +117,7 @@ public class DormandPrince54StepInterpol
                                                                       scalRelativeTolerance);
       integ.addStepHandler(new StepHandler() {
         public void handleStep(StepInterpolator interpolator, boolean isLast)
-          throws DerivativeException {
+          throws MathUserException {
               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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.ode.DerivativeException;
+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.IntegratorException;
@@ -42,7 +42,7 @@ public class DormandPrince853IntegratorT
     super(name);
   }
 
-  public void testMissedEndEvent() throws IntegratorException, DerivativeException {
+  public void testMissedEndEvent() throws IntegratorException, MathUserException {
       final double   t0     = 1878250320.0000029;
       final double   tEvent = 1878250379.9999986;
       final double[] k  = { 1.0e-4, 1.0e-5, 1.0e-6 };
@@ -107,7 +107,7 @@ public class DormandPrince853IntegratorT
                            0.0, new double[pb.getDimension()+10],
                            1.0, new double[pb.getDimension()+10]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -122,7 +122,7 @@ public class DormandPrince853IntegratorT
                            0.0, new double[pb.getDimension()],
                            0.0, new double[pb.getDimension()]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -146,7 +146,7 @@ public class DormandPrince853IntegratorT
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -154,7 +154,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testIncreasingTolerance()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     int previousCalls = Integer.MAX_VALUE;
     for (int i = -12; i < -2; ++i) {
@@ -189,7 +189,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testBackward()
-      throws DerivativeException, IntegratorException {
+      throws MathUserException, IntegratorException {
 
       TestProblem5 pb = new TestProblem5();
       double minStep = 0;
@@ -212,7 +212,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testEvents()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem4 pb = new TestProblem4();
     double minStep = 0;
@@ -244,7 +244,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testKepler()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double minStep = 0;
@@ -266,7 +266,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testVariableSteps()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double minStep = 0;
@@ -286,7 +286,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testNoDenseOutput()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
     TestProblem1 pb1 = new TestProblem1();
     TestProblem1 pb2 = pb1.copy();
     double minStep = 0.1 * (pb1.getFinalTime() - pb1.getInitialTime());
@@ -316,7 +316,7 @@ public class DormandPrince853IntegratorT
   }
 
   public void testUnstableDerivative()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     final StepProblem stepProblem = new StepProblem(0.0, 1.0, 2.0);
     FirstOrderIntegrator integ =
       new DormandPrince853Integrator(0.1, 10, 1.0e-12, 0.0);
@@ -340,7 +340,7 @@ public class DormandPrince853IntegratorT
     }
     public void handleStep(StepInterpolator interpolator,
                            boolean isLast)
-    throws DerivativeException {
+    throws MathUserException {
 
       ++nbSteps;
       for (int a = 1; a < 10; ++a) {
@@ -417,7 +417,7 @@ public class DormandPrince853IntegratorT
     }
     public void handleStep(StepInterpolator interpolator,
                            boolean isLast)
-    throws DerivativeException {
+    throws MathUserException {
       double prev = interpolator.getPreviousTime();
       double curr = interpolator.getCurrentTime();
       interpolator.setInterpolatedTime(0.5*(prev + curr));

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -27,8 +27,8 @@ 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.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -41,7 +41,7 @@ public class DormandPrince853StepInterpo
 
   @Test
   public void derivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.1);
     double minStep = 0;
     double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -55,7 +55,7 @@ public class DormandPrince853StepInterpo
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem3 pb = new TestProblem3(0.9);
@@ -106,7 +106,7 @@ public class DormandPrince853StepInterpo
 
   @Test
   public void checklone()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.9);
     double minStep = 0;
     double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -117,7 +117,7 @@ public class DormandPrince853StepInterpo
                                                                       scalRelativeTolerance);
     integ.addStepHandler(new StepHandler() {
         public void handleStep(StepInterpolator interpolator, boolean isLast)
-        throws DerivativeException {
+        throws MathUserException {
             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/EulerIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/EulerIntegratorTest.java Sat Nov 20 21:01:50 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.ode.nons
 
 import junit.framework.*;
 
-import org.apache.commons.math.ode.DerivativeException;
+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.IntegratorException;
@@ -48,14 +48,14 @@ public class EulerIntegratorTest
                                           0.0, new double[pb.getDimension()+10],
                                           1.0, new double[pb.getDimension()+10]);
         fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
   }
 
   public void testDecreasingSteps()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblemAbstract[] problems = TestProblemFactory.getProblems();
     for (int k = 0; k < problems.length; ++k) {
@@ -95,7 +95,7 @@ public class EulerIntegratorTest
   }
 
   public void testSmallStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem1 pb  = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
@@ -115,7 +115,7 @@ public class EulerIntegratorTest
   }
 
   public void testBigStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem1 pb  = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.2;
@@ -134,7 +134,7 @@ public class EulerIntegratorTest
   }
 
   public void testBackward()
-      throws DerivativeException, IntegratorException {
+      throws MathUserException, IntegratorException {
 
       TestProblem5 pb = new TestProblem5();
       double step = FastMath.abs(pb.getFinalTime() - pb.getInitialTime()) * 0.001;
@@ -152,7 +152,7 @@ public class EulerIntegratorTest
   }
 
   public void testStepSize()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
       final double step = 1.23456;
       FirstOrderIntegrator integ = new EulerIntegrator(step);
       integ.addStepHandler(new StepHandler() {

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -26,8 +26,8 @@ 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.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem1;
 import org.apache.commons.math.ode.TestProblem3;
@@ -39,7 +39,7 @@ import org.junit.Test;
 public class EulerStepInterpolatorTest {
 
   @Test
-  public void noReset() throws DerivativeException {
+  public void noReset() throws MathUserException {
 
     double[]   y    =   { 0.0, 1.0, -2.0 };
     double[][] yDot = { { 1.0, 2.0, -2.0 } };
@@ -58,7 +58,7 @@ public class EulerStepInterpolatorTest {
 
   @Test
   public void interpolationAtBounds()
-    throws DerivativeException {
+    throws MathUserException {
 
     double   t0 = 0;
     double[] y0 = {0.0, 1.0, -2.0};
@@ -95,7 +95,7 @@ public class EulerStepInterpolatorTest {
 
   @Test
   public void interpolationInside()
-  throws DerivativeException {
+  throws MathUserException {
 
     double[]   y    =   { 1.0, 3.0, -4.0 };
     double[][] yDot = { { 1.0, 2.0, -2.0 } };
@@ -121,7 +121,7 @@ public class EulerStepInterpolatorTest {
 
   @Test
   public void derivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
     EulerIntegrator integ = new EulerIntegrator(step);
@@ -130,7 +130,7 @@ public class EulerStepInterpolatorTest {
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem1 pb = new TestProblem1();

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.ode.nons
 
 import junit.framework.*;
 
-import org.apache.commons.math.ode.DerivativeException;
+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.IntegratorException;
@@ -49,14 +49,14 @@ public class GillIntegratorTest
                                          0.0, new double[pb.getDimension()+10],
                                          1.0, new double[pb.getDimension()+10]);
         fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
   }
 
   public void testDecreasingSteps()
-    throws DerivativeException, IntegratorException  {
+    throws MathUserException, IntegratorException  {
 
     TestProblemAbstract[] problems = TestProblemFactory.getProblems();
     for (int k = 0; k < problems.length; ++k) {
@@ -96,7 +96,7 @@ public class GillIntegratorTest
   }
 
   public void testSmallStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem1 pb = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
@@ -115,7 +115,7 @@ public class GillIntegratorTest
   }
 
   public void testBigStep()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem1 pb = new TestProblem1();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.2;
@@ -133,7 +133,7 @@ public class GillIntegratorTest
   }
 
   public void testBackward()
-      throws DerivativeException, IntegratorException {
+      throws MathUserException, IntegratorException {
 
       TestProblem5 pb = new TestProblem5();
       double step = FastMath.abs(pb.getFinalTime() - pb.getInitialTime()) * 0.001;
@@ -151,7 +151,7 @@ public class GillIntegratorTest
   }
 
   public void testKepler()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.0003;
@@ -164,7 +164,7 @@ public class GillIntegratorTest
   }
 
   public void testUnstableDerivative()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     final StepProblem stepProblem = new StepProblem(0.0, 1.0, 2.0);
     FirstOrderIntegrator integ = new GillIntegrator(0.3);
     integ.addEventHandler(stepProblem, 1.0, 1.0e-12, 1000);
@@ -185,7 +185,7 @@ public class GillIntegratorTest
       maxError = 0;
     }
     public void handleStep(StepInterpolator interpolator,
-                           boolean isLast) throws DerivativeException {
+                           boolean isLast) throws MathUserException {
 
       double[] interpolatedY = interpolator.getInterpolatedState();
       double[] theoreticalY  = pb.computeTheoreticalState(interpolator.getCurrentTime());
@@ -207,7 +207,7 @@ public class GillIntegratorTest
   }
 
   public void testStepSize()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
       final double step = 1.23456;
       FirstOrderIntegrator integ = new GillIntegrator(step);
       integ.addStepHandler(new StepHandler() {

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/GillStepInterpolatorTest.java Sat Nov 20 21:01:50 2010
@@ -26,8 +26,8 @@ import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
 import java.io.IOException;
 
+import org.apache.commons.math.exception.MathUserException;
 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.TestProblem3;
 import org.apache.commons.math.ode.nonstiff.GillIntegrator;
@@ -39,7 +39,7 @@ public class GillStepInterpolatorTest {
 
   @Test
   public void testDerivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3();
     double step = (pb.getFinalTime() - pb.getInitialTime()) * 0.001;
     GillIntegrator integ = new GillIntegrator(step);
@@ -48,7 +48,7 @@ public class GillStepInterpolatorTest {
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem3 pb = new TestProblem3(0.9);

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem1;
@@ -50,7 +50,7 @@ public class GraggBulirschStoerIntegrato
                            0.0, new double[pb.getDimension()+10],
                            1.0, new double[pb.getDimension()+10]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -65,7 +65,7 @@ public class GraggBulirschStoerIntegrato
                            0.0, new double[pb.getDimension()],
                            0.0, new double[pb.getDimension()]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -89,7 +89,7 @@ public class GraggBulirschStoerIntegrato
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -97,7 +97,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testBackward()
-      throws DerivativeException, IntegratorException {
+      throws MathUserException, IntegratorException {
 
       TestProblem5 pb = new TestProblem5();
       double minStep = 0;
@@ -120,7 +120,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testIncreasingTolerance()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     int previousCalls = Integer.MAX_VALUE;
     for (int i = -12; i < -4; ++i) {
@@ -157,7 +157,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testIntegratorControls()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
 
     TestProblem3 pb = new TestProblem3(0.999);
     GraggBulirschStoerIntegrator integ =
@@ -186,7 +186,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   private double getMaxError(FirstOrderIntegrator integrator, TestProblemAbstract pb)
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
       TestProblemHandler handler = new TestProblemHandler(pb, integrator);
       integrator.addStepHandler(handler);
       integrator.integrate(pb,
@@ -196,7 +196,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testEvents()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem4 pb = new TestProblem4();
     double minStep = 0;
@@ -228,7 +228,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testKepler()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb = new TestProblem3(0.9);
     double minStep        = 0;
@@ -250,7 +250,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testVariableSteps()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb = new TestProblem3(0.9);
     double minStep        = 0;
@@ -269,7 +269,7 @@ public class GraggBulirschStoerIntegrato
   }
 
   public void testUnstableDerivative()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
     final StepProblem stepProblem = new StepProblem(0.0, 1.0, 2.0);
     FirstOrderIntegrator integ =
       new GraggBulirschStoerIntegrator(0.1, 10, 1.0e-12, 0.0);
@@ -293,7 +293,7 @@ public class GraggBulirschStoerIntegrato
     }
     public void handleStep(StepInterpolator interpolator,
                            boolean isLast)
-    throws DerivativeException {
+    throws MathUserException {
 
       ++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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -27,8 +27,8 @@ 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.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -41,7 +41,7 @@ public class GraggBulirschStoerStepInter
 
   @Test
   public void derivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.9);
     double minStep   = 0;
     double maxStep   = pb.getFinalTime() - pb.getInitialTime();
@@ -56,7 +56,7 @@ public class GraggBulirschStoerStepInter
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem3 pb  = new TestProblem3(0.9);
@@ -108,7 +108,7 @@ public class GraggBulirschStoerStepInter
 
   @Test
   public void checklone()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.9);
     double minStep = 0;
     double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -119,7 +119,7 @@ public class GraggBulirschStoerStepInter
                                                                           scalRelativeTolerance);
     integ.addStepHandler(new StepHandler() {
         public void handleStep(StepInterpolator interpolator, boolean isLast)
-        throws DerivativeException {
+        throws MathUserException {
             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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -20,8 +20,8 @@ package org.apache.commons.math.ode.nons
 import junit.framework.TestCase;
 
 import org.apache.commons.math.ConvergenceException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
@@ -50,11 +50,11 @@ public class HighamHall54IntegratorTest
           new FirstOrderDifferentialEquations() {
             private static final long serialVersionUID = -1157081786301178032L;
             public void computeDerivatives(double t, double[] y, double[] dot)
-            throws DerivativeException {
+            throws MathUserException {
             if (t < -0.5) {
-                throw new DerivativeException(LocalizedFormats.SIMPLE_MESSAGE, "oops");
+                throw new MathUserException(LocalizedFormats.SIMPLE_MESSAGE, "oops");
             } else {
-                throw new DerivativeException(new RuntimeException("oops"));
+                throw new MathUserException(new RuntimeException("oops"));
            }
           }
           public int getDimension() {
@@ -65,14 +65,14 @@ public class HighamHall54IntegratorTest
       try  {
         integrator.integrate(equations, -1.0, new double[1], 0.0, new double[1]);
         fail("an exception should have been thrown");
-      } catch(DerivativeException de) {
+      } catch(MathUserException de) {
         // expected behavior
       }
 
       try  {
         integrator.integrate(equations, 0.0, new double[1], 1.0, new double[1]);
         fail("an exception should have been thrown");
-      } catch(DerivativeException de) {
+      } catch(MathUserException de) {
         // expected behavior
       }
 
@@ -96,7 +96,7 @@ public class HighamHall54IntegratorTest
                       pb.getInitialTime(), pb.getInitialState(),
                       pb.getFinalTime(), new double[pb.getDimension()]);
       fail("an exception should have been thrown");
-    } catch(DerivativeException de) {
+    } catch(MathUserException de) {
       fail("wrong exception caught");
     } catch(IntegratorException ie) {
     }
@@ -104,7 +104,7 @@ public class HighamHall54IntegratorTest
   }
 
   public void testIncreasingTolerance()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     int previousCalls = Integer.MAX_VALUE;
     for (int i = -12; i < -2; ++i) {
@@ -139,7 +139,7 @@ public class HighamHall54IntegratorTest
   }
 
   public void testBackward()
-      throws DerivativeException, IntegratorException {
+      throws MathUserException, IntegratorException {
 
       TestProblem5 pb = new TestProblem5();
       double minStep = 0;
@@ -162,7 +162,7 @@ public class HighamHall54IntegratorTest
   }
 
   public void testEvents()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     TestProblem4 pb = new TestProblem4();
     double minStep = 0;
@@ -333,7 +333,7 @@ public class HighamHall54IntegratorTest
   }
 
   public void testKepler()
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
     final TestProblem3 pb  = new TestProblem3(0.9);
     double minStep = 0;
@@ -365,7 +365,7 @@ public class HighamHall54IntegratorTest
       maxError = 0;
     }
     public void handleStep(StepInterpolator interpolator,
-                           boolean isLast) throws DerivativeException {
+                           boolean isLast) throws MathUserException {
 
       ++nbSteps;
       double[] interpolatedY = interpolator.getInterpolatedState();

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -27,8 +27,8 @@ 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.DerivativeException;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.TestProblem3;
 import org.apache.commons.math.ode.sampling.StepHandler;
@@ -41,7 +41,7 @@ public class HighamHall54StepInterpolato
 
   @Test
   public void derivativesConsistency()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.1);
     double minStep = 0;
     double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -55,7 +55,7 @@ public class HighamHall54StepInterpolato
 
   @Test
   public void serialization()
-    throws DerivativeException, IntegratorException,
+    throws MathUserException, IntegratorException,
            IOException, ClassNotFoundException {
 
     TestProblem3 pb = new TestProblem3(0.9);
@@ -106,7 +106,7 @@ public class HighamHall54StepInterpolato
 
   @Test
   public void checkClone()
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
     TestProblem3 pb = new TestProblem3(0.9);
     double minStep = 0;
     double maxStep = pb.getFinalTime() - pb.getInitialTime();
@@ -117,7 +117,7 @@ public class HighamHall54StepInterpolato
                                                               scalRelativeTolerance);
     integ.addStepHandler(new StepHandler() {
         public void handleStep(StepInterpolator interpolator, boolean isLast)
-        throws DerivativeException {
+        throws MathUserException {
             StepInterpolator cloned = interpolator.copy();
             double tA = cloned.getPreviousTime();
             double tB = cloned.getCurrentTime();



Mime
View raw message