* The divided difference array is defined recursively by

```      * f[x0] = f(x0)
@@ -85,15 +84,18 @@ public class DividedDifferenceInterpolat
*
* The computational complexity is O(N^2).
*
-     * @param x the interpolating points array
-     * @param y the interpolating values array
-     * @return a fresh copy of the divided difference array
-     * @throws DuplicateSampleAbscissaException if any abscissas coincide
+     * @param x Interpolating points array.
+     * @param y Interpolating values array.
+     * @return a fresh copy of the divided difference array.
+     * @throws org.apache.commons.math.exception.DimensionMismatchException
+     * if the array lengths are different.
+     * @throws org.apache.commons.math.exception.NumberIsTooSmallException
+     * if the number of points is less than 2.
+     * @throws org.apache.commons.math.exception.NonMonotonousSequenceException
+     * if {@code x} is not sorted in strictly increasing order.
*/
-    protected static double[] computeDividedDifference(final double x[], final double y[])
-        throws DuplicateSampleAbscissaException {
-
-        PolynomialFunctionLagrangeForm.verifyInterpolationArray(x, y);
+    protected static double[] computeDividedDifference(final double x[], final double y[]) {
+        PolynomialFunctionLagrangeForm.verifyInterpolationArray(x, y, true);

final double[] divdiff = y.clone(); // initialization

@@ -103,10 +105,6 @@ public class DividedDifferenceInterpolat
for (int i = 1; i < n; i++) {
for (int j = 0; j < n-i; j++) {
final double denominator = x[j+i] - x[j];
-                if (denominator == 0.0) {
-                    // This happens only when two abscissas are identical.
-                    throw new DuplicateSampleAbscissaException(x[j], j, j+i);
-                }
divdiff[j] = (divdiff[j+1] - divdiff[j]) / denominator;
}
a[i] = divdiff[0];

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java Wed Nov  3 13:46:04 2010
@@ -16,12 +16,12 @@
*/
package org.apache.commons.math.analysis.polynomials;

-import org.apache.commons.math.DuplicateSampleAbscissaException;
-import org.apache.commons.math.FunctionEvaluationException;
-import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
-import org.apache.commons.math.exception.util.LocalizedFormats;
import org.apache.commons.math.util.FastMath;
+import org.apache.commons.math.util.MathUtils;
+import org.apache.commons.math.exception.DimensionMismatchException;
+import org.apache.commons.math.exception.NumberIsTooSmallException;
+import org.apache.commons.math.exception.util.LocalizedFormats;

/**
* Implements the representation of a real polynomial function in
@@ -36,24 +36,20 @@ import org.apache.commons.math.util.Fast
* @since 1.2
*/
public class PolynomialFunctionLagrangeForm implements UnivariateRealFunction {
-
/**
* The coefficients of the polynomial, ordered by degree -- i.e.
* coefficients[0] is the constant term and coefficients[n] is the
* coefficient of x^n where n is the degree of the polynomial.
*/
private double coefficients[];
-
/**
* Interpolating points (abscissas).
*/
private final double x[];
-
/**
* Function values at interpolating points.
*/
private final double y[];
-
/**
* Whether the polynomial coefficients are available.
*/
@@ -69,31 +65,34 @@ public class PolynomialFunctionLagrangeF
* @param y function values at interpolating points
* @throws IllegalArgumentException if input arrays are not valid
*/
-    public PolynomialFunctionLagrangeForm(double x[], double y[])
-        throws IllegalArgumentException {
-
-        verifyInterpolationArray(x, y);
+    public PolynomialFunctionLagrangeForm(double x[], double y[]) {
this.x = new double[x.length];
this.y = new double[y.length];
System.arraycopy(x, 0, this.x, 0, x.length);
System.arraycopy(y, 0, this.y, 0, y.length);
coefficientsComputed = false;
+
+        if (!verifyInterpolationArray(x, y, false)) {
+            MathUtils.sortInPlace(this.x, this.y);
+            // Second check in case some abscissa is duplicated.
+            verifyInterpolationArray(this.x, this.y, true);
+        }
}

/**
* Calculate the function value at the given point.
*
-     * @param z the point at which the function value is to be computed
-     * @return the function value
-     * @throws FunctionEvaluationException if a runtime error occurs
-     * @see UnivariateRealFunction#value(double)
-     */
-    public double value(double z) throws FunctionEvaluationException {
-        try {
-            return evaluate(x, y, z);
-        } catch (DuplicateSampleAbscissaException e) {
-            throw new FunctionEvaluationException(e, z, e.getLocalizablePattern(), e.getArguments());
-        }
+     * @param z Point at which the function value is to be computed.
+     * @return the function value.
+     * @throws DimensionMismatchException if {@code x} and {@code y} have
+     * different lengths.
+     * @throws org.apache.commons.math.exception.NonMonotonousSequenceException
+     * if {@code x} is not sorted in strictly increasing order.
+     * @throws NumberIsTooSmallException if the size of {@code x} is less
+     * than 2.
+     */
+    public double value(double z) {
+        return evaluateInternal(x, y, z);
}

/**
@@ -153,23 +152,53 @@ public class PolynomialFunctionLagrangeF
/**
* Evaluate the Lagrange polynomial using
*
-     * Neville's Algorithm. It takes O(N^2) time.
-     *
-     * This function is made public static so that users can call it directly
-     * without instantiating PolynomialFunctionLagrangeForm object.
+     * Neville's Algorithm. It takes O(n^2) time.
*
-     * @param x the interpolating points array
-     * @param y the interpolating values array
-     * @param z the point at which the function value is to be computed
-     * @return the function value
-     * @throws DuplicateSampleAbscissaException if the sample has duplicate abscissas
-     * @throws IllegalArgumentException if inputs are not valid
-     */
-    public static double evaluate(double x[], double y[], double z) throws
-        DuplicateSampleAbscissaException, IllegalArgumentException {
+     * @param x Interpolating points array.
+     * @param y Interpolating values array.
+     * @param z Point at which the function value is to be computed.
+     * @return the function value.
+     * @throws DimensionMismatchException if {@code x} and {@code y} have
+     * different lengths.
+     * @throws org.apache.commons.math.exception.NonMonotonousSequenceException
+     * if {@code x} is not sorted in strictly increasing order.
+     * @throws NumberIsTooSmallException if the size of {@code x} is less
+     * than 2.
+     */
+    public static double evaluate(double x[], double y[], double z) {
+        if (verifyInterpolationArray(x, y, false)) {
+            return evaluateInternal(x, y, z);
+        }

-        verifyInterpolationArray(x, y);
+        // Array is not sorted.
+        final double[] xNew = new double[x.length];
+        final double[] yNew = new double[y.length];
+        System.arraycopy(x, 0, xNew, 0, x.length);
+        System.arraycopy(y, 0, yNew, 0, y.length);
+
+        MathUtils.sortInPlace(xNew, yNew);
+        // Second check in case some abscissa is duplicated.
+        verifyInterpolationArray(xNew, yNew, true);
+        return evaluateInternal(xNew, yNew, z);
+    }

+    /**
+     * Evaluate the Lagrange polynomial using
+     *
+     * Neville's Algorithm. It takes O(n^2) time.
+     *
+     * @param x Interpolating points array.
+     * @param y Interpolating values array.
+     * @param z Point at which the function value is to be computed.
+     * @return the function value.
+     * @throws DimensionMismatchException if {@code x} and {@code y} have
+     * different lengths.
+     * @throws org.apache.commons.math.exception.NonMonotonousSequenceException
+     * if {@code x} is not sorted in strictly increasing order.
+     * @throws NumberIsTooSmallException if the size of {@code x} is less
+     * than 2.
+     */
+    private static double evaluateInternal(double x[], double y[], double z) {
int nearest = 0;
final int n = x.length;
final double[] c = new double[n];
@@ -195,10 +224,6 @@ public class PolynomialFunctionLagrangeF
final double tc = x[j] - z;
final double td = x[i+j] - z;
final double divider = x[j] - x[i+j];
-                if (divider == 0.0) {
-                    // This happens only when two abscissas are identical.
-                    throw new DuplicateSampleAbscissaException(x[i], i, i+j);
-                }
// update the difference arrays
final double w = (c[j+1] - d[j]) / divider;
c[j] = tc * w;
@@ -218,15 +243,11 @@ public class PolynomialFunctionLagrangeF

/**
* Calculate the coefficients of Lagrange polynomial from the
-     * interpolation data. It takes O(N^2) time.
-     *
-     * Note this computation can be ill-conditioned. Use with caution
-     * and only when it is necessary.
-     *
-     * @throws ArithmeticException if any abscissas coincide
+     * interpolation data. It takes O(n^2) time.
+     * Note that this computation can be ill-conditioned: Use with caution
+     * and only when it is necessary.
*/
-    protected void computeCoefficients() throws ArithmeticException {
-
+    protected void computeCoefficients() {
final int n = degree() + 1;
coefficients = new double[n];
for (int i = 0; i < n; i++) {
@@ -253,16 +274,6 @@ public class PolynomialFunctionLagrangeF
d *= x[i] - x[j];
}
}
-            if (d == 0.0) {
-                // This happens only when two abscissas are identical.
-                for (int k = 0; k < n; ++k) {
-                    if ((i != k) && (x[i] == x[k])) {
-                        throw MathRuntimeException.createArithmeticException(
-                              LocalizedFormats.IDENTICAL_ABSCISSAS_DIVISION_BY_ZERO,
-                              i, k, x[i]);
-                    }
-                }
-            }
final double t = y[i] / d;
// Lagrange polynomial is the sum of n terms, each of which is a
// polynomial of degree n-1. tc[] are the coefficients of the i-th
@@ -279,34 +290,31 @@ public class PolynomialFunctionLagrangeF
}

/**
-     * Verifies that the interpolation arrays are valid.
-     *
+     * Check that the interpolation arrays are valid.
* The arrays features checked by this method are that both arrays have the
* same length and this length is at least 2.
-     *
-     *
-     * The interpolating points must be distinct. However it is not
-     * verified here, it is checked in evaluate() and computeCoefficients().
-     *
*
-     * @param x the interpolating points array
-     * @param y the interpolating values array
-     * @throws IllegalArgumentException if not valid
+     * @param x Interpolating points array.
+     * @param y Interpolating values array.
+     * @param abort Whether to throw an exception if {@code x} is not sorted.
+     * @throws DimensionMismatchException if the array lengths are different.
+     * @throws NumberIsTooSmallException if the number of points is less than 2.
+     * @throws org.apache.commons.math.exception.NonMonotonousSequenceException
+     * if {@code x} is not sorted in strictly increasing order and {@code abort}
+     * is {@code true}.
+     * @return {@code false} if the {@code x} is not sorted in increasing order,
+     * {@code true} otherwise.
* @see #evaluate(double[], double[], double)
* @see #computeCoefficients()
*/
-    public static void verifyInterpolationArray(double x[], double y[])
-        throws IllegalArgumentException {
-
+    public static boolean verifyInterpolationArray(double x[], double y[], boolean abort) {
if (x.length != y.length) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE, x.length, y.length);
+            throw new DimensionMismatchException(x.length, y.length);
}
-
if (x.length < 2) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.WRONG_NUMBER_OF_POINTS, 2, x.length);
+            throw new NumberIsTooSmallException(LocalizedFormats.WRONG_NUMBER_OF_POINTS, 2, x.length, true);
}

+        return MathUtils.checkOrder(x, MathUtils.OrderDirection.INCREASING, true, abort);
}
}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionNewtonForm.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
*/
package org.apache.commons.math.analysis.polynomials;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.exception.util.LocalizedFormats;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunction.java Wed Nov  3 13:46:04 2010
@@ -18,10 +18,13 @@ package org.apache.commons.math.analysis

import java.util.Arrays;

-import org.apache.commons.math.ArgumentOutsideDomainException;
-import org.apache.commons.math.MathRuntimeException;
+import org.apache.commons.math.util.MathUtils;
import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.OutOfRangeException;
+import org.apache.commons.math.exception.NumberIsTooSmallException;
+import org.apache.commons.math.exception.DimensionMismatchException;
+import org.apache.commons.math.exception.NullArgumentException;
import org.apache.commons.math.exception.util.LocalizedFormats;

/**
@@ -58,24 +61,23 @@ import org.apache.commons.math.exception
*
* @version \$Revision\$ \$Date\$
*/
-public class PolynomialSplineFunction
-    implements DifferentiableUnivariateRealFunction {
-
-    /** Spline segment interval delimiters (knots).   Size is n+1 for n segments. */
+public class PolynomialSplineFunction implements DifferentiableUnivariateRealFunction {
+    /**
+     * Spline segment interval delimiters (knots).
+     * Size is n + 1 for n segments.
+     */
private final double knots[];
-
/**
* The polynomial functions that make up the spline.  The first element
* determines the value of the spline over the first subinterval, the
* second over the second, etc.   Spline function values are determined by
-     * evaluating these functions at `(x - knot[i])` where i is the
+     * evaluating these functions at {@code (x - knot[i])} where i is the
* knot segment to which x belongs.
*/
private final PolynomialFunction polynomials[];
-
/**
-     * Number of spline segments = number of polynomials
-     *  = number of partition points - 1
+     * Number of spline segments. It is equal to the number of polynomials and
+     * to the number of partition points - 1.
*/
private final int n;

@@ -83,33 +85,31 @@ public class PolynomialSplineFunction
/**
* Construct a polynomial spline function with the given segment delimiters
* and interpolating polynomials.
-     *
* The constructor copies both arrays and assigns the copies to the knots
-     * and polynomials properties, respectively.
+     * and polynomials properties, respectively.
*
-     * @param knots spline segment interval delimiters
-     * @param polynomials polynomial functions that make up the spline
-     * @throws NullPointerException if either of the input arrays is null
-     * @throws IllegalArgumentException if knots has length less than 2,
-     * `polynomials.length != knots.length - 1 `, or the knots array
-     * is not strictly increasing.
+     * @param knots Spline segment interval delimiters.
+     * @param polynomials Polynomial functions that make up the spline.
+     * @throws NullArgumentException if either of the input arrays is {@code null}.
+     * @throws NumberIsTooSmallException if knots has length less than 2.
+     * @throws DimensionMismatchException if {@code polynomials.length != knots.length - 1}.
+     * @throws org.apache.commons.math.exception.NonMonotonousSequenceException if
+     * the {@code knots} array is not strictly increasing.
*
*/
public PolynomialSplineFunction(double knots[], PolynomialFunction polynomials[]) {
+        if (knots == null ||
+            polynomials == null) {
+            throw new NullArgumentException();
+        }
if (knots.length < 2) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.NOT_ENOUGH_POINTS_IN_SPLINE_PARTITION,
-                  2, knots.length);
+            throw new NumberIsTooSmallException(LocalizedFormats.NOT_ENOUGH_POINTS_IN_SPLINE_PARTITION,
+                                                2, knots.length, false);
}
if (knots.length - 1 != polynomials.length) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS,
-                  polynomials.length, knots.length);
-        }
-        if (!isStrictlyIncreasing(knots)) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.NOT_STRICTLY_INCREASING_KNOT_VALUES);
+            throw new DimensionMismatchException(polynomials.length, knots.length);
}
+        MathUtils.checkOrder(knots);

this.n = knots.length -1;
this.knots = new double[n + 1];
@@ -120,30 +120,26 @@ public class PolynomialSplineFunction

/**
* Compute the value for the function.
-     *
-     * Throws FunctionEvaluationException if v is outside of the domain of the
-     * function.  The domain is [smallest knot, largest knot].
-     *
* See {@link PolynomialSplineFunction} for details on the algorithm for
-     * computing the value of the function.
+     * computing the value of the function.
*
-     * @param v the point for which the function value should be computed
-     * @return the value
-     * @throws ArgumentOutsideDomainException if v is outside of the domain of
-     * of the spline function (less than the smallest knot point or greater
-     * than the largest knot point)
+     * @param v Point for which the function value should be computed.
+     * @return the value.
+     * @throws OutOfRangeException if {@code v} is outside of the domain of the
+     * spline function (smaller than the smallest knot point or larger than the
+     * largest knot point).
*/
-    public double value(double v) throws ArgumentOutsideDomainException {
+    public double value(double v) {
if (v < knots[0] || v > knots[n]) {
-            throw new ArgumentOutsideDomainException(v, knots[0], knots[n]);
+            throw new OutOfRangeException(v, knots[0], knots[n]);
}
int i = Arrays.binarySearch(knots, v);
if (i < 0) {
i = -i - 2;
}
-        //This will handle the case where v is the last knot value
-        //There are only n-1 polynomials, so if v is the last knot
-        //then we will use the last polynomial to calculate the value.
+        // This will handle the case where v is the last knot value
+        // There are only n-1 polynomials, so if v is the last knot
+        // then we will use the last polynomial to calculate the value.
if ( i >= polynomials.length ) {
i--;
}
@@ -151,17 +147,18 @@ public class PolynomialSplineFunction
}

/**
-     * Returns the derivative of the polynomial spline function as a UnivariateRealFunction
-     * @return  the derivative function
+     * Get the derivative of the polynomial spline function.
+     *
+     * @return the derivative function.
*/
public UnivariateRealFunction derivative() {
return polynomialSplineDerivative();
}

/**
-     * Returns the derivative of the polynomial spline function as a PolynomialSplineFunction
+     * Get the derivative of the polynomial spline function.
*
-     * @return  the derivative function
+     * @return the derivative function.
*/
public PolynomialSplineFunction polynomialSplineDerivative() {
PolynomialFunction derivativePolynomials[] = new PolynomialFunction[n];
@@ -172,22 +169,21 @@ public class PolynomialSplineFunction
}

/**
-     * Returns the number of spline segments = the number of polynomials
-     * = the number of knot points - 1.
+     * Get the number of spline segments.
+     * It is also the number of polynomials and the number of knot points - 1.
*
-     * @return the number of spline segments
+     * @return the number of spline segments.
*/
public int getN() {
return n;
}

/**
-     * Returns a copy of the interpolating polynomials array.
-     *
-     * Returns a fresh copy of the array. Changes made to the copy will
-     * not affect the polynomials property.
+     * Get a copy of the interpolating polynomials array.
+     * It returns a fresh copy of the array. Changes made to the copy will
+     * not affect the polynomials property.
*
-     * @return the interpolating polynomials
+     * @return the interpolating polynomials.
*/
public PolynomialFunction[] getPolynomials() {
PolynomialFunction p[] = new PolynomialFunction[n];
@@ -196,33 +192,15 @@ public class PolynomialSplineFunction
}

/**
-     * Returns an array copy of the knot points.
-     *
-     * Returns a fresh copy of the array. Changes made to the copy
-     * will not affect the knots property.
+     * Get an array copy of the knot points.
+     * It returns a fresh copy of the array. Changes made to the copy
+     * will not affect the knots property.
*
-     * @return the knot points
+     * @return the knot points.
*/
public double[] getKnots() {
double out[] = new double[n + 1];
System.arraycopy(knots, 0, out, 0, n + 1);
return out;
}
-
-    /**
-     * Determines if the given array is ordered in a strictly increasing
-     * fashion.
-     *
-     * @param x the array to examine.
-     * @return `true` if the elements in `x` are ordered
-     * in a stricly increasing manner.  `false`, otherwise.
-     */
-    private static boolean isStrictlyIncreasing(double[] x) {
-        for (int i = 1; i < x.length; ++i) {
-            if (x[i - 1] >= x[i]) {
-                return false;
-            }
-        }
-        return true;
-    }
}

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BisectionSolver.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
*/
package org.apache.commons.math.analysis.solvers;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.util.FastMath;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BrentSolver.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
package org.apache.commons.math.analysis.solvers;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.UnivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
package org.apache.commons.math.analysis.solvers;

import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.UnivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/MullerSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/MullerSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/MullerSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/MullerSolver.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
package org.apache.commons.math.analysis.solvers;

import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.util.FastMath;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@

package org.apache.commons.math.analysis.solvers;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;

==============================================================================
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/RiddersSolver.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
package org.apache.commons.math.analysis.solvers;

import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.util.FastMath;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/SecantSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/SecantSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/SecantSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/SecantSolver.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
package org.apache.commons.math.analysis.solvers;

import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.MaxIterationsExceededException;
import org.apache.commons.math.analysis.UnivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolver.java Wed Nov  3 13:46:04 2010
@@ -18,7 +18,7 @@ package org.apache.commons.math.analysis

import org.apache.commons.math.ConvergenceException;
import org.apache.commons.math.ConvergingAlgorithm;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.analysis.UnivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java Wed Nov  3 13:46:04 2010
@@ -18,7 +18,7 @@
package org.apache.commons.math.analysis.solvers;

import org.apache.commons.math.ConvergingAlgorithmImpl;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.exception.util.LocalizedFormats;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
*/
package org.apache.commons.math.analysis.solvers;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.ConvergenceException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.analysis.UnivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.distribu
import java.io.Serializable;

import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.analysis.solvers.BrentSolver;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/distribution/AbstractIntegerDistribution.java Wed Nov  3 13:46:04 2010
@@ -18,7 +18,7 @@ package org.apache.commons.math.distribu

import java.io.Serializable;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathException;
import org.apache.commons.math.exception.NotStrictlyPositiveException;
import org.apache.commons.math.exception.NumberIsTooSmallException;

URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/FunctionEvaluationException.java?rev=1030464&view=auto
==============================================================================
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/FunctionEvaluationException.java Wed Nov  3 13:46:04 2010
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.exception;
+
+import java.util.Locale;
+
+import org.apache.commons.math.exception.util.ArgUtils;
+import org.apache.commons.math.exception.util.MessageFactory;
+import org.apache.commons.math.exception.util.Localizable;
+import org.apache.commons.math.exception.util.LocalizedFormats;
+
+/**
+ * Exception for signalling that a function object could not return
+ * a valid result.
+ *
+ * @since 3.0
+ * @version \$Revision\$ \$Date\$
+ */
+public class FunctionEvaluationException extends RuntimeException {
+    /** Serializable version Id. */
+    private static final long serialVersionUID = -6024911025449780478L;
+    /**
+     * Pattern used to build the message.
+     */
+    private final Localizable specific;
+    /**
+     * Arguments used to build the message.
+     */
+    private final Object[] arguments;
+
+    /**
+     * @param specific Message pattern providing the specific context of
+     * the error.
+     * @param args Arguments.
+     */
+    public FunctionEvaluationException(Localizable specific,
+                                       Object ... args) {
+        this.specific = specific;
+        arguments = ArgUtils.flatten(args);
+    }
+    /**
+     * @param args Arguments.
+     */
+    public FunctionEvaluationException(Object ... args) {
+        this(null, args);
+    }
+
+    /**
+     * Get the arguments.
+     *
+     * @return a (shallow) copy of the arguments.
+     */
+    public Object[] getArguments() {
+        return arguments.clone();
+    }
+
+    /**
+     * Get the message in a specified locale.
+     *
+     * @param locale Locale in which the message should be translated.
+     *
+     * @return the localized message.
+     */
+    public String getMessage(final Locale locale) {
+        return MessageFactory.buildMessage(locale,
+                                           specific,
+                                           LocalizedFormats.EVALUATION,
+                                           arguments);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String getMessage() {
+        return getMessage(Locale.US);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String getLocalizedMessage() {
+        return getMessage(Locale.getDefault());
+    }
+}

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/FunctionEvaluationException.java
------------------------------------------------------------------------------
svn:eol-style = native

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/exception/util/LocalizedFormats.java Wed Nov  3 13:46:04 2010
@@ -48,8 +48,8 @@ public enum LocalizedFormats implements
AT_LEAST_ONE_COLUMN("matrix must have at least one column"),
AT_LEAST_ONE_ROW("matrix must have at least one row"),
BANDWIDTH_OUT_OF_INTERVAL("bandwidth must be in the interval [0,1], but got {0}"),
-    BINOMIAL_INVALID_PARAMETERS_ORDER("must have n >= k for binomial coefficient (n,k), got n = {0}, k = {1}"),
-    BINOMIAL_NEGATIVE_PARAMETER("must have n >= 0 for binomial coefficient (n,k), got n = {0}"),
+    BINOMIAL_INVALID_PARAMETERS_ORDER("must have n >= k for binomial coefficient (n, k), got k = {0}, n = {1}"),
+    BINOMIAL_NEGATIVE_PARAMETER("must have n >= 0 for binomial coefficient (n, k), got n = {0}"),
CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS("statistics constructed from external moments cannot be cleared"),
CANNOT_COMPUTE_0TH_ROOT_OF_UNITY("cannot compute 0-th root of unity, indefinite result"),
CANNOT_COMPUTE_BETA_DENSITY_AT_0_FOR_SOME_ALPHA("cannot compute beta density at 0 when alpha = {0,number}"),
@@ -95,6 +95,7 @@ public enum LocalizedFormats implements
EQUAL_VERTICES_IN_SIMPLEX("equal vertices {0} and {1} in simplex configuration"),
EULER_ANGLES_SINGULARITY("Euler angles singularity"),
EVALUATION_FAILED("evaluation failed for argument = {0}"),
+    EVALUATION("evaluation"), /* keep */
EXPANSION_FACTOR_SMALLER_THAN_ONE("expansion factor smaller than one ({0})"),
FACTORIAL_NEGATIVE_PARAMETER("must have n >= 0 for n!, got n = {0}"),
FAILED_BRACKETING("number of iterations={0}, maximum iterations={1}, initial={2}, lower bound={3}, upper bound={4}, final a value={5}, final b value={6}, f(a)={7}, f(b)={8}"),

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=1030464&r1=1030463&r2=1030464&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 Wed Nov  3 13:46:04 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.linear;
import java.util.Iterator;
import java.util.NoSuchElementException;

-import org.apache.commons.math.FunctionEvaluationException;
+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.OutOfRangeException;

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=1030464&r1=1030463&r2=1030464&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 Wed Nov  3 13:46:04 2010
@@ -18,7 +18,7 @@ package org.apache.commons.math.linear;

import java.util.Iterator;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.analysis.UnivariateRealFunction;

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=1030464&r1=1030463&r2=1030464&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 Wed Nov  3 13:46:04 2010
@@ -18,7 +18,7 @@
package org.apache.commons.math.ode.events;

import org.apache.commons.math.ConvergenceException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.analysis.solvers.BrentSolver;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java Wed Nov  3 13:46:04 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.optimiza
import java.util.Arrays;
import java.util.Comparator;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.exception.MathIllegalStateException;
import org.apache.commons.math.exception.ConvergenceException;
import org.apache.commons.math.analysis.MultivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java Wed Nov  3 13:46:04 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.optimiza
import java.util.Arrays;
import java.util.Comparator;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.exception.MathIllegalStateException;
import org.apache.commons.math.exception.ConvergenceException;
import org.apache.commons.math.analysis.MultivariateVectorialFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateRealOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateRealOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateRealOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateRealOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@

package org.apache.commons.math.optimization;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.analysis.MultivariateRealFunction;

/**
@@ -45,7 +45,7 @@ public interface BaseMultivariateRealOpt
* @param startPoint Start point for optimization.
* @return the point/value pair giving the optimal value for objective
* function.
-     * @throws org.apache.commons.math.FunctionEvaluationException if the
+     * @throws org.apache.commons.math.exception.FunctionEvaluationException if the
* objective function throws one during the search.
* @throws org.apache.commons.math.exception.DimensionMismatchException
* if the start point dimension is wrong.

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@

package org.apache.commons.math.optimization;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.analysis.MultivariateVectorialFunction;

/**

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/LeastSquaresConverter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/LeastSquaresConverter.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/LeastSquaresConverter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/LeastSquaresConverter.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@

package org.apache.commons.math.optimization;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.analysis.MultivariateRealFunction;
import org.apache.commons.math.analysis.MultivariateVectorialFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/AbstractSimplex.java Wed Nov  3 13:46:04 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.optimiza
import java.util.Arrays;
import java.util.Comparator;

-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
import org.apache.commons.math.analysis.MultivariateRealFunction;
import org.apache.commons.math.exception.NotStrictlyPositiveException;
import org.apache.commons.math.exception.DimensionMismatchException;

```