commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1030464 [2/3] - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/integration/ main/java/org/apache/commons/math/analysis/interpolat...
Date Wed, 03 Nov 2010 13:46:08 GMT
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractScalarOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractScalarOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractScalarOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractScalarOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.direct;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.Incrementor;
 import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.TooManyEvaluationsException;

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/MultiDirectionalSimplex.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.optimiza
 
 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.optimization.RealPointValuePair;
 

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/PowellOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.direct;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.analysis.MultivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java Wed Nov  3 13:46:04 2010
@@ -19,13 +19,14 @@ package org.apache.commons.math.optimiza
 
 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.NullArgumentException;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.ConvergenceChecker;
 import org.apache.commons.math.optimization.RealPointValuePair;
 import org.apache.commons.math.optimization.SimpleScalarValueChecker;
+import org.apache.commons.math.optimization.MultivariateRealOptimizer;
 
 /**
  * This class implements simplex-based direct search optimization.
@@ -76,7 +77,8 @@ import org.apache.commons.math.optimizat
  * @since 3.0
  */
 public class SimplexOptimizer
-    extends BaseAbstractScalarOptimizer<MultivariateRealFunction> {
+    extends BaseAbstractScalarOptimizer<MultivariateRealFunction>
+    implements MultivariateRealOptimizer {
     /** Simplex. */
     private AbstractSimplex simplex;
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java Wed Nov  3 13:46:04 2010
@@ -20,7 +20,7 @@ package org.apache.commons.math.optimiza
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.analysis.DifferentiableMultivariateVectorialFunction;
 import org.apache.commons.math.analysis.MultivariateMatrixFunction;
 import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianDerivativeFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianDerivativeFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianDerivativeFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianDerivativeFunction.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.optimiza
 
 import java.io.Serializable;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.util.LocalizedFormats;

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFunction.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.optimiza
 
 import java.io.Serializable;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.exception.DimensionMismatchException;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.fitting;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricGaussianFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricGaussianFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricGaussianFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricGaussianFunction.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.optimiza
 
 import java.io.Serializable;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.exception.DimensionMismatchException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.exception.ZeroException;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/ParametricRealFunction.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.fitting;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 
 /**
  * An interface representing a real function that depends on one independent

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.fitting;
 
-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.polynomials.PolynomialFunction;
 import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer;

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

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/GaussNewtonOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.general;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.linear.BlockRealMatrix;
 import org.apache.commons.math.linear.DecompositionSolver;

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.general;
 
-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.UnivariateRealFunction;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/Preconditioner.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/Preconditioner.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/Preconditioner.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/general/Preconditioner.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.general;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 
 /**
  * This interface represents a preconditioner for differentiable scalar

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java Wed Nov  3 13:46:04 2010
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.optimization.univariate;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.Incrementor;
 import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.TooManyEvaluationsException;

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BracketFinder.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BracketFinder.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BracketFinder.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BracketFinder.java Wed Nov  3 13:46:04 2010
@@ -20,7 +20,7 @@ import org.apache.commons.math.util.Incr
 import org.apache.commons.math.exception.NotStrictlyPositiveException;
 import org.apache.commons.math.exception.TooManyEvaluationsException;
 import org.apache.commons.math.exception.MaxCountExceededException;
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.optimization.GoalType;
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.optimization.univariate;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.MathUtils;
 import org.apache.commons.math.util.FastMath;
 import org.apache.commons.math.exception.NumberIsTooSmallException;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/MultiStartUnivariateRealOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/MultiStartUnivariateRealOptimizer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/MultiStartUnivariateRealOptimizer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/MultiStartUnivariateRealOptimizer.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.UnivariateRealFunction;
 import org.apache.commons.math.exception.MathIllegalStateException;
 import org.apache.commons.math.exception.ConvergenceException;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastCosineTransformer.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.transform;
 
-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.complex.Complex;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.transfor
 import java.io.Serializable;
 import java.lang.reflect.Array;
 
-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.complex.Complex;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastHadamardTransformer.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.transform;
 
-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/transform/FastSineTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/FastSineTransformer.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.transform;
 
-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.complex.Complex;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/transform/RealTransformer.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.transform;
 
-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/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Wed Nov  3 13:46:04 2010
@@ -20,11 +20,23 @@ package org.apache.commons.math.util;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.Arrays;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Map;
+import java.util.AbstractMap;
+import java.util.Collections;
 
 import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.exception.util.Localizable;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.exception.NonMonotonousSequenceException;
+import org.apache.commons.math.exception.DimensionMismatchException;
+import org.apache.commons.math.exception.NullArgumentException;
+import org.apache.commons.math.exception.NotPositiveException;
+import org.apache.commons.math.exception.MathArithmeticException;
+import org.apache.commons.math.exception.MathIllegalArgumentException;
+import org.apache.commons.math.exception.NumberIsTooLargeException;
 
 /**
  * Some useful additions to the built-in functions in {@link Math}.
@@ -94,14 +106,14 @@ public final class MathUtils {
      * @param x an addend
      * @param y an addend
      * @return the sum <code>x+y</code>
-     * @throws ArithmeticException if the result can not be represented as an
-     *         int
+     * @throws MathArithmeticException if the result can not be represented
+     * as an {@code int}.
      * @since 1.1
      */
     public static int addAndCheck(int x, int y) {
         long s = (long)x + (long)y;
         if (s < Integer.MIN_VALUE || s > Integer.MAX_VALUE) {
-            throw MathRuntimeException.createArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, x, y);
+            throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, x, y);
         }
         return (int)s;
     }
