commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1040868 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math: analysis/integration/ optimization/linear/ special/ util/
Date Wed, 01 Dec 2010 03:43:21 GMT
Author: psteitz
Date: Wed Dec  1 03:43:20 2010
New Revision: 1040868

URL: http://svn.apache.org/viewvc?rev=1040868&view=rev
Log:
Replaced deprecated MaximumIterationsExceededException by MaxCountExceededException.  JIRA:
MATH-438.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Gamma.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ContinuedFraction.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
Wed Dec  1 03:43:20 2010
@@ -18,8 +18,8 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.MaxIterationsExceededException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.util.FastMath;
@@ -196,7 +196,7 @@ public class LegendreGaussIntegrator ext
 
         }
 
-        throw new MaxIterationsExceededException(maximalIterationCount);
+        throw new MaxCountExceededException(maximalIterationCount);
 
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
Wed Dec  1 03:43:20 2010
@@ -18,8 +18,8 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.MaxIterationsExceededException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.util.FastMath;
 
@@ -60,13 +60,13 @@ public class RombergIntegrator extends U
     /** {@inheritDoc} */
     @Deprecated
     public double integrate(final double min, final double max)
-        throws MaxIterationsExceededException, MathUserException, IllegalArgumentException
{
+        throws MaxCountExceededException, MathUserException, IllegalArgumentException {
         return integrate(f, min, max);
     }
 
     /** {@inheritDoc} */
     public double integrate(final UnivariateRealFunction f, final double min, final double
max)
-        throws MaxIterationsExceededException, MathUserException, IllegalArgumentException
{
+        throws MaxCountExceededException, MathUserException, IllegalArgumentException {
 
         final int m = maximalIterationCount + 1;
         double previousRow[] = new double[m];
@@ -104,7 +104,7 @@ public class RombergIntegrator extends U
             }
             olds = s;
         }
-        throw new MaxIterationsExceededException(maximalIterationCount);
+        throw new MaxCountExceededException(maximalIterationCount);
     }
 
     /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
Wed Dec  1 03:43:20 2010
@@ -18,8 +18,8 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.MaxIterationsExceededException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.util.FastMath;
 
@@ -59,13 +59,13 @@ public class SimpsonIntegrator extends U
     /** {@inheritDoc} */
     @Deprecated
     public double integrate(final double min, final double max)
-        throws MaxIterationsExceededException, MathUserException, IllegalArgumentException
{
+        throws MaxCountExceededException, MathUserException, IllegalArgumentException {
         return integrate(f, min, max);
     }
 
     /** {@inheritDoc} */
     public double integrate(final UnivariateRealFunction f, final double min, final double
max)
-        throws MaxIterationsExceededException, MathUserException, IllegalArgumentException
{
+        throws MaxCountExceededException, MathUserException, IllegalArgumentException {
 
         clearResult();
         verifyInterval(min, max);
@@ -95,7 +95,7 @@ public class SimpsonIntegrator extends U
             olds = s;
             oldt = t;
         }
-        throw new MaxIterationsExceededException(maximalIterationCount);
+        throw new MaxCountExceededException(maximalIterationCount);
     }
 
     /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
Wed Dec  1 03:43:20 2010
@@ -18,8 +18,8 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.exception.MathUserException;
 import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.MaxIterationsExceededException;
 import org.apache.commons.math.analysis.UnivariateRealFunction;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.util.FastMath;
 
@@ -99,13 +99,13 @@ public class TrapezoidIntegrator extends
     /** {@inheritDoc} */
     @Deprecated
     public double integrate(final double min, final double max)
-        throws MaxIterationsExceededException, MathUserException, IllegalArgumentException
{
+        throws MaxCountExceededException, MathUserException, IllegalArgumentException {
         return integrate(f, min, max);
     }
 
     /** {@inheritDoc} */
     public double integrate(final UnivariateRealFunction f, final double min, final double
max)
-        throws MaxIterationsExceededException, MathUserException, IllegalArgumentException
{
+        throws MaxCountExceededException, MathUserException, IllegalArgumentException {
 
         clearResult();
         verifyInterval(min, max);
@@ -125,7 +125,7 @@ public class TrapezoidIntegrator extends
             }
             oldt = t;
         }
-        throw new MaxIterationsExceededException(maximalIterationCount);
+        throw new MaxCountExceededException(maximalIterationCount);
     }
 
     /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/linear/AbstractLinearOptimizer.java
Wed Dec  1 03:43:20 2010
@@ -19,7 +19,7 @@ package org.apache.commons.math.optimiza
 
 import java.util.Collection;
 
-import org.apache.commons.math.MaxIterationsExceededException;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.optimization.GoalType;
 import org.apache.commons.math.optimization.OptimizationException;
 import org.apache.commons.math.optimization.RealPointValuePair;
@@ -96,7 +96,7 @@ public abstract class AbstractLinearOpti
     protected void incrementIterationsCounter()
         throws OptimizationException {
         if (++iterations > maxIterations) {
-            throw new OptimizationException(new MaxIterationsExceededException(maxIterations));
+            throw new OptimizationException(new MaxCountExceededException(maxIterations));
         }
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Gamma.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Gamma.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Gamma.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/special/Gamma.java Wed
Dec  1 03:43:20 2010
@@ -17,7 +17,7 @@
 package org.apache.commons.math.special;
 
 import org.apache.commons.math.MathException;
-import org.apache.commons.math.MaxIterationsExceededException;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.util.ContinuedFraction;
 import org.apache.commons.math.util.FastMath;
 
@@ -185,7 +185,7 @@ public class Gamma {
                 sum = sum + an;
             }
             if (n >= maxIterations) {
-                throw new MaxIterationsExceededException(maxIterations);
+                throw new MaxCountExceededException(maxIterations);
             } else if (Double.isInfinite(sum)) {
                 ret = 1.0;
             } else {

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ContinuedFraction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ContinuedFraction.java?rev=1040868&r1=1040867&r2=1040868&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ContinuedFraction.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ContinuedFraction.java
Wed Dec  1 03:43:20 2010
@@ -18,7 +18,7 @@ package org.apache.commons.math.util;
 
 import org.apache.commons.math.ConvergenceException;
 import org.apache.commons.math.MathException;
-import org.apache.commons.math.MaxIterationsExceededException;
+import org.apache.commons.math.exception.MaxCountExceededException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 
 /**
@@ -198,9 +198,8 @@ public abstract class ContinuedFraction 
         }
 
         if (n >= maxIterations) {
-            throw new MaxIterationsExceededException(maxIterations,
-                LocalizedFormats.NON_CONVERGENT_CONTINUED_FRACTION,
-                x);
+            throw new MaxCountExceededException(LocalizedFormats.NON_CONVERGENT_CONTINUED_FRACTION,
+                    maxIterations, x);
         }
 
         return c;



Mime
View raw message