commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1037328 [2/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/main/java/org/apache/commons/math/linear/AbstractRealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java Sat Nov 20 21:01:50 2010
@@ -20,9 +20,9 @@ package org.apache.commons.math.linear;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.exception.MathUnsupportedOperationException;
 import org.apache.commons.math.exception.DimensionMismatchException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.OutOfRangeException;
 import org.apache.commons.math.analysis.BinaryFunction;
 import org.apache.commons.math.analysis.ComposableFunction;
@@ -156,11 +156,7 @@ public abstract class AbstractRealVector
     /** {@inheritDoc} */
     public RealVector mapAddToSelf(double d) {
         if (d != 0) {
-            try {
-                return mapToSelf(BinaryFunction.ADD.fix1stArgument(d));
-            } catch (FunctionEvaluationException e) {
-                throw new IllegalArgumentException(e);
-            }
+            return mapToSelf(BinaryFunction.ADD.fix1stArgument(d));
         }
         return this;
     }
@@ -356,7 +352,7 @@ public abstract class AbstractRealVector
     public RealVector mapAbsToSelf() {
         try {
             return mapToSelf(ComposableFunction.ABS);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -370,7 +366,7 @@ public abstract class AbstractRealVector
     public RealVector mapAcosToSelf() {
         try {
             return mapToSelf(ComposableFunction.ACOS);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -384,7 +380,7 @@ public abstract class AbstractRealVector
     public RealVector mapAsinToSelf() {
         try {
             return mapToSelf(ComposableFunction.ASIN);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -398,7 +394,7 @@ public abstract class AbstractRealVector
     public RealVector mapAtanToSelf() {
         try {
             return mapToSelf(ComposableFunction.ATAN);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -412,7 +408,7 @@ public abstract class AbstractRealVector
     public RealVector mapCbrtToSelf() {
         try {
             return mapToSelf(ComposableFunction.CBRT);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -426,7 +422,7 @@ public abstract class AbstractRealVector
     public RealVector mapCeilToSelf() {
         try {
             return mapToSelf(ComposableFunction.CEIL);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -440,7 +436,7 @@ public abstract class AbstractRealVector
     public RealVector mapCosToSelf() {
         try {
             return mapToSelf(ComposableFunction.COS);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -454,7 +450,7 @@ public abstract class AbstractRealVector
     public RealVector mapCoshToSelf() {
         try {
             return mapToSelf(ComposableFunction.COSH);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -468,7 +464,7 @@ public abstract class AbstractRealVector
     public RealVector mapDivideToSelf(double d){
         try {
             return mapToSelf(BinaryFunction.DIVIDE.fix2ndArgument(d));
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -482,7 +478,7 @@ public abstract class AbstractRealVector
     public RealVector mapExpToSelf() {
         try {
             return mapToSelf(ComposableFunction.EXP);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -496,7 +492,7 @@ public abstract class AbstractRealVector
     public RealVector mapExpm1ToSelf() {
         try {
             return mapToSelf(ComposableFunction.EXPM1);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -510,7 +506,7 @@ public abstract class AbstractRealVector
     public RealVector mapFloorToSelf() {
         try {
             return mapToSelf(ComposableFunction.FLOOR);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -524,7 +520,7 @@ public abstract class AbstractRealVector
     public RealVector mapInvToSelf() {
         try {
             return mapToSelf(ComposableFunction.INVERT);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -538,7 +534,7 @@ public abstract class AbstractRealVector
     public RealVector mapLogToSelf() {
         try {
             return mapToSelf(ComposableFunction.LOG);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -552,7 +548,7 @@ public abstract class AbstractRealVector
     public RealVector mapLog10ToSelf() {
         try {
             return mapToSelf(ComposableFunction.LOG10);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -566,7 +562,7 @@ public abstract class AbstractRealVector
     public RealVector mapLog1pToSelf() {
         try {
             return mapToSelf(ComposableFunction.LOG1P);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -580,7 +576,7 @@ public abstract class AbstractRealVector
     public RealVector mapMultiplyToSelf(double d){
         try {
             return mapToSelf(BinaryFunction.MULTIPLY.fix1stArgument(d));
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -594,7 +590,7 @@ public abstract class AbstractRealVector
     public RealVector mapPowToSelf(double d){
         try {
             return mapToSelf(BinaryFunction.POW.fix2ndArgument(d));
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -608,7 +604,7 @@ public abstract class AbstractRealVector
     public RealVector mapRintToSelf() {
         try {
             return mapToSelf(ComposableFunction.RINT);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -622,7 +618,7 @@ public abstract class AbstractRealVector
     public RealVector mapSignumToSelf() {
         try {
             return mapToSelf(ComposableFunction.SIGNUM);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -636,7 +632,7 @@ public abstract class AbstractRealVector
     public RealVector mapSinToSelf() {
         try {
             return mapToSelf(ComposableFunction.SIN);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -650,7 +646,7 @@ public abstract class AbstractRealVector
     public RealVector mapSinhToSelf() {
         try {
             return mapToSelf(ComposableFunction.SINH);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -664,7 +660,7 @@ public abstract class AbstractRealVector
     public RealVector mapSqrtToSelf() {
         try {
             return mapToSelf(ComposableFunction.SQRT);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -688,7 +684,7 @@ public abstract class AbstractRealVector
     public RealVector mapTanToSelf() {
         try {
             return mapToSelf(ComposableFunction.TAN);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -702,7 +698,7 @@ public abstract class AbstractRealVector
     public RealVector mapTanhToSelf() {
         try {
             return mapToSelf(ComposableFunction.TANH);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -716,7 +712,7 @@ public abstract class AbstractRealVector
     public RealVector mapUlpToSelf() {
         try {
             return mapToSelf(ComposableFunction.ULP);
-        } catch (FunctionEvaluationException e) {
+        } catch (MathUserException e) {
             throw new IllegalArgumentException(e);
         }
     }
@@ -827,12 +823,12 @@ public abstract class AbstractRealVector
     }
 
     /** {@inheritDoc} */
-    public RealVector map(UnivariateRealFunction function) throws FunctionEvaluationException {
+    public RealVector map(UnivariateRealFunction function) throws MathUserException {
         return copy().mapToSelf(function);
     }
 
     /** {@inheritDoc} */
-    public RealVector mapToSelf(UnivariateRealFunction function) throws FunctionEvaluationException {
+    public RealVector mapToSelf(UnivariateRealFunction function) throws MathUserException {
         Iterator<Entry> it = (function.value(0) == 0) ? sparseIterator() : iterator();
         Entry e;
         while (it.hasNext() && (e = it.next()) != null) {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/Array2DRowFieldMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/Array2DRowFieldMatrix.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/Array2DRowFieldMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/Array2DRowFieldMatrix.java Sat Nov 20 21:01:50 2010
@@ -22,6 +22,7 @@ import java.io.Serializable;
 import org.apache.commons.math.Field;
 import org.apache.commons.math.FieldElement;
 import org.apache.commons.math.MathRuntimeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 
 /**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixChangingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixChangingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixChangingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixChangingVisitor.java Sat Nov 20 21:01:50 2010
@@ -18,6 +18,7 @@
 package org.apache.commons.math.linear;
 
 import org.apache.commons.math.FieldElement;
+import org.apache.commons.math.exception.MathUserException;
 
 /**
  * Default implementation of the {@link FieldMatrixChangingVisitor} interface.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixPreservingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixPreservingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixPreservingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultFieldMatrixPreservingVisitor.java Sat Nov 20 21:01:50 2010
@@ -18,6 +18,7 @@
 package org.apache.commons.math.linear;
 
 import org.apache.commons.math.FieldElement;
+import org.apache.commons.math.exception.MathUserException;
 
 /**
  * Default implementation of the {@link FieldMatrixPreservingVisitor} interface.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixChangingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixChangingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixChangingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixChangingVisitor.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.linear;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /**
  * Default implementation of the {@link RealMatrixChangingVisitor} interface.
  * <p>

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixPreservingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixPreservingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixPreservingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DefaultRealMatrixPreservingVisitor.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.linear;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /**
  * Default implementation of the {@link RealMatrixPreservingVisitor} interface.
  * <p>

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrix.java Sat Nov 20 21:01:50 2010
@@ -20,6 +20,7 @@ package org.apache.commons.math.linear;
 
 import org.apache.commons.math.Field;
 import org.apache.commons.math.FieldElement;
+import org.apache.commons.math.exception.MathUserException;
 
 /**
  * Interface defining field-valued matrix with basic algebraic operations.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixChangingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixChangingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixChangingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixChangingVisitor.java Sat Nov 20 21:01:50 2010
@@ -18,6 +18,7 @@
 package org.apache.commons.math.linear;
 
 import org.apache.commons.math.FieldElement;
+import org.apache.commons.math.exception.MathUserException;
 
 /**
  * Interface defining a visitor for matrix entries.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixPreservingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixPreservingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixPreservingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/FieldMatrixPreservingVisitor.java Sat Nov 20 21:01:50 2010
@@ -18,6 +18,7 @@
 package org.apache.commons.math.linear;
 
 import org.apache.commons.math.FieldElement;
+import org.apache.commons.math.exception.MathUserException;
 
 /**
  * Interface defining a visitor for matrix entries.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrix.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.linear;
 
+import org.apache.commons.math.exception.MathUserException;
+
 
 /**
  * Interface defining a real-valued matrix with basic algebraic operations.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixChangingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixChangingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixChangingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixChangingVisitor.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.linear;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /**
  * Interface defining a visitor for matrix entries.
  *

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixPreservingVisitor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixPreservingVisitor.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixPreservingVisitor.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealMatrixPreservingVisitor.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.linear;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /**
  * Interface defining a visitor for matrix entries.
  *

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealVector.java Sat Nov 20 21:01:50 2010
@@ -18,8 +18,8 @@ package org.apache.commons.math.linear;
 
 import java.util.Iterator;
 
-import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.MathUserException;
 
 
 /**
@@ -57,9 +57,9 @@ public interface RealVector {
      *
      * @param function Function to apply to each entry.
      * @return this vector.
-     * @throws FunctionEvaluationException if the function throws it.
+     * @throws MathUserException if the function throws it.
      */
-    RealVector mapToSelf(UnivariateRealFunction function) throws FunctionEvaluationException;
+    RealVector mapToSelf(UnivariateRealFunction function) throws MathUserException;
 
     /**
      * Acts as if implemented as:
@@ -69,9 +69,9 @@ public interface RealVector {
      *
      * @param function Functin to apply to each entry.
      * @return a new vector.
-     * @throws FunctionEvaluationException if the function throws it.
+     * @throws MathUserException if the function throws it.
      */
-    RealVector map(UnivariateRealFunction function) throws FunctionEvaluationException;
+    RealVector map(UnivariateRealFunction function) throws MathUserException;
 
     /** Class representing a modifiable entry in the vector. */
     public abstract class Entry {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/AbstractIntegrator.java Sat Nov 20 21:01:50 2010
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.Collections;
 
 import org.apache.commons.math.MaxEvaluationsExceededException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.ode.events.CombinedEventsManager;
 import org.apache.commons.math.ode.events.EventHandler;
@@ -173,13 +174,13 @@ public abstract class AbstractIntegrator
      * @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 DerivativeException this exception is propagated to the caller if the
-     * underlying user function triggers one
+     * @throws MathUserException this user-defined exception should be used if an error is
+     * is triggered by user code
      */
     public void computeDerivatives(final double t, final double[] y, final double[] yDot)
-        throws DerivativeException {
+        throws MathUserException {
         if (++evaluations > maxEvaluations) {
-            throw new DerivativeException(new MaxEvaluationsExceededException(maxEvaluations));
+            throw new MathUserException(new MaxEvaluationsExceededException(maxEvaluations));
         }
         equations.computeDerivatives(t, y, yDot);
     }

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -22,6 +22,7 @@ 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.util.LocalizedFormats;
 import org.apache.commons.math.ode.sampling.StepHandler;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
@@ -116,14 +117,14 @@ public class ContinuousOutputModel
 
   /** Append another model at the end of the instance.
    * @param model model to add at the end of the instance
-   * @exception DerivativeException if some step interpolators from
-   * the appended model cannot be copied
+   * @exception MathUserException if user code called from step interpolator
+   * finalization triggers one
    * @exception IllegalArgumentException 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 DerivativeException {
+    throws MathUserException {
 
     if (model.steps.size() == 0) {
       return;
@@ -193,11 +194,11 @@ 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
-   * @throws DerivativeException this exception is propagated to the
-   * caller if the underlying user function triggers one
+   * @exception MathUserException if user code called from step interpolator
+   * finalization triggers one
    */
   public void handleStep(final StepInterpolator interpolator, final boolean isLast)
-    throws DerivativeException {
+    throws MathUserException {
 
     if (steps.size() == 0) {
       initialTime = interpolator.getPreviousTime();
@@ -342,10 +343,10 @@ public class ContinuousOutputModel
   /**
    * Get the state vector of the interpolated point.
    * @return state vector at time {@link #getInterpolatedTime}
-   * @throws DerivativeException if this call induces an automatic
-   * step finalization that throws one
+   * @exception MathUserException if user code called from step interpolator
+   * finalization triggers one
    */
-  public double[] getInterpolatedState() throws DerivativeException {
+  public double[] getInterpolatedState() throws MathUserException {
     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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.ode;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /** This class converts second order differential equations to first
  * order ones.
  *
@@ -95,11 +97,11 @@ 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 DerivativeException this exception is propagated to the caller if the
+   * @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 DerivativeException {
+      throws MathUserException {
 
     // 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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.ode;
 
+import org.apache.commons.math.exception.MathUserException;
+
 
 /** This interface represents a first order differential equations set.
  *
@@ -56,9 +58,10 @@ 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 DerivativeException this exception is propagated to the caller if the
-     * underlying user function triggers one
+     * @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 DerivativeException;
+    void computeDerivatives(double t, double[] y, double[] yDot)
+        throws MathUserException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/FirstOrderIntegrator.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.ode;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /** This interface represents a first order integrator for
  * differential equations.
 
@@ -50,11 +52,11 @@ public interface FirstOrderIntegrator ex
    * target, but may be different if some {@link
    * org.apache.commons.math.ode.events.EventHandler} stops it at some point.
    * @throws IntegratorException if the integrator cannot perform integration
-   * @throws DerivativeException this exception is propagated to the caller if
+   * @throws MathUserException this exception is propagated to the caller if
    * the underlying user function triggers one
    */
   double integrate (FirstOrderDifferentialEquations equations,
                     double t0, double[] y0,
-                    double t, double[] y) throws DerivativeException, IntegratorException;
+                    double t, double[] y) throws MathUserException, IntegratorException;
 
 }

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -18,6 +18,7 @@
 package org.apache.commons.math.ode;
 
 import org.apache.commons.math.MathRuntimeException;
+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.linear.RealMatrix;
@@ -205,11 +206,11 @@ public abstract class MultistepIntegrato
      * @param t target time for the integration
      * (can be set to a value smaller than <code>t0</code> for backward integration)
      * @throws IntegratorException if the integrator cannot perform integration
-     * @throws DerivativeException this exception is propagated to the caller if
+     * @throws MathUserException this exception is propagated to the caller if
      * the underlying user function triggers one
      */
     protected void start(final double t0, final double[] y0, final double t)
-        throws DerivativeException, IntegratorException {
+        throws MathUserException, IntegratorException {
 
         // make sure NO user event nor user step handler is triggered,
         // this is the task of the top level integrator, not the task
@@ -224,10 +225,10 @@ public abstract class MultistepIntegrato
         try {
             starter.integrate(new CountingDifferentialEquations(y0.length),
                               t0, y0, t, new double[y0.length]);
-        } catch (DerivativeException de) {
-            if (!(de instanceof InitializationCompletedMarkerException)) {
+        } catch (MathUserException mue) {
+            if (!(mue instanceof InitializationCompletedMarkerException)) {
                 // this is not the expected nominal interruption of the start integrator
-                throw de;
+                throw mue;
             }
         }
 
@@ -321,7 +322,7 @@ public abstract class MultistepIntegrato
 
         /** {@inheritDoc} */
         public void handleStep(StepInterpolator interpolator, boolean isLast)
-            throws DerivativeException {
+            throws MathUserException {
 
             final double prev = interpolator.getPreviousTime();
             final double curr = interpolator.getCurrentTime();
@@ -366,7 +367,7 @@ public abstract class MultistepIntegrato
 
     /** Marker exception used ONLY to stop the starter integrator after first step. */
     private static class InitializationCompletedMarkerException
-        extends DerivativeException {
+        extends MathUserException {
 
         /** Serializable version identifier. */
         private static final long serialVersionUID = -4105805787353488365L;
@@ -393,7 +394,7 @@ public abstract class MultistepIntegrato
 
         /** {@inheritDoc} */
         public void computeDerivatives(double t, double[] y, double[] dot)
-                throws DerivativeException {
+                throws MathUserException {
             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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.ode;
 
+import org.apache.commons.math.exception.MathUserException;
+
 /** This interface represents a second order differential equations set.
 
  * <p>This interface should be implemented by all real second order
@@ -58,10 +60,10 @@ public interface SecondOrderDifferential
      * of the state vector
      * @param yDDot placeholder array where to put the second time derivative
      * of the state vector
-     * @throws DerivativeException this exception is propagated to the caller if the
-     * underlying user function triggers one
+     * @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 DerivativeException;
+    void computeSecondDerivatives(double t, double[] y, double[] yDot, double[] yDDot)
+        throws MathUserException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/SecondOrderIntegrator.java Sat Nov 20 21:01:50 2010
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.ode;
 
+import org.apache.commons.math.exception.MathUserException;
+
 
 /** This interface represents a second order integrator for
  * differential equations.
@@ -47,12 +49,12 @@ public interface SecondOrderIntegrator e
    * @param yDot placeholder where to put the first derivative of
    * the state vector at time t, can be the same object as yDot0
    * @throws IntegratorException if the integrator cannot perform integration
-   * @throws DerivativeException this exception is propagated to the caller if the
+   * @throws MathUserException this exception is propagated to the caller if the
    * underlying user function triggers one
    */
   void integrate(SecondOrderDifferentialEquations equations,
                  double t0, double[] y0, double[] yDot0,
                  double t, double[] y, double[] yDot)
-      throws DerivativeException, IntegratorException;
+      throws MathUserException, IntegratorException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/CombinedEventsManager.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/CombinedEventsManager.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/CombinedEventsManager.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/CombinedEventsManager.java Sat Nov 20 21:01:50 2010
@@ -23,7 +23,7 @@ import java.util.Collections;
 import java.util.List;
 
 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.IntegratorException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
@@ -115,12 +115,12 @@ public class CombinedEventsManager {
      * @return true if at least one event handler triggers an event
      * before the end of the proposed step (this implies the step should
      * be rejected)
-     * @exception DerivativeException if the interpolator fails to
+     * @exception MathUserException if the interpolator fails to
      * compute the function somewhere within the step
      * @exception IntegratorException if an event cannot be located
      */
     public boolean evaluateStep(final StepInterpolator interpolator)
-    throws DerivativeException, IntegratorException {
+    throws MathUserException, IntegratorException {
 
         try {
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/events/EventState.java Sat Nov 20 21:01:50 2010
@@ -18,11 +18,10 @@
 package org.apache.commons.math.ode.events;
 
 import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.exception.FunctionEvaluationException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.analysis.solvers.BrentSolver;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 import org.apache.commons.math.util.FastMath;
 
@@ -180,8 +179,8 @@ public class EventState {
                 g0Positive = g0 >= 0;
             }
 
-        } catch (DerivativeException de) {
-            throw new EventException(de);
+        } catch (MathUserException mue) {
+            throw new EventException(mue);
         }
     }
 
@@ -190,14 +189,14 @@ public class EventState {
      * @return true if the event handler triggers an event before
      * the end of the proposed step (this implies the step should be
      * rejected)
-     * @exception DerivativeException if the interpolator fails to
+     * @exception MathUserException if the interpolator fails to
      * compute the switching function somewhere within the step
      * @exception EventException if the switching function
      * cannot be evaluated
      * @exception ConvergenceException if an event cannot be located
      */
     public boolean evaluateStep(final StepInterpolator interpolator)
-        throws DerivativeException, EventException, ConvergenceException {
+        throws MathUserException, EventException, ConvergenceException {
 
         try {
 
@@ -244,14 +243,12 @@ public class EventState {
                     increasing = gb >= ga;
 
                     final UnivariateRealFunction f = new UnivariateRealFunction() {
-                        public double value(final double t) throws FunctionEvaluationException {
+                        public double value(final double t) throws MathUserException {
                             try {
                                 interpolator.setInterpolatedTime(t);
                                 return handler.g(t, interpolator.getInterpolatedState());
-                            } catch (DerivativeException e) {
-                                throw new FunctionEvaluationException(e, t);
                             } catch (EventException e) {
-                                throw new FunctionEvaluationException(e, t);
+                                throw new MathUserException(e);
                             }
                         }
                     };
@@ -291,14 +288,12 @@ public class EventState {
             pendingEventTime = Double.NaN;
             return false;
 
-        } catch (FunctionEvaluationException e) {
-            final Throwable cause = e.getCause();
-            if ((cause != null) && (cause instanceof DerivativeException)) {
-                throw (DerivativeException) cause;
-            } else if ((cause != null) && (cause instanceof EventException)) {
+        } catch (MathUserException mue) {
+            final Throwable cause = mue.getCause();
+            if ((cause != null) && (cause instanceof EventException)) {
                 throw (EventException) cause;
             }
-            throw new EventException(e);
+            throw mue;
         }
 
     }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobians.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobians.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobians.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/FirstOrderIntegratorWithJacobians.java Sat Nov 20 21:01:50 2010
@@ -26,8 +26,8 @@ import java.util.Collection;
 
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.MaxEvaluationsExceededException;
+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.ExtendedFirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderIntegrator;
 import org.apache.commons.math.ode.IntegratorException;
@@ -206,13 +206,13 @@ public class FirstOrderIntegratorWithJac
      * @return stop time, will be the same as target time if integration reached its
      * target, but may be different if some event handler stops it at some point.
      * @throws IntegratorException if the integrator cannot perform integration
-     * @throws DerivativeException this exception is propagated to the caller if
+     * @throws MathUserException this exception is propagated to the caller if
      * the underlying user function triggers one
      */
     public double integrate(final double t0, final double[] y0, final double[][] dY0dP,
                             final double t, final double[] y,
                             final double[][] dYdY0, final double[][] dYdP)
-        throws DerivativeException, IntegratorException {
+        throws MathUserException, IntegratorException {
 
         final int n = ode.getDimension();
         final int k = ode.getParametersDimension();
@@ -395,7 +395,7 @@ public class FirstOrderIntegratorWithJac
 
         /** {@inheritDoc} */
         public void computeDerivatives(final double t, final double[] z, final double[] zDot)
-            throws DerivativeException {
+            throws MathUserException {
 
             final int n = y.length;
             final int k = dFdP[0].length;
@@ -403,7 +403,7 @@ public class FirstOrderIntegratorWithJac
             // compute raw ODE and its jacobians: dy/dt, d[dy/dt]/dy0 and d[dy/dt]/dp
             System.arraycopy(z,    0, y,    0, n);
             if (++evaluations > maxEvaluations) {
-                throw new DerivativeException(new MaxEvaluationsExceededException(maxEvaluations));
+                throw new MathUserException(new MaxEvaluationsExceededException(maxEvaluations));
             }
             ode.computeDerivatives(t, y, yDot);
             ode.computeJacobians(t, y, yDot, dFdY, dFdP);
@@ -485,7 +485,7 @@ public class FirstOrderIntegratorWithJac
         }
 
         /** {@inheritDoc} */
-        public void computeDerivatives(double t, double[] y, double[] yDot) throws DerivativeException {
+        public void computeDerivatives(double t, double[] y, double[] yDot) throws MathUserException {
             // this call to computeDerivatives has already been counted,
             // we must not increment the counter again
             ode.computeDerivatives(t, y, yDot);
@@ -499,14 +499,14 @@ public class FirstOrderIntegratorWithJac
         /** {@inheritDoc} */
         public void computeJacobians(double t, double[] y, double[] yDot,
                                      double[][] dFdY, double[][] dFdP)
-            throws DerivativeException {
+            throws MathUserException {
 
             final int n = hY.length;
             final int k = hP.length;
 
             evaluations += n + k;
             if (evaluations > maxEvaluations) {
-                throw new DerivativeException(new MaxEvaluationsExceededException(maxEvaluations));
+                throw new MathUserException(new MaxEvaluationsExceededException(maxEvaluations));
             }
 
             // compute df/dy where f is the ODE and y is the state array
@@ -567,7 +567,7 @@ public class FirstOrderIntegratorWithJac
 
         /** {@inheritDoc} */
         public void handleStep(StepInterpolator interpolator, boolean isLast)
-            throws DerivativeException {
+            throws MathUserException {
             handler.handleStep(new StepInterpolatorWrapper(interpolator, n, k), isLast);
         }
 
@@ -652,14 +652,14 @@ public class FirstOrderIntegratorWithJac
         }
 
         /** {@inheritDoc} */
-        public double[] getInterpolatedY() throws DerivativeException {
+        public double[] getInterpolatedY() throws MathUserException {
             double[] extendedState = interpolator.getInterpolatedState();
             System.arraycopy(extendedState, 0, y, 0, y.length);
             return y;
         }
 
         /** {@inheritDoc} */
-        public double[][] getInterpolatedDyDy0() throws DerivativeException {
+        public double[][] getInterpolatedDyDy0() throws MathUserException {
             double[] extendedState = interpolator.getInterpolatedState();
             final int n = y.length;
             int start = n;
@@ -671,7 +671,7 @@ public class FirstOrderIntegratorWithJac
         }
 
         /** {@inheritDoc} */
-        public double[][] getInterpolatedDyDp() throws DerivativeException {
+        public double[][] getInterpolatedDyDp() throws MathUserException {
             double[] extendedState = interpolator.getInterpolatedState();
             final int n = y.length;
             final int k = dydp[0].length;
@@ -684,14 +684,14 @@ public class FirstOrderIntegratorWithJac
         }
 
         /** {@inheritDoc} */
-        public double[] getInterpolatedYDot() throws DerivativeException {
+        public double[] getInterpolatedYDot() throws MathUserException {
             double[] extendedDerivatives = interpolator.getInterpolatedDerivatives();
             System.arraycopy(extendedDerivatives, 0, yDot, 0, yDot.length);
             return yDot;
         }
 
         /** {@inheritDoc} */
-        public double[][] getInterpolatedDyDy0Dot() throws DerivativeException {
+        public double[][] getInterpolatedDyDy0Dot() throws MathUserException {
             double[] extendedDerivatives = interpolator.getInterpolatedDerivatives();
             final int n = y.length;
             int start = n;
@@ -703,7 +703,7 @@ public class FirstOrderIntegratorWithJac
         }
 
         /** {@inheritDoc} */
-        public double[][] getInterpolatedDyDpDot() throws DerivativeException {
+        public double[][] getInterpolatedDyDpDot() throws MathUserException {
             double[] extendedDerivatives = interpolator.getInterpolatedDerivatives();
             final int n = y.length;
             final int k = dydpDot[0].length;
@@ -721,7 +721,7 @@ public class FirstOrderIntegratorWithJac
         }
 
         /** {@inheritDoc} */
-        public StepInterpolatorWithJacobians copy() throws DerivativeException {
+        public StepInterpolatorWithJacobians copy() throws MathUserException {
             final int n = y.length;
             final int k = dydp[0].length;
             StepInterpolatorWrapper copied =

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/ODEWithJacobians.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/ODEWithJacobians.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/ODEWithJacobians.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/ODEWithJacobians.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.FirstOrderDifferentialEquations;
 
 
@@ -43,10 +43,10 @@ public interface ODEWithJacobians extend
      * @param yDot array containing the current value of the time derivative of the state vector
      * @param dFdY placeholder array where to put the jacobian of the ODE with respect to the state vector
      * @param dFdP placeholder array where to put the jacobian of the ODE with respect to the parameters
-     * @throws DerivativeException this exception is propagated to the caller if the
+     * @throws MathUserException this exception is propagated to the caller if the
      * underlying user function triggers one
      */
     void computeJacobians(double t, double[] y, double[] yDot, double[][] dFdY, double[][] dFdP)
-        throws DerivativeException;
+        throws MathUserException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepHandlerWithJacobians.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepHandlerWithJacobians.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepHandlerWithJacobians.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepHandlerWithJacobians.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;
 
 /**
  * This interface represents a handler that should be called after
@@ -87,9 +87,9 @@ public interface StepHandlerWithJacobian
    * Keeping only a reference to the interpolator and reusing it will
    * result in unpredictable behavior (potentially crashing the application).
    * @param isLast true if the step is the last one
-   * @throws DerivativeException this exception is propagated to the
+   * @throws MathUserException this exception is propagated to the
    * caller if the underlying user function triggers one
    */
-  void handleStep(StepInterpolatorWithJacobians interpolator, boolean isLast) throws DerivativeException;
+  void handleStep(StepInterpolatorWithJacobians interpolator, boolean isLast) throws MathUserException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepInterpolatorWithJacobians.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepInterpolatorWithJacobians.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepInterpolatorWithJacobians.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/jacobians/StepInterpolatorWithJacobians.java Sat Nov 20 21:01:50 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.ode.jaco
 
 import java.io.Externalizable;
 
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 
 /** This interface represents an interpolator over the last step
  * during an ODE integration.
@@ -88,10 +88,10 @@ public interface StepInterpolatorWithJac
    * to be preserved across several calls.</p>
    * @return state vector at time {@link #getInterpolatedTime}
    * @see #getInterpolatedYDot()
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    */
-  double[] getInterpolatedY() throws DerivativeException;
+  double[] getInterpolatedY() throws MathUserException;
 
   /**
    * Get the partial derivatives of the state vector with respect to
@@ -102,10 +102,10 @@ public interface StepInterpolatorWithJac
    * @return partial derivatives of the state vector with respect to
    * the initial state at time {@link #getInterpolatedTime}
    * @see #getInterpolatedY()
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    */
-  double[][] getInterpolatedDyDy0() throws DerivativeException;
+  double[][] getInterpolatedDyDy0() throws MathUserException;
 
   /**
    * Get the partial derivatives of the state vector with respect to
@@ -116,10 +116,10 @@ public interface StepInterpolatorWithJac
    * @return partial derivatives of the state vector with respect to
    * the ODE parameters at time {@link #getInterpolatedTime}
    * @see #getInterpolatedY()
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    */
-  double[][] getInterpolatedDyDp() throws DerivativeException;
+  double[][] getInterpolatedDyDp() throws MathUserException;
 
   /**
    * Get the time derivatives of the state vector of the interpolated point.
@@ -128,10 +128,10 @@ public interface StepInterpolatorWithJac
    * to be preserved across several calls.</p>
    * @return derivatives of the state vector at time {@link #getInterpolatedTime}
    * @see #getInterpolatedY()
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    */
-  double[] getInterpolatedYDot() throws DerivativeException;
+  double[] getInterpolatedYDot() throws MathUserException;
 
   /**
    * Get the time derivatives of the jacobian of the state vector
@@ -142,10 +142,10 @@ public interface StepInterpolatorWithJac
    * @return time derivatives of the jacobian of the state vector
    * with respect to the initial state at time {@link #getInterpolatedTime}
    * @see #getInterpolatedY()
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    */
-  double[][] getInterpolatedDyDy0Dot() throws DerivativeException;
+  double[][] getInterpolatedDyDy0Dot() throws MathUserException;
 
   /**
    * Get the time derivatives of the jacobian of the state vector
@@ -156,10 +156,10 @@ public interface StepInterpolatorWithJac
    * @return time derivatives of the jacobian of the state vector
    * with respect to the ODE parameters at time {@link #getInterpolatedTime}
    * @see #getInterpolatedY()
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    */
-  double[][] getInterpolatedDyDpDot() throws DerivativeException;
+  double[][] getInterpolatedDyDpDot() throws MathUserException;
 
   /** Check if the natural integration direction is forward.
    * <p>This method provides the integration direction as specified by
@@ -177,10 +177,10 @@ public interface StepInterpolatorWithJac
    * 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.
-   * @throws DerivativeException if this call induces an automatic
+   * @throws MathUserException if this call induces an automatic
    * step finalization that throws one
    * @see #setInterpolatedTime(double)
    */
-   StepInterpolatorWithJacobians copy() throws DerivativeException;
+   StepInterpolatorWithJacobians copy() throws MathUserException;
 
 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java Sat Nov 20 21:01:50 2010
@@ -17,8 +17,8 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.linear.Array2DRowRealMatrix;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.events.CombinedEventsManager;
@@ -189,7 +189,7 @@ public class AdamsBashforthIntegrator ex
     public double integrate(final FirstOrderDifferentialEquations equations,
                             final double t0, final double[] y0,
                             final double t, final double[] y)
-        throws DerivativeException, IntegratorException {
+        throws MathUserException, IntegratorException {
 
         final int n = y0.length;
         sanityChecks(equations, t0, y0, t, y);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsIntegrator.java Sat Nov 20 21:01:50 2010
@@ -17,8 +17,8 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.linear.Array2DRowRealMatrix;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.MultistepIntegrator;
@@ -85,7 +85,7 @@ public abstract class AdamsIntegrator ex
     public abstract double integrate(final FirstOrderDifferentialEquations equations,
                                      final double t0, final double[] y0,
                                      final double t, final double[] y)
-        throws DerivativeException, IntegratorException;
+        throws MathUserException, IntegratorException;
 
     /** {@inheritDoc} */
     @Override

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java Sat Nov 20 21:01:50 2010
@@ -19,9 +19,9 @@ package org.apache.commons.math.ode.nons
 
 import java.util.Arrays;
 
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.linear.Array2DRowRealMatrix;
 import org.apache.commons.math.linear.RealMatrixPreservingVisitor;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.events.CombinedEventsManager;
@@ -206,7 +206,7 @@ public class AdamsMoultonIntegrator exte
     public double integrate(final FirstOrderDifferentialEquations equations,
                             final double t0, final double[] y0,
                             final double t, final double[] y)
-        throws DerivativeException, IntegratorException {
+        throws MathUserException, IntegratorException {
 
         final int n = y0.length;
         sanityChecks(equations, t0, y0, t, y);

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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,9 +17,9 @@
 
 package org.apache.commons.math.ode.nonstiff;
 
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.ode.AbstractIntegrator;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.ExtendedFirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.IntegratorException;
@@ -213,14 +213,14 @@ 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 DerivativeException this exception is propagated to
+   * @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 DerivativeException {
+      throws MathUserException {
 
     if (initialStep > 0) {
       // use the user provided value
@@ -318,7 +318,7 @@ public abstract class AdaptiveStepsizeIn
   public abstract double integrate (FirstOrderDifferentialEquations equations,
                                     double t0, double[] y0,
                                     double t, double[] y)
-    throws DerivativeException, IntegratorException;
+    throws MathUserException, IntegratorException;
 
   /** {@inheritDoc} */
   @Override

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=1037328&r1=1037327&r2=1037328&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 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.sampling.StepInterpolator;
 
 /**
@@ -83,7 +83,7 @@ class ClassicalRungeKuttaStepInterpolato
     @Override
     protected void computeInterpolatedStateAndDerivatives(final double theta,
                                             final double oneMinusThetaH)
-        throws DerivativeException {
+        throws MathUserException {
 
         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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -17,8 +17,8 @@
 
 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.DerivativeException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -166,7 +166,7 @@ class DormandPrince54StepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -22,8 +22,8 @@ import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
 import org.apache.commons.math.MathRuntimeException;
+import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.ode.AbstractIntegrator;
-import org.apache.commons.math.ode.DerivativeException;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
 
 /**
@@ -313,7 +313,7 @@ class DormandPrince853StepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     if (! vectorsInitialized) {
 
@@ -387,7 +387,7 @@ class DormandPrince853StepInterpolator
   /** {@inheritDoc} */
   @Override
   protected void doFinalize()
-    throws DerivativeException {
+    throws MathUserException {
 
     if (currentState == null) {
       // we are finalizing an uninitialized instance
@@ -436,7 +436,7 @@ class DormandPrince853StepInterpolator
     try {
       // save the local attributes
       finalizeStep();
-    } catch (DerivativeException e) {
+    } catch (MathUserException e) {
       throw MathRuntimeException.createIOException(e);
     }
     final int dimension = (currentState == null) ? -1 : currentState.length;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/EmbeddedRungeKuttaIntegrator.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.IntegratorException;
 import org.apache.commons.math.ode.events.CombinedEventsManager;
@@ -193,7 +193,7 @@ public abstract class EmbeddedRungeKutta
   public double integrate(final FirstOrderDifferentialEquations equations,
                           final double t0, final double[] y0,
                           final double t, final double[] y)
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
 
     sanityChecks(equations, t0, y0, t, y);
     setEquations(equations);

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=1037328&r1=1037327&r2=1037328&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 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.sampling.StepInterpolator;
 
 /**
@@ -79,7 +79,7 @@ class EulerStepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     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=1037328&r1=1037327&r2=1037328&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 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.sampling.StepInterpolator;
 import org.apache.commons.math.util.FastMath;
 
@@ -91,7 +91,7 @@ class GillStepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     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=1037328&r1=1037327&r2=1037328&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 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.IntegratorException;
 import org.apache.commons.math.ode.events.EventHandler;
@@ -460,14 +460,14 @@ 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 DerivativeException this exception is propagated to the caller if the
+   * @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 DerivativeException {
+    throws MathUserException {
 
     final int    n        = sequence[k];
     final double subStep  = step / n;
@@ -556,7 +556,7 @@ public class GraggBulirschStoerIntegrato
   @Override
   public double integrate(final FirstOrderDifferentialEquations equations,
                           final double t0, final double[] y0, final double t, final double[] y)
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
 
     sanityChecks(equations, t0, y0, t, y);
     setEquations(equations);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/GraggBulirschStoerStepInterpolator.java Sat Nov 20 21:01:50 2010
@@ -21,7 +21,7 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-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.StepInterpolator;
 import org.apache.commons.math.util.FastMath;
@@ -311,7 +311,7 @@ class GraggBulirschStoerStepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     final int dimension = currentState.length;
 

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=1037328&r1=1037327&r2=1037328&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 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.sampling.StepInterpolator;
 
 /**
@@ -71,7 +71,7 @@ class HighamHall54StepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     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=1037328&r1=1037327&r2=1037328&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 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.sampling.StepInterpolator;
 
 /**
@@ -81,7 +81,7 @@ class MidpointStepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-    throws DerivativeException {
+    throws MathUserException {
 
     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/RungeKuttaIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java?rev=1037328&r1=1037327&r2=1037328&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/ode/nonstiff/RungeKuttaIntegrator.java Sat Nov 20 21:01:50 2010
@@ -18,8 +18,8 @@
 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.DerivativeException;
 import org.apache.commons.math.ode.FirstOrderDifferentialEquations;
 import org.apache.commons.math.ode.IntegratorException;
 import org.apache.commons.math.ode.events.CombinedEventsManager;
@@ -96,7 +96,7 @@ public abstract class RungeKuttaIntegrat
   public double integrate(final FirstOrderDifferentialEquations equations,
                           final double t0, final double[] y0,
                           final double t, final double[] y)
-  throws DerivativeException, IntegratorException {
+  throws MathUserException, IntegratorException {
 
     sanityChecks(equations, t0, y0, t, y);
     setEquations(equations);

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=1037328&r1=1037327&r2=1037328&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 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.sampling.StepInterpolator;
 
 /**
@@ -86,7 +86,7 @@ class ThreeEighthesStepInterpolator
   @Override
   protected void computeInterpolatedStateAndDerivatives(final double theta,
                                           final double oneMinusThetaH)
-      throws DerivativeException {
+      throws MathUserException {
 
       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=1037328&r1=1037327&r2=1037328&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 Sat Nov 20 21:01:50 2010
@@ -22,7 +22,7 @@ import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
 import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.ode.DerivativeException;
+import org.apache.commons.math.exception.MathUserException;
 
 /** This abstract class represents an interpolator over the last step
  * during an ODE integration.
@@ -184,7 +184,7 @@ public abstract class AbstractStepInterp
   }
 
   /** {@inheritDoc} */
-   public StepInterpolator copy() throws DerivativeException {
+   public StepInterpolator copy() throws MathUserException {
 
      // finalize the step before performing copy
      finalizeStep();
@@ -258,15 +258,15 @@ 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 DerivativeException this exception is propagated to the caller if the
+   * @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 DerivativeException;
+    throws MathUserException;
 
   /** {@inheritDoc} */
-  public double[] getInterpolatedState() throws DerivativeException {
+  public double[] getInterpolatedState() throws MathUserException {
 
       // lazy evaluation of the state
       if (dirtyState) {
@@ -281,7 +281,7 @@ public abstract class AbstractStepInterp
   }
 
   /** {@inheritDoc} */
-  public double[] getInterpolatedDerivatives() throws DerivativeException {
+  public double[] getInterpolatedDerivatives() throws MathUserException {
 
       // lazy evaluation of the state
       if (dirtyState) {
@@ -333,11 +333,11 @@ public abstract class AbstractStepInterp
    * Therefore, subclasses are not allowed not reimplement it, they
    * should rather reimplement <code>doFinalize</code>.</p>
 
-   * @throws DerivativeException this exception is propagated to the
+   * @throws MathUserException this exception is propagated to the
    * caller if the underlying user function triggers one
    */
   public final void finalizeStep()
-    throws DerivativeException {
+    throws MathUserException {
     if (! finalized) {
       doFinalize();
       finalized = true;
@@ -347,11 +347,11 @@ public abstract class AbstractStepInterp
   /**
    * Really finalize the step.
    * The default implementation of this method does nothing.
-   * @throws DerivativeException this exception is propagated to the
+   * @throws MathUserException this exception is propagated to the
    * caller if the underlying user function triggers one
    */
   protected void doFinalize()
-    throws DerivativeException {
+    throws MathUserException {
   }
 
   /** {@inheritDoc} */
@@ -395,7 +395,7 @@ public abstract class AbstractStepInterp
     // finalize the step (and don't bother saving the now true flag)
     try {
       finalizeStep();
-    } catch (DerivativeException e) {
+    } catch (MathUserException e) {
       throw MathRuntimeException.createIOException(e);
     }
 



Mime
View raw message