@@ -123,12 +135,12 @@ public final class MathUtils {
     /**
      * Add two long integers, checking for overflow.
      *
-     * @param a an addend
-     * @param b an addend
-     * @param pattern the pattern to use for any thrown exception.
-     * @return the sum <code>a+b</code>
-     * @throws ArithmeticException if the result can not be represented as an
-     *         long
+     * @param a Addend.
+     * @param b Addend.
+     * @param pattern Pattern to use for any thrown exception.
+     * @return the sum {@code a + b}.
+     * @throws MathArithmeticException if the result cannot be represented
+     * as a {@code long}.
      * @since 1.2
      */
     private static long addAndCheck(long a, long b, Localizable pattern) {
@@ -145,7 +157,7 @@ public final class MathUtils {
                     if (Long.MIN_VALUE - b <= a) {
                         ret = a + b;
                     } else {
-                        throw MathRuntimeException.createArithmeticException(pattern, a, b);
+                        throw new MathArithmeticException(pattern, a, b);
                     }
                 } else {
                     // opposite sign addition is always safe
@@ -159,7 +171,7 @@ public final class MathUtils {
                 if (a <= Long.MAX_VALUE - b) {
                     ret = a + b;
                 } else {
-                    throw MathRuntimeException.createArithmeticException(pattern, a, b);
+                    throw new MathArithmeticException(pattern, a, b);
                 }
             }
         }
@@ -357,21 +369,19 @@ public final class MathUtils {
 
     /**
      * Check binomial preconditions.
-     * @param n the size of the set
-     * @param k the size of the subsets to be counted
-     * @exception IllegalArgumentException if preconditions are not met.
+     *
+     * @param n Size of the set.
+     * @param k Size of the subsets to be counted.
+     * @throws NotPositiveException if {@code n < 0}.
+     * @throws NumberIsTooLargeException if {@code k > n}.
      */
-    private static void checkBinomial(final int n, final int k)
-        throws IllegalArgumentException {
+    private static void checkBinomial(final int n, final int k) {
         if (n < k) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER,
-                n, k);
+            throw new NumberIsTooLargeException(LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER,
+                                                k, n, true);
         }
         if (n < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.BINOMIAL_NEGATIVE_PARAMETER,
-                  n);
+            throw new NotPositiveException(LocalizedFormats.BINOMIAL_NEGATIVE_PARAMETER, n);
         }
     }
 
@@ -577,48 +587,40 @@ public final class MathUtils {
      *
      * @param n argument
      * @return <code>n!</code>
-     * @throws ArithmeticException if the result is too large to be represented
-     *         by a long integer.
-     * @throws IllegalArgumentException if n < 0
+     * @throws MathArithmeticException if the result is too large to be represented
+     * by a {@code long}.
+     * @throws NotPositiveException if {@code n < 0}.
+     * @throws MathArithmeticException if {@code n > 20}: The factorial value is too
+     * large to fit in a {@code long}.
      */
     public static long factorial(final int n) {
         if (n < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
-                  n);
+            throw new NotPositiveException(LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
+                                           n);
         }
         if (n > 20) {
-            throw new ArithmeticException(
-                    "factorial value is too large to fit in a long");
+            throw new MathArithmeticException();
         }
         return FACTORIALS[n];
     }
 
     /**
-     * Returns n!. Shorthand for <code>n</code> <a
-     * href="http://mathworld.wolfram.com/Factorial.html"> Factorial</a>, the
-     * product of the numbers <code>1,...,n</code> as a <code>double</code>.
-     * <p>
-     * <Strong>Preconditions</strong>:
-     * <ul>
-     * <li> <code>n >= 0</code> (otherwise
-     * <code>IllegalArgumentException</code> is thrown)</li>
-     * <li> The result is small enough to fit into a <code>double</code>. The
-     * largest value of <code>n</code> for which <code>n!</code> <
-     * Double.MAX_VALUE</code> is 170. If the computed value exceeds
-     * Double.MAX_VALUE, Double.POSITIVE_INFINITY is returned</li>
-     * </ul>
-     * </p>
-     *
-     * @param n argument
-     * @return <code>n!</code>
-     * @throws IllegalArgumentException if n < 0
+     * Compute n!, the<a href="http://mathworld.wolfram.com/Factorial.html">
+     * factorial</a> of {@code n} (the product of the numbers 1 to n), as a
+     * {@code double}.
+     * The result should be small enough to fit into a {@code double}: The
+     * largest {@code n} for which {@code n! < Double.MAX_VALUE} is 170.
+     * If the computed value exceeds {@code Double.MAX_VALUE},
+     * {@code Double.POSITIVE_INFINITY} is returned.
+     *
+     * @param n Argument.
+     * @return {@code n!}
+     * @throws NotPositiveException if {@code n < 0}.
      */
     public static double factorialDouble(final int n) {
         if (n < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
-                  n);
+            throw new NotPositiveException(LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
+                                           n);
         }
         if (n < 21) {
             return factorial(n);
@@ -627,23 +629,16 @@ public final class MathUtils {
     }
 
     /**
-     * Returns the natural logarithm of n!.
-     * <p>
-     * <Strong>Preconditions</strong>:
-     * <ul>
-     * <li> <code>n >= 0</code> (otherwise
-     * <code>IllegalArgumentException</code> is thrown)</li>
-     * </ul></p>
+     * Compute the natural logarithm of the factorial of {@code n}.
      *
-     * @param n argument
-     * @return <code>n!</code>
-     * @throws IllegalArgumentException if preconditions are not met.
+     * @param n Argument.
+     * @return {@code n!}
+     * @throws NotPositiveException if {@code n < 0}.
      */
     public static double factorialLog(final int n) {
         if (n < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
-                  n);
+            throw new NotPositiveException(LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
+                                           n);
         }
         if (n < 21) {
             return FastMath.log(factorial(n));
@@ -677,11 +672,11 @@ public final class MathUtils {
      * <code>0</code>.</li>
      * </ul>
      *
-     * @param p any number
-     * @param q any number
-     * @return the greatest common divisor, never negative
-     * @throws ArithmeticException if the result cannot be represented as a
-     * nonnegative int value
+     * @param p Number.
+     * @param q Number.
+     * @return the greatest common divisor, never negative.
+     * @throws MathArithmeticException if the result cannot be represented as
+     * a non-negative {@code int} value.
      * @since 1.1
      */
     public static int gcd(final int p, final int q) {
@@ -689,9 +684,8 @@ public final class MathUtils {
         int v = q;
         if ((u == 0) || (v == 0)) {
             if ((u == Integer.MIN_VALUE) || (v == Integer.MIN_VALUE)) {
-                throw MathRuntimeException.createArithmeticException(
-                        LocalizedFormats.GCD_OVERFLOW_32_BITS,
-                        p, q);
+                throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_32_BITS,
+                                                  p, q);
             }
             return FastMath.abs(u) + FastMath.abs(v);
         }
@@ -715,9 +709,8 @@ public final class MathUtils {
             k++; // cast out twos.
         }
         if (k == 31) {
-            throw MathRuntimeException.createArithmeticException(
-                    LocalizedFormats.GCD_OVERFLOW_32_BITS,
-                    p, q);
+            throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_32_BITS,
+                                              p, q);
         }
         // B2. Initialize: u and v have been divided by 2^k and at least
         // one is odd.
@@ -766,11 +759,11 @@ public final class MathUtils {
      * <code>0L</code>.</li>
      * </ul>
      *
-     * @param p any number
-     * @param q any number
-     * @return the greatest common divisor, never negative
-     * @throws ArithmeticException if the result cannot be represented as a nonnegative long
-     * value
+     * @param p Number.
+     * @param q Number.
+     * @return the greatest common divisor, never negative.
+     * @throws MathArithmeticException if the result cannot be represented as
+     * a non-negative {@code long} value.
      * @since 2.1
      */
     public static long gcd(final long p, final long q) {
@@ -778,9 +771,8 @@ public final class MathUtils {
         long v = q;
         if ((u == 0) || (v == 0)) {
             if ((u == Long.MIN_VALUE) || (v == Long.MIN_VALUE)){
-                throw MathRuntimeException.createArithmeticException(
-                        LocalizedFormats.GCD_OVERFLOW_64_BITS,
-                        p, q);
+                throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_64_BITS,
+                                                  p, q);
             }
             return FastMath.abs(u) + FastMath.abs(v);
         }
@@ -804,9 +796,8 @@ public final class MathUtils {
             k++; // cast out twos.
         }
         if (k == 63) {
-            throw MathRuntimeException.createArithmeticException(
-                    LocalizedFormats.GCD_OVERFLOW_64_BITS,
-                    p, q);
+            throw new MathArithmeticException(LocalizedFormats.GCD_OVERFLOW_64_BITS,
+                                              p, q);
         }
         // B2. Initialize: u and v have been divided by 2^k and at least
         // one is odd.
@@ -940,23 +931,21 @@ public final class MathUtils {
      * <code>0</code> for any <code>x</code>.
      * </ul>
      *
-     * @param a any number
-     * @param b any number
-     * @return the least common multiple, never negative
-     * @throws ArithmeticException
-     *             if the result cannot be represented as a nonnegative int
-     *             value
+     * @param a Number.
+     * @param b Number.
+     * @return the least common multiple, never negative.
+     * @throws MathArithmeticException if the result cannot be represented as
+     * a non-negative {@code int} value.
      * @since 1.1
      */
     public static int lcm(int a, int b) {
-        if (a==0 || b==0){
+        if (a == 0 || b == 0){
             return 0;
         }
         int lcm = FastMath.abs(mulAndCheck(a / gcd(a, b), b));
         if (lcm == Integer.MIN_VALUE) {
-            throw MathRuntimeException.createArithmeticException(
-                LocalizedFormats.LCM_OVERFLOW_32_BITS,
-                a, b);
+            throw new MathArithmeticException(LocalizedFormats.LCM_OVERFLOW_32_BITS,
+                                              a, b);
         }
         return lcm;
     }
@@ -976,22 +965,21 @@ public final class MathUtils {
      * <code>0L</code> for any <code>x</code>.
      * </ul>
      *
-     * @param a any number
-     * @param b any number
-     * @return the least common multiple, never negative
-     * @throws ArithmeticException if the result cannot be represented as a nonnegative long
-     * value
+     * @param a Number.
+     * @param b Number.
+     * @return the least common multiple, never negative.
+     * @throws MathArithmeticException if the result cannot be represented
+     * as a non-negative {@code long} value.
      * @since 2.1
      */
     public static long lcm(long a, long b) {
-        if (a==0 || b==0){
+        if (a == 0 || b == 0){
             return 0;
         }
         long lcm = FastMath.abs(mulAndCheck(a / gcd(a, b), b));
         if (lcm == Long.MIN_VALUE){
-            throw MathRuntimeException.createArithmeticException(
-                LocalizedFormats.LCM_OVERFLOW_64_BITS,
-                a, b);
+            throw new MathArithmeticException(LocalizedFormats.LCM_OVERFLOW_64_BITS,
+                                              a, b);
         }
         return lcm;
     }
@@ -1019,17 +1007,17 @@ public final class MathUtils {
     /**
      * Multiply two integers, checking for overflow.
      *
-     * @param x a factor
-     * @param y a factor
-     * @return the product <code>x*y</code>
-     * @throws ArithmeticException if the result can not be represented as an
-     *         int
+     * @param x Factor.
+     * @param y Factor.
+     * @return the product {@code x * y}.
+     * @throws MathArithmeticException if the result can not be
+     * represented as an {@code int}.
      * @since 1.1
      */
     public static int mulAndCheck(int x, int y) {
         long m = ((long)x) * ((long)y);
         if (m < Integer.MIN_VALUE || m > Integer.MAX_VALUE) {
-            throw new ArithmeticException("overflow: mul");
+            throw new MathArithmeticException();
         }
         return (int)m;
     }
@@ -1037,16 +1025,15 @@ public final class MathUtils {
     /**
      * Multiply two long integers, checking for overflow.
      *
-     * @param a first value
-     * @param b second value
-     * @return the product <code>a * b</code>
-     * @throws ArithmeticException if the result can not be represented as an
-     *         long
+     * @param a Factor.
+     * @param b Factor.
+     * @return the product {@code a * b}.
+     * @throws MathArithmeticException if the result can not be represented
+     * as a {@code long}.
      * @since 1.2
      */
     public static long mulAndCheck(long a, long b) {
         long ret;
-        String msg = "overflow: multiply";
         if (a > b) {
             // use symmetry to reduce boundary cases
             ret = mulAndCheck(b, a);
@@ -1057,14 +1044,14 @@ public final class MathUtils {
                     if (a >= Long.MAX_VALUE / b) {
                         ret = a * b;
                     } else {
-                        throw new ArithmeticException(msg);
+                        throw new MathArithmeticException();
                     }
                 } else if (b > 0) {
                     // check for negative overflow with negative a, positive b
                     if (Long.MIN_VALUE / b <= a) {
                         ret = a * b;
                     } else {
-                        throw new ArithmeticException(msg);
+                        throw new MathArithmeticException();
 
                     }
                 } else {
@@ -1079,7 +1066,7 @@ public final class MathUtils {
                 if (a <= Long.MAX_VALUE / b) {
                     ret = a * b;
                 } else {
-                    throw new ArithmeticException(msg);
+                    throw new MathArithmeticException();
                 }
             } else {
                 // assert a == 0
@@ -1160,8 +1147,7 @@ public final class MathUtils {
       * @throws IllegalArgumentException if the target sum is infinite or NaN
       * @since 2.1
       */
-     public static double[] normalizeArray(double[] values, double normalizedSum)
-       throws ArithmeticException, IllegalArgumentException {
+     public static double[] normalizeArray(double[] values, double normalizedSum) {
          if (Double.isInfinite(normalizedSum)) {
              throw MathRuntimeException.createIllegalArgumentException(
                      LocalizedFormats.NORMALIZE_INFINITE);
@@ -1271,15 +1257,15 @@ public final class MathUtils {
      * determined by the rounding method specified. Rounding methods are defined
      * in {@link BigDecimal}.
      *
-     * @param unscaled the value to round.
-     * @param sign the sign of the original, scaled value.
-     * @param roundingMethod the rounding method as defined in
-     *        {@link BigDecimal}.
+     * @param unscaled Value to round.
+     * @param sign Sign of the original, scaled value.
+     * @param roundingMethod Rounding method, as defined in {@link BigDecimal}.
      * @return the rounded value.
      * @since 1.1
      */
-    private static double roundUnscaled(double unscaled, double sign,
-        int roundingMethod) {
+    private static double roundUnscaled(double unscaled,
+                                        double sign,
+                                        int roundingMethod) {
         switch (roundingMethod) {
         case BigDecimal.ROUND_CEILING :
             if (sign == -1) {
@@ -1337,24 +1323,23 @@ public final class MathUtils {
         }
         case BigDecimal.ROUND_UNNECESSARY :
             if (unscaled != FastMath.floor(unscaled)) {
-                throw new ArithmeticException("Inexact result from rounding");
+                throw new MathArithmeticException();
             }
             break;
         case BigDecimal.ROUND_UP :
             unscaled = FastMath.ceil(FastMath.nextAfter(unscaled,  Double.POSITIVE_INFINITY));
             break;
         default :
-            throw MathRuntimeException.createIllegalArgumentException(
-                  LocalizedFormats.INVALID_ROUNDING_METHOD,
-                  roundingMethod,
-                  "ROUND_CEILING",     BigDecimal.ROUND_CEILING,
-                  "ROUND_DOWN",        BigDecimal.ROUND_DOWN,
-                  "ROUND_FLOOR",       BigDecimal.ROUND_FLOOR,
-                  "ROUND_HALF_DOWN",   BigDecimal.ROUND_HALF_DOWN,
-                  "ROUND_HALF_EVEN",   BigDecimal.ROUND_HALF_EVEN,
-                  "ROUND_HALF_UP",     BigDecimal.ROUND_HALF_UP,
-                  "ROUND_UNNECESSARY", BigDecimal.ROUND_UNNECESSARY,
-                  "ROUND_UP",          BigDecimal.ROUND_UP);
+            throw new MathIllegalArgumentException(LocalizedFormats.INVALID_ROUNDING_METHOD,
+                                                   roundingMethod,
+                                                   "ROUND_CEILING", BigDecimal.ROUND_CEILING,
+                                                   "ROUND_DOWN", BigDecimal.ROUND_DOWN,
+                                                   "ROUND_FLOOR", BigDecimal.ROUND_FLOOR,
+                                                   "ROUND_HALF_DOWN", BigDecimal.ROUND_HALF_DOWN,
+                                                   "ROUND_HALF_EVEN", BigDecimal.ROUND_HALF_EVEN,
+                                                   "ROUND_HALF_UP", BigDecimal.ROUND_HALF_UP,
+                                                   "ROUND_UNNECESSARY", BigDecimal.ROUND_UNNECESSARY,
+                                                   "ROUND_UP", BigDecimal.ROUND_UP);
         }
         return unscaled;
     }
@@ -1439,26 +1424,22 @@ public final class MathUtils {
     }
 
     /**
-     * Returns the <a href="http://mathworld.wolfram.com/Sign.html"> sign</a>
-     * for short value <code>x</code>.
-     * <p>
-     * For a short value x, this method returns (short)(+1) if x > 0, (short)(0)
-     * if x = 0, and (short)(-1) if x < 0.</p>
+     * Compute the <a href="http://mathworld.wolfram.com/Sign.html">sign</a>
+     * of the argument.
      *
      * @param x the value, a short
-     * @return (short)(+1), (short)(0), or (short)(-1), depending on the sign of
-     *         x
+     * @return 1 if {@code x > 0}, 0 if {@code x == 0}, and -1 if {@code x < 0}.
      */
     public static short sign(final short x) {
         return (x == ZS) ? ZS : (x > ZS) ? PS : NS;
     }
 
     /**
-     * Returns the <a href="http://mathworld.wolfram.com/HyperbolicSine.html">
-     * hyperbolic sine</a> of x.
+     * Compute the <a href="http://mathworld.wolfram.com/HyperbolicSine.html">
+     * hyperbolic sine</a> of the argument.
      *
-     * @param x double value for which to find the hyperbolic sine
-     * @return hyperbolic sine of x
+     * @param x Value for which to find the hyperbolic sine.
+     * @return hyperbolic sine of {@code x}.
      */
     public static double sinh(double x) {
         return (FastMath.exp(x) - FastMath.exp(-x)) / 2.0;
@@ -1467,17 +1448,17 @@ public final class MathUtils {
     /**
      * Subtract two integers, checking for overflow.
      *
-     * @param x the minuend
-     * @param y the subtrahend
-     * @return the difference <code>x-y</code>
-     * @throws ArithmeticException if the result can not be represented as an
-     *         int
+     * @param x Minuend.
+     * @param y Subtrahend.
+     * @return the difference {@code x - y}.
+     * @throws MathArithmeticException if the result can not be represented
+     * as an {@code int}.
      * @since 1.1
      */
     public static int subAndCheck(int x, int y) {
         long s = (long)x - (long)y;
         if (s < Integer.MIN_VALUE || s > Integer.MAX_VALUE) {
-            throw MathRuntimeException.createArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, x, y);
+            throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_SUBTRACTION, x, y);
         }
         return (int)s;
     }
@@ -1485,11 +1466,11 @@ public final class MathUtils {
     /**
      * Subtract two long integers, checking for overflow.
      *
-     * @param a first value
-     * @param b second value
-     * @return the difference <code>a-b</code>
-     * @throws ArithmeticException if the result can not be represented as an
-     *         long
+     * @param a Value.
+     * @param b Value.
+     * @return the difference {@code a - b}.
+     * @throws MathArithmeticException if the result can not be represented as a
+     * {@code long}.
      * @since 1.2
      */
     public static long subAndCheck(long a, long b) {
@@ -1510,18 +1491,15 @@ public final class MathUtils {
 
     /**
      * Raise an int to an int power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static int pow(final int k, int e)
-        throws IllegalArgumentException {
-
+    public static int pow(final int k, int e) {
         if (e < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         int result = 1;
@@ -1535,23 +1513,19 @@ public final class MathUtils {
         }
 
         return result;
-
     }
 
     /**
      * Raise an int to a long power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static int pow(final int k, long e)
-        throws IllegalArgumentException {
-
+    public static int pow(final int k, long e) {
         if (e < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         int result = 1;
@@ -1565,23 +1539,19 @@ public final class MathUtils {
         }
 
         return result;
-
     }
 
     /**
      * Raise a long to an int power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static long pow(final long k, int e)
-        throws IllegalArgumentException {
-
+    public static long pow(final long k, int e) {
         if (e < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         long result = 1l;
@@ -1595,23 +1565,19 @@ public final class MathUtils {
         }
 
         return result;
-
     }
 
     /**
      * Raise a long to a long power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static long pow(final long k, long e)
-        throws IllegalArgumentException {
-
+    public static long pow(final long k, long e) {
         if (e < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         long result = 1l;
@@ -1625,43 +1591,35 @@ public final class MathUtils {
         }
 
         return result;
-
     }
 
     /**
      * Raise a BigInteger to an int power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static BigInteger pow(final BigInteger k, int e)
-        throws IllegalArgumentException {
-
+    public static BigInteger pow(final BigInteger k, int e) {
         if (e < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         return k.pow(e);
-
     }
 
     /**
      * Raise a BigInteger to a long power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static BigInteger pow(final BigInteger k, long e)
-        throws IllegalArgumentException {
-
+    public static BigInteger pow(final BigInteger k, long e) {
         if (e < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         BigInteger result = BigInteger.ONE;
@@ -1680,18 +1638,15 @@ public final class MathUtils {
 
     /**
      * Raise a BigInteger to a BigInteger power.
-     * @param k number to raise
-     * @param e exponent (must be positive or null)
+     *
+     * @param k Number to raise.
+     * @param e Exponent (must be positive or zero).
      * @return k<sup>e</sup>
-     * @exception IllegalArgumentException if e is negative
+     * @throws NotPositiveException if {@code e < 0}.
      */
-    public static BigInteger pow(final BigInteger k, BigInteger e)
-        throws IllegalArgumentException {
-
+    public static BigInteger pow(final BigInteger k, BigInteger e) {
         if (e.compareTo(BigInteger.ZERO) < 0) {
-            throw MathRuntimeException.createIllegalArgumentException(
-                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
-                k, e);
+            throw new NotPositiveException(LocalizedFormats.EXPONENT, e);
         }
 
         BigInteger result = BigInteger.ONE;
@@ -1705,7 +1660,6 @@ public final class MathUtils {
         }
 
         return result;
-
     }
 
     /**
@@ -1816,9 +1770,13 @@ public final class MathUtils {
      * @param val Values.
      * @param dir Ordering direction.
      * @param strict Whether the order should be strict.
-     * @throws NonMonotonousSequenceException if the array is not sorted.
+     * @param abort Whether to throw an exception if the check fails.
+     * @return {@code true} if the array is sorted.
+     * @throws NonMonotonousSequenceException if the array is not sorted
+     * and {@code abort} is {@code true}.
      */
-    public static void checkOrder(double[] val, OrderDirection dir, boolean strict) {
+    public static boolean checkOrder(double[] val, OrderDirection dir,
+                                     boolean strict, boolean abort) {
         double previous = val[0];
         boolean ok = true;
 
@@ -1852,21 +1810,40 @@ public final class MathUtils {
                 throw new IllegalArgumentException();
             }
 
-            if (!ok) {
+            if (!ok &&
+                abort) {
                 throw new NonMonotonousSequenceException(val[i], previous, i, dir, strict);
             }
             previous = val[i];
         }
+
+        return ok;
+    }
+
+    /**
+     * Checks that the given array is sorted.
+     *
+     * @param val Values.
+     * @param dir Ordering direction.
+     * @param strict Whether the order should be strict.
+     * @return {@code true} if the array is sorted.
+     * @throws NonMonotonousSequenceException if the array is not sorted
+     * and {@code abort} is {@code true}.
+     */
+    public static boolean checkOrder(double[] val, OrderDirection dir,
+                                     boolean strict) {
+        return checkOrder(val, dir, strict, true);
     }
 
     /**
      * Checks that the given array is sorted in strictly increasing order.
      *
      * @param val Values.
+     * @return {@code true} if the array is sorted.
      * @throws NonMonotonousSequenceException if the array is not sorted.
      */
-    public static void checkOrder(double[] val) {
-        checkOrder(val, OrderDirection.INCREASING, true);
+    public static boolean checkOrder(double[] val) {
+        return checkOrder(val, OrderDirection.INCREASING, true);
     }
 
     /**
@@ -1929,58 +1906,139 @@ public final class MathUtils {
      * @return the 2-norm of the vector
      */
     public static double safeNorm(double[] v) {
-    double rdwarf = 3.834e-20;
-    double rgiant = 1.304e+19;
-    double s1=0.0;
-    double s2=0.0;
-    double s3=0.0;
-    double x1max = 0.0;
-    double x3max = 0.0;
-    double floatn = (double)v.length;
-    double agiant = rgiant/floatn;
-    for (int i=0;i<v.length;i++) {
-        double xabs = Math.abs(v[i]);
-        if (xabs<rdwarf || xabs>agiant) {
-            if (xabs>rdwarf) {
-                if (xabs>x1max) {
-                    double r=x1max/xabs;
-                    s1=1.0+s1*r*r;
-                    x1max=xabs;
-                } else {
-                    double r=xabs/x1max;
-                    s1+=r*r;
-                }
-            } else {
-                if (xabs>x3max) {
-                 double r=x3max/xabs;
-                 s3=1.0+s3*r*r;
-                 x3max=xabs;
+        double rdwarf = 3.834e-20;
+        double rgiant = 1.304e+19;
+        double s1 = 0;
+        double s2 = 0;
+        double s3 = 0;
+        double x1max = 0;
+        double x3max = 0;
+        double floatn = (double) v.length;
+        double agiant = rgiant / floatn;
+        for (int i = 0; i < v.length; i++) {
+            double xabs = Math.abs(v[i]);
+            if (xabs < rdwarf || xabs > agiant) {
+                if (xabs > rdwarf) {
+                    if (xabs > x1max) {
+                        double r = x1max / xabs;
+                        s1= 1 + s1 * r * r;
+                        x1max = xabs;
+                    } else {
+                        double r = xabs / x1max;
+                        s1 += r * r;
+                    }
                 } else {
-                    if (xabs!=0.0) {
-                        double r=xabs/x3max;
-                        s3+=r*r;
+                    if (xabs > x3max) {
+                        double r = x3max / xabs;
+                        s3= 1 + s3 * r * r;
+                        x3max = xabs;
+                    } else {
+                        if (xabs != 0) {
+                            double r = xabs / x3max;
+                            s3 += r * r;
+                        }
                     }
                 }
+            } else {
+                s2 += xabs * xabs;
             }
-        } else {
-         s2+=xabs*xabs;
         }
-    }
-    double norm;
-    if (s1!=0.0) {
-        norm = x1max*Math.sqrt(s1+(s2/x1max)/x1max);
-    } else {
-        if (s2==0.0) {
-            norm = x3max*Math.sqrt(s3);
+        double norm;
+        if (s1 != 0) {
+            norm = x1max * Math.sqrt(s1 + (s2 / x1max) / x1max);
         } else {
-            if (s2>=x3max) {
-                norm = Math.sqrt(s2*(1.0+(x3max/s2)*(x3max*s3)));
+            if (s2 == 0) {
+                norm = x3max * Math.sqrt(s3);
             } else {
-                norm = Math.sqrt(x3max*((s2/x3max)+(x3max*s3)));
+                if (s2 >= x3max) {
+                    norm = Math.sqrt(s2 * (1 + (x3max / s2) * (x3max * s3)));
+                } else {
+                    norm = Math.sqrt(x3max * ((s2 / x3max) + (x3max * s3)));
+                }
             }
         }
+        return norm;
     }
-    return norm;
-}
 
+    /**
+     * Sort an array in increasing order, performing the same reordering of
+     * entries on other arrays.
+     *
+     * @param x Array to be sorted.
+     * @param yList Set of arrays whose permutations of entries must follow
+     * those performed on {@code x}.
+     * @throws DimensionMismatchException if any {@code y} has not the same
+     * size as {@code x}.
+     */
+    public static void sortInPlace(double[] x,
+                                   double[] ... yList) {
+        sortInPlace(x, OrderDirection.INCREASING, yList);
+    }
+
+    /**
+     * Sort an array, performing the same reordering of entries on other arrays.
+     *
+     * @param x Array to be sorted.
+     * @param dir Order direction.
+     * @param yList Set of arrays whose permutations of entries must follow
+     * those performed on {@code x}.
+     * @throws DimensionMismatchException if any {@code y} has not the same
+     * size as {@code x}.
+     */
+    public static void sortInPlace(double[] x,
+                                   final OrderDirection dir,
+                                   double[] ... yList) {
+        if (x == null ||
+            yList == null) {
+            throw new NullArgumentException();
+        }
+
+        final int len = x.length;
+        final List<Map.Entry<Double, double[]>> list
+            = new ArrayList<Map.Entry<Double, double[]>>(len);
+
+        final int yListLen = yList.length;
+        for (int i = 0; i < len; i++) {
+            final double[] yValues = new double[yListLen];
+            for (int j = 0; j < yListLen; j++) {
+                double[] y = yList[j];
+                if (y.length != len) {
+                    throw new DimensionMismatchException(y.length, len);
+                }
+                yValues[j] = y[i];
+            }
+            list.add(new AbstractMap.SimpleEntry<Double, double[]>(x[i], yValues));
+        }
+
+        final Comparator<Map.Entry<Double, double[]>> comp
+            = new Comparator<Map.Entry<Double, double[]>>() {
+            public int compare(Map.Entry<Double, double[]> o1,
+                               Map.Entry<Double, double[]> o2) {
+                int val;
+                switch (dir) {
+                case INCREASING:
+                    val = o1.getKey().compareTo(o2.getKey());
+                break;
+                case DECREASING:
+                    val = o2.getKey().compareTo(o1.getKey());
+                break;
+                default:
+                    // Should never happen.
+                    throw new IllegalArgumentException();
+                }
+                return val;
+            }
+        };
+
+        Collections.sort(list, comp);
+
+        for (int i = 0; i < len; i++) {
+            final Map.Entry<Double, double[]> e = list.get(i);
+            x[i] = e.getKey();
+            final double[] yValues = e.getValue();
+            for (int j = 0; j < yListLen; j++) {
+                yList[j][i] = yValues[j];
+            }
+        }
+    }
 }

Modified: commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties (original)
+++ commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties Wed Nov  3 13:46:04 2010
@@ -20,8 +20,8 @@ ASSYMETRIC_EIGEN_NOT_SUPPORTED = la d\u0
 AT_LEAST_ONE_COLUMN = une matrice doit comporter au moins une colonne
 AT_LEAST_ONE_ROW = une matrice doit comporter au moins une ligne
 BANDWIDTH_OUT_OF_INTERVAL = la bande passante devrait \u00eatre dans l''intervalle [0,1], elle est de {0}
-BINOMIAL_INVALID_PARAMETERS_ORDER = n doit \u00eatre sup\u00e9rieur ou \u00e9gal \u00e0 k pour le coefficient du bin\u00f4me (n,k), or n = {0}, k = {1}
-BINOMIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le coefficient du bin\u00f4me (n,k), or n = {0}
+BINOMIAL_INVALID_PARAMETERS_ORDER = n doit \u00eatre sup\u00e9rieur ou \u00e9gal \u00e0 k pour le coefficient du bin\u00f4me (n, k), or k = {0}, n = {1}
+BINOMIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le coefficient du bin\u00f4me (n, k), or n = {0}
 CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS = les statistiques bas\u00e9es sur des moments externes ne peuvent pas \u00eatre remises \u00e0 z\u00e9ro
 CANNOT_COMPUTE_0TH_ROOT_OF_UNITY = impossible de calculer la racine z\u00e9roi\u00e8me de l''unit\u00e9, 
 CANNOT_COMPUTE_BETA_DENSITY_AT_0_FOR_SOME_ALPHA = impossible de calculer la densit\u00e9 beta en 0 lorsque alpha = {0,number}
@@ -67,6 +67,7 @@ ENDPOINTS_NOT_AN_INTERVAL = les bornes n
 EQUAL_VERTICES_IN_SIMPLEX = sommets {0} et {1} \u00e9gaux dans la configuration du simplex
 EULER_ANGLES_SINGULARITY = singularit\u00e9 d''angles d''Euler
 EVALUATION_FAILED = erreur d''\u00e9valuation pour l''argument {0}
+EVALUATION = \u00e9valuation
 EXPANSION_FACTOR_SMALLER_THAN_ONE = facteur d''extension inf\u00e9rieur \u00e0 un ({0})
 FACTORIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le calcul de n!, or n = {0}
 FAILED_BRACKETING = nombre d''it\u00e9rations = {0}, it\u00e9rations maximum = {1}, valeur initiale = {2}, borne inf\u00e9rieure = {3}, borne sup\u00e9rieure = {4}, valeur a finale = {5}, valeur b finale = {6}, f(a) = {7}, f(b) = {8}

Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/changes.xml?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/trunk/src/site/xdoc/changes.xml Wed Nov  3 13:46:04 2010
@@ -60,7 +60,11 @@ The <action> type attribute can be add,u
         classes were deprecated and removed.
       </action>
       <action dev="erans" type="update" issue="MATH-425">
-        Replaced old exceptions.
+        Created "MatrixDimensionMismatchException" to replace
+        "InvalidMatrixException" (when the latter is used to signal that
+        matrices are not compatible for some operation).
+        Replaced "MatrixIndexException" with "OutOfRangeException" (when the
+        former is used to signal a row or column dimension mismatch).
       </action>
       <action dev="erans" type="update" issue="MATH-310">
         Made "sample" methods part of the "IntegerDistribution" and
@@ -70,8 +74,9 @@ The <action> type attribute can be add,u
         All distribution classes (in package "distribution") are immutable.
       </action>
       <action dev="erans" type="update" issue="MATH-195">
-        Created "MatrixDimensionMismatch" to replace "InvalidMatrixException"
-        (when the latter is used to signal a row or column dimension mismatch).
+        Created an unchecked "FunctionEvaluationException".
+        Modified the "UnivariateRealFunction" interface: Removed the checked
+        "FunctionEvaluationException" from the signature of the "value" method.
       </action>
       <action dev="erans" type="update" issue="MATH-370">
         Modified semantics: "equals" methods now consider that NaNs are not

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/BinaryFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/BinaryFunctionTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/BinaryFunctionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/BinaryFunctionTest.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.FastMath;
 import org.junit.Assert;
 import org.junit.Test;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/ComposableFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/ComposableFunctionTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/ComposableFunctionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/ComposableFunctionTest.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.util.FastMath;
 import org.junit.Assert;
 import org.junit.Test;

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

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/MonitoredFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/MonitoredFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/MonitoredFunction.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/MonitoredFunction.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 
 /**
  * Wrapper class for counting functions calls.

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

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

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/SumSincFunction.java Wed Nov  3 13:46:04 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.math.analysis;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 
 /**
  * Auxiliary class for testing optimizers.

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegratorTest.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.analysis
 import java.util.Random;
 
 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.QuinticFunction;
 import org.apache.commons.math.analysis.SinFunction;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/DividedDifferenceInterpolatorTest.java Wed Nov  3 13:46:04 2010
@@ -17,6 +17,7 @@
 package org.apache.commons.math.analysis.interpolation;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.exception.NonMonotonousSequenceException;
 import org.apache.commons.math.analysis.Expm1Function;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -118,8 +119,8 @@ public final class DividedDifferenceInte
             double y[] = { 0.0, 4.0, 4.0, 2.5 };
             UnivariateRealFunction p = interpolator.interpolate(x, y);
             p.value(0.0);
-            fail("Expecting MathException - bad abscissas array");
-        } catch (MathException ex) {
+            fail("Expecting NonMonotonousSequenceException - bad abscissas array");
+        } catch (NonMonotonousSequenceException ex) {
             // expected
         }
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/interpolation/NevilleInterpolatorTest.java Wed Nov  3 13:46:04 2010
@@ -17,6 +17,7 @@
 package org.apache.commons.math.analysis.interpolation;
 
 import org.apache.commons.math.MathException;
+import org.apache.commons.math.exception.NonMonotonousSequenceException;
 import org.apache.commons.math.analysis.Expm1Function;
 import org.apache.commons.math.analysis.SinFunction;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
@@ -118,8 +119,8 @@ public final class NevilleInterpolatorTe
             double y[] = { 0.0, 4.0, 4.0, 2.5 };
             UnivariateRealFunction p = interpolator.interpolate(x, y);
             p.value(0.0);
-            fail("Expecting MathException - bad abscissas array");
-        } catch (MathException ex) {
+            fail("Expecting NonMonotonousSequenceException - bad abscissas array");
+        } catch (NonMonotonousSequenceException ex) {
             // expected
         }
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunctionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunctionTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunctionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/polynomials/PolynomialSplineFunctionTest.java Wed Nov  3 13:46:04 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.analysis
 import java.util.Arrays;
 import junit.framework.TestCase;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.OutOfRangeException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 
 /**
@@ -116,15 +116,15 @@ public class PolynomialSplineFunctionTes
 
         try { //outside of domain -- under min
             x = spline.value(-1.5);
-            fail("Expecting IllegalArgumentException");
-        } catch (FunctionEvaluationException ex) {
+            fail("Expecting OutOfRangeException");
+        } catch (OutOfRangeException ex) {
             // expected
         }
 
         try { //outside of domain -- over max
             x = spline.value(2.5);
-            fail("Expecting IllegalArgumentException");
-        } catch (FunctionEvaluationException ex) {
+            fail("Expecting OutOfRangeException");
+        } catch (OutOfRangeException ex) {
             // expected
         }
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java?rev=1030464&r1=1030463&r2=1030464&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/ArrayRealVectorTest.java Wed Nov  3 13:46:04 2010
@@ -21,7 +21,7 @@ import java.util.Iterator;
 
 import junit.framework.TestCase;
 
-import org.apache.commons.math.FunctionEvaluationException;
+import org.apache.commons.math.exception.FunctionEvaluationException;
 import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.util.FastMath;



Mime
View raw message