commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1042502 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/solvers/ test/java/org/apache/commons/math/analysis/solvers/
Date Mon, 06 Dec 2010 00:54:00 GMT
Author: erans
Date: Mon Dec  6 00:53:59 2010
New Revision: 1042502

URL: http://svn.apache.org/viewvc?rev=1042502&view=rev
Log:
MATH-451
Removed the "solve" methods lacking the "maxEval" parameter.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseUnivariateRealSolver.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/LaguerreSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolver2Test.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/RiddersSolverTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/SecantSolverTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.java
Mon Dec  6 00:53:59 2010
@@ -34,8 +34,6 @@ import org.apache.commons.math.analysis.
  */
 public abstract class BaseAbstractUnivariateRealSolver<FUNC extends UnivariateRealFunction>
     implements BaseUnivariateRealSolver<FUNC> {
-    /** Default maximum number of evaluations */
-    public static final int DEFAULT_MAX_EVALUATIONS = 100;
     /** Default absolute accuracy */
     public static final double DEFAULT_ABSOLUTE_ACCURACY = 1e-6;
     /** Default relative accuracy. */
@@ -186,21 +184,6 @@ public abstract class BaseAbstractUnivar
     }
 
     /** {@inheritDoc} */
-    public double solve(FUNC f, double min, double max, double startValue) {
-        return solve(DEFAULT_MAX_EVALUATIONS, f, min, max, startValue);
-    }
-
-    /** {@inheritDoc} */
-    public double solve(FUNC f, double min, double max) {
-        return solve(DEFAULT_MAX_EVALUATIONS, f, min, max);
-    }
-
-    /** {@inheritDoc} */
-    public double solve(FUNC f, double startValue) {
-        return solve(DEFAULT_MAX_EVALUATIONS, f, startValue);
-    }
-
-    /** {@inheritDoc} */
     public double solve(int maxEval, FUNC f, double min, double max, double startValue) {
         // Initialization.
         setup(maxEval, f, min, max, startValue);

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseUnivariateRealSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseUnivariateRealSolver.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseUnivariateRealSolver.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseUnivariateRealSolver.java
Mon Dec  6 00:53:59 2010
@@ -68,54 +68,6 @@ public interface BaseUnivariateRealSolve
      * @param f Function to solve.
      * @param min Lower bound for the interval.
      * @param max Upper bound for the interval.
-     * @return a value where the function is zero.
-     * @throws org.apache.commons.math.exception.MathIllegalArgumentException
-     * if the arguments do not satisfy the requirements specified by the solver.
-     * @throws org.apache.commons.math.exception.TooManyEvaluationsException if
-     * the default allowed number of evaluations is exceeded.
-     */
-    double solve(FUNC f, double min, double max);
-
-    /**
-     * Solve for a zero in the given interval, start at {@code startValue}.
-     * A solver may require that the interval brackets a single zero root.
-     * Solvers that do require bracketing should be able to handle the case
-     * where one of the endpoints is itself a root.
-     *
-     * @param f Function to solve.
-     * @param min Lower bound for the interval.
-     * @param max Upper bound for the interval.
-     * @param startValue Start value to use.
-     * @return a value where the function is zero.
-     * @throws org.apache.commons.math.exception.MathIllegalArgumentException
-     * if the arguments do not satisfy the requirements specified by the solver.
-     * @throws org.apache.commons.math.exception.TooManyEvaluationsException if
-     * the default allowed number of evaluations is exceeded.
-     */
-    double solve(FUNC f, double min, double max, double startValue);
-
-    /**
-     * Solve for a zero in the vicinity of {@code startValue}.
-     *
-     * @param f Function to solve.
-     * @param startValue Start value to use.
-     * @return a value where the function is zero.
-     * @throws org.apache.commons.math.exception.MathIllegalArgumentException
-     * if the arguments do not satisfy the requirements specified by the solver.
-     * @throws org.apache.commons.math.exception.TooManyEvaluationsException if
-     * the default allowed number of evaluations is exceeded.
-     */
-    double solve(FUNC f, double startValue);
-
-    /**
-     * Solve for a zero root in the given interval.
-     * A solver may require that the interval brackets a single zero root.
-     * Solvers that do require bracketing should be able to handle the case
-     * where one of the endpoints is itself a root.
-     *
-     * @param f Function to solve.
-     * @param min Lower bound for the interval.
-     * @param max Upper bound for the interval.
      * @param maxEval Maximum number of evaluations.
      * @return a value where the function is zero.
      * @throws org.apache.commons.math.exception.MathIllegalArgumentException

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
Mon Dec  6 00:53:59 2010
@@ -53,14 +53,17 @@ public class NewtonSolver extends Abstra
      * @param f Function to solve.
      * @param min Lower bound for the interval?
      * @param max Upper bound for the interval.
+     * @param maxEval Maximum number of evaluations.
      * @return the value where the function is zero.
      * @throws org.apache.commons.math.exception.TooManyEvaluationsException
      * if the maximum evaluation count is exceeded.
-     * @throws IllegalArgumentException if {@code min >= max}.
+     * @throws org.apache.commons.math.exception.NumberIsTooLargeException
+     * if {@code min >= max}.
      */
-    public double solve(final DifferentiableUnivariateRealFunction f,
+    @Override
+    public double solve(int maxEval, final DifferentiableUnivariateRealFunction f,
                         final double min, final double max) {
-        return super.solve(f, UnivariateRealSolverUtils.midpoint(min, max));
+        return super.solve(maxEval, f, UnivariateRealSolverUtils.midpoint(min, max));
     }
 
     /**

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BisectionSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -33,10 +33,10 @@ public final class BisectionSolverTest {
         double result;
 
         BisectionSolver solver = new BisectionSolver();
-        result = solver.solve(f, 3, 4);
+        result = solver.solve(100, f, 3, 4);
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 1, 4);
+        result = solver.solve(100, f, 1, 4);
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
     }
 
@@ -46,37 +46,37 @@ public final class BisectionSolverTest {
         double result;
 
         BisectionSolver solver = new BisectionSolver();
-        result = solver.solve(f, -0.2, 0.2);
+        result = solver.solve(100, f, -0.2, 0.2);
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, -0.1, 0.3);
+        result = solver.solve(100, f, -0.1, 0.3);
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, -0.3, 0.45);
+        result = solver.solve(100, f, -0.3, 0.45);
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.3, 0.7);
+        result = solver.solve(100, f, 0.3, 0.7);
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.2, 0.6);
+        result = solver.solve(100, f, 0.2, 0.6);
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.05, 0.95);
+        result = solver.solve(100, f, 0.05, 0.95);
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.85, 1.25);
+        result = solver.solve(100, f, 0.85, 1.25);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.8, 1.2);
+        result = solver.solve(100, f, 0.8, 1.2);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.85, 1.75);
+        result = solver.solve(100, f, 0.85, 1.75);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.55, 1.45);
+        result = solver.solve(100, f, 0.55, 1.45);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.85, 5);
+        result = solver.solve(100, f, 0.85, 5);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
         Assert.assertTrue(solver.getEvaluations() > 0);
@@ -86,6 +86,6 @@ public final class BisectionSolverTest {
     public void testMath369() {
         UnivariateRealFunction f = new SinFunction();
         BisectionSolver solver = new BisectionSolver();
-        Assert.assertEquals(FastMath.PI, solver.solve(f, 3.0, 3.2, 3.1), solver.getAbsoluteAccuracy());
+        Assert.assertEquals(FastMath.PI, solver.solve(100, f, 3.0, 3.2, 3.1), solver.getAbsoluteAccuracy());
     }
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/BrentSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -48,13 +48,13 @@ public final class BrentSolverTest {
         double result;
         UnivariateRealSolver solver = new BrentSolver();
         // Somewhat benign interval. The function is monotone.
-        result = solver.solve(f, 3, 4);
+        result = solver.solve(100, f, 3, 4);
         // System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 7);
         // Larger and somewhat less benign interval. The function is grows first.
-        result = solver.solve(f, 1, 4);
+        result = solver.solve(100, f, 1, 4);
         // System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
@@ -76,72 +76,72 @@ public final class BrentSolverTest {
         UnivariateRealSolver solver = new BrentSolver();
         // Symmetric bracket around 0. Test whether solvers can handle hitting
         // the root in the first iteration.
-        result = solver.solve(f, -0.2, 0.2);
+        result = solver.solve(100, f, -0.2, 0.2);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 3);
         // 1 iterations on i586 JDK 1.4.1.
         // Asymmetric bracket around 0, just for fun. Contains extremum.
-        result = solver.solve(f, -0.1, 0.3);
+        result = solver.solve(100, f, -0.1, 0.3);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
         // 5 iterations on i586 JDK 1.4.1.
         Assert.assertTrue(solver.getEvaluations() <= 7);
         // Large bracket around 0. Contains two extrema.
-        result = solver.solve(f, -0.3, 0.45);
+        result = solver.solve(100, f, -0.3, 0.45);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
         // 6 iterations on i586 JDK 1.4.1.
         Assert.assertTrue(solver.getEvaluations() <= 8);
         // Benign bracket around 0.5, function is monotonous.
-        result = solver.solve(f, 0.3, 0.7);
+        result = solver.solve(100, f, 0.3, 0.7);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
         // 6 iterations on i586 JDK 1.4.1.
         Assert.assertTrue(solver.getEvaluations() <= 9);
         // Less benign bracket around 0.5, contains one extremum.
-        result = solver.solve(f, 0.2, 0.6);
+        result = solver.solve(100, f, 0.2, 0.6);
         // System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 10);
         // Large, less benign bracket around 0.5, contains both extrema.
-        result = solver.solve(f, 0.05, 0.95);
+        result = solver.solve(100, f, 0.05, 0.95);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 11);
         // Relatively benign bracket around 1, function is monotonous. Fast growth for x>1
         // is still a problem.
-        result = solver.solve(f, 0.85, 1.25);
+        result = solver.solve(100, f, 0.85, 1.25);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 11);
         // Less benign bracket around 1 with extremum.
-        result = solver.solve(f, 0.8, 1.2);
+        result = solver.solve(100, f, 0.8, 1.2);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 11);
         // Large bracket around 1. Monotonous.
-        result = solver.solve(f, 0.85, 1.75);
+        result = solver.solve(100, f, 0.85, 1.75);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 13);
         // Large bracket around 1. Interval contains extremum.
-        result = solver.solve(f, 0.55, 1.45);
+        result = solver.solve(100, f, 0.55, 1.45);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 10);
         // Very large bracket around 1 for testing fast growth behaviour.
-        result = solver.solve(f, 0.85, 5);
+        result = solver.solve(100, f, 0.85, 5);
         //System.out.println(
        //     "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
@@ -160,16 +160,16 @@ public final class BrentSolverTest {
         BrentSolver solver = new BrentSolver();
 
         // endpoint is root
-        double result = solver.solve(f, FastMath.PI, 4);
+        double result = solver.solve(100, f, FastMath.PI, 4);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 3, FastMath.PI);
+        result = solver.solve(100, f, 3, FastMath.PI);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, FastMath.PI, 4, 3.5);
+        result = solver.solve(100, f, FastMath.PI, 4, 3.5);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 3, FastMath.PI, 3.07);
+        result = solver.solve(100, f, 3, FastMath.PI, 3.07);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
     }
 
@@ -178,19 +178,19 @@ public final class BrentSolverTest {
         UnivariateRealFunction f = new SinFunction();
         BrentSolver solver = new BrentSolver();
         try {  // bad interval
-            solver.solve(f, 1, -1);
+            solver.solve(100, f, 1, -1);
             Assert.fail("Expecting NumberIsTooLargeException - bad interval");
         } catch (NumberIsTooLargeException ex) {
             // expected
         }
         try {  // no bracket
-            solver.solve(f, 1, 1.5);
+            solver.solve(100, f, 1, 1.5);
             Assert.fail("Expecting NoBracketingException - non-bracketing");
         } catch (NoBracketingException ex) {
             // expected
         }
         try {  // no bracket
-            solver.solve(f, 1, 1.5, 1.2);
+            solver.solve(100, f, 1, 1.5, 1.2);
             Assert.fail("Expecting NoBracketingException - non-bracketing");
         } catch (NoBracketingException ex) {
             // expected
@@ -204,14 +204,14 @@ public final class BrentSolverTest {
         double result;
 
         // no guess
-        result = solver.solve(f, 0.6, 7.0);
+        result = solver.solve(100, f, 0.6, 7.0);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         int referenceCallsCount = f.getCallsCount();
         Assert.assertTrue(referenceCallsCount >= 13);
 
         // invalid guess (it *is* a root, but outside of the range)
         try {
-          result = solver.solve(f, 0.6, 7.0, 0.0);
+          result = solver.solve(100, f, 0.6, 7.0, 0.0);
           Assert.fail("a NumberIsTooLargeException was expected");
         } catch (NumberIsTooLargeException iae) {
             // expected behaviour
@@ -219,19 +219,19 @@ public final class BrentSolverTest {
 
         // bad guess
         f.setCallsCount(0);
-        result = solver.solve(f, 0.6, 7.0, 0.61);
+        result = solver.solve(100, f, 0.6, 7.0, 0.61);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(f.getCallsCount() > referenceCallsCount);
 
         // good guess
         f.setCallsCount(0);
-        result = solver.solve(f, 0.6, 7.0, 0.999999);
+        result = solver.solve(100, f, 0.6, 7.0, 0.999999);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(f.getCallsCount() < referenceCallsCount);
 
         // perfect guess
         f.setCallsCount(0);
-        result = solver.solve(f, 0.6, 7.0, 1.0);
+        result = solver.solve(100, f, 0.6, 7.0, 1.0);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertEquals(1, solver.getEvaluations());
         Assert.assertEquals(1, f.getCallsCount());

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/LaguerreSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/LaguerreSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/LaguerreSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/LaguerreSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -49,7 +49,7 @@ public final class LaguerreSolverTest {
         min = 0.0; max = 1.0; expected = 0.25;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -68,13 +68,13 @@ public final class LaguerreSolverTest {
         min = 0.0; max = 2.0; expected = 0.5;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -4.0; max = -1.0; expected = -3.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -93,19 +93,19 @@ public final class LaguerreSolverTest {
         min = -2.0; max = 2.0; expected = -1.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -5.0; max = -2.5; expected = -3.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = 3.0; max = 6.0; expected = 4.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -159,14 +159,14 @@ public final class LaguerreSolverTest {
 
         try {
             // bad interval
-            solver.solve(f, 1, -1);
+            solver.solve(100, f, 1, -1);
             Assert.fail("Expecting NumberIsTooLargeException - bad interval");
         } catch (NumberIsTooLargeException ex) {
             // expected
         }
         try {
             // no bracketing
-            solver.solve(f, 2, 3);
+            solver.solve(100, f, 2, 3);
             Assert.fail("Expecting NoBracketingException - no bracketing");
         } catch (NoBracketingException ex) {
             // expected

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolver2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolver2Test.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolver2Test.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolver2Test.java
Mon Dec  6 00:53:59 2010
@@ -52,13 +52,13 @@ public final class MullerSolver2Test {
         min = 3.0; max = 4.0; expected = FastMath.PI;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -1.0; max = 1.5; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -74,19 +74,19 @@ public final class MullerSolver2Test {
         min = -0.4; max = 0.2; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = 0.75; max = 1.5; expected = 1.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -0.9; max = -0.2; expected = -0.5;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -104,19 +104,19 @@ public final class MullerSolver2Test {
         min = -1.0; max = 2.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -20.0; max = 10.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -50.0; max = 100.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -130,14 +130,14 @@ public final class MullerSolver2Test {
 
         try {
             // bad interval
-            solver.solve(f, 1, -1);
+            solver.solve(100, f, 1, -1);
             Assert.fail("Expecting NumberIsTooLargeException - bad interval");
         } catch (NumberIsTooLargeException ex) {
             // expected
         }
         try {
             // no bracketing
-            solver.solve(f, 2, 3);
+            solver.solve(100, f, 2, 3);
             Assert.fail("Expecting NoBracketingException - no bracketing");
         } catch (NoBracketingException ex) {
             // expected

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/MullerSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -52,13 +52,13 @@ public final class MullerSolverTest {
         min = 3.0; max = 4.0; expected = FastMath.PI;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -1.0; max = 1.5; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -74,19 +74,19 @@ public final class MullerSolverTest {
         min = -0.4; max = 0.2; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = 0.75; max = 1.5; expected = 1.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -0.9; max = -0.2; expected = -0.5;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -106,19 +106,19 @@ public final class MullerSolverTest {
         min = -1.0; max = 2.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -20.0; max = 10.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -50.0; max = 100.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -132,7 +132,7 @@ public final class MullerSolverTest {
 
         try {
             // bad interval
-            double root = solver.solve(f, 1, -1);
+            double root = solver.solve(100, f, 1, -1);
             System.out.println("root=" + root);
             Assert.fail("Expecting NumberIsTooLargeException - bad interval");
         } catch (NumberIsTooLargeException ex) {
@@ -140,7 +140,7 @@ public final class MullerSolverTest {
         }
         try {
             // no bracketing
-            solver.solve(f, 2, 3);
+            solver.solve(100, f, 2, 3);
             Assert.fail("Expecting NoBracketingException - no bracketing");
         } catch (NoBracketingException ex) {
             // expected

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/NewtonSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -37,10 +37,10 @@ public final class NewtonSolverTest {
         double result;
 
         NewtonSolver solver = new NewtonSolver();
-        result = solver.solve(f, 3, 4);
+        result = solver.solve(100, f, 3, 4);
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 1, 4);
+        result = solver.solve(100, f, 1, 4);
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
 
         Assert.assertTrue(solver.getEvaluations() > 0);
@@ -55,37 +55,37 @@ public final class NewtonSolverTest {
         double result;
 
         NewtonSolver solver = new NewtonSolver();
-        result = solver.solve(f, -0.2, 0.2);
+        result = solver.solve(100, f, -0.2, 0.2);
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, -0.1, 0.3);
+        result = solver.solve(100, f, -0.1, 0.3);
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, -0.3, 0.45);
+        result = solver.solve(100, f, -0.3, 0.45);
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.3, 0.7);
+        result = solver.solve(100, f, 0.3, 0.7);
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.2, 0.6);
+        result = solver.solve(100, f, 0.2, 0.6);
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.05, 0.95);
+        result = solver.solve(100, f, 0.05, 0.95);
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.85, 1.25);
+        result = solver.solve(100, f, 0.85, 1.25);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.8, 1.2);
+        result = solver.solve(100, f, 0.8, 1.2);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.85, 1.75);
+        result = solver.solve(100, f, 0.85, 1.75);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.55, 1.45);
+        result = solver.solve(100, f, 0.55, 1.45);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 0.85, 5);
+        result = solver.solve(100, f, 0.85, 5);
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
     }
 }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/RiddersSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/RiddersSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/RiddersSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/RiddersSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -50,13 +50,13 @@ public final class RiddersSolverTest {
         min = 3.0; max = 4.0; expected = FastMath.PI;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -1.0; max = 1.5; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -72,19 +72,19 @@ public final class RiddersSolverTest {
         min = -0.4; max = 0.2; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = 0.75; max = 1.5; expected = 1.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -0.9; max = -0.2; expected = -0.5;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -100,19 +100,19 @@ public final class RiddersSolverTest {
         min = -1.0; max = 2.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -20.0; max = 10.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
 
         min = -50.0; max = 100.0; expected = 0.0;
         tolerance = FastMath.max(solver.getAbsoluteAccuracy(),
                     FastMath.abs(expected * solver.getRelativeAccuracy()));
-        result = solver.solve(f, min, max);
+        result = solver.solve(100, f, min, max);
         Assert.assertEquals(expected, result, tolerance);
     }
 
@@ -126,14 +126,14 @@ public final class RiddersSolverTest {
 
         try {
             // bad interval
-            solver.solve(f, 1, -1);
+            solver.solve(100, f, 1, -1);
             Assert.fail("Expecting NumberIsTooLargeException - bad interval");
         } catch (NumberIsTooLargeException ex) {
             // expected
         }
         try {
             // no bracketing
-            solver.solve(f, 2, 3);
+            solver.solve(100, f, 2, 3);
             Assert.fail("Expecting NoBracketingException - no bracketing");
         } catch (NoBracketingException ex) {
             // expected

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/SecantSolverTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/SecantSolverTest.java?rev=1042502&r1=1042501&r2=1042502&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/SecantSolverTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/solvers/SecantSolverTest.java
Mon Dec  6 00:53:59 2010
@@ -40,12 +40,12 @@ public final class SecantSolverTest {
         double result;
         UnivariateRealSolver solver = new SecantSolver();
 
-        result = solver.solve(f, 3, 4);
+        result = solver.solve(100, f, 3, 4);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 6);
-        result = solver.solve(f, 1, 4);
+        result = solver.solve(100, f, 1, 4);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, FastMath.PI, solver.getAbsoluteAccuracy());
@@ -65,59 +65,59 @@ public final class SecantSolverTest {
         double result;
         // Brent-Dekker solver.
         UnivariateRealSolver solver = new SecantSolver();
-        result = solver.solve(f, -0.2, 0.2);
+        result = solver.solve(100, f, -0.2, 0.2);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 3);
-        result = solver.solve(f, -0.1, 0.3);
+        result = solver.solve(100, f, -0.1, 0.3);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 7);
-        result = solver.solve(f, -0.3, 0.45);
+        result = solver.solve(100, f, -0.3, 0.45);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 8);
-        result = solver.solve(f, 0.3, 0.7);
+        result = solver.solve(100, f, 0.3, 0.7);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 9);
-        result = solver.solve(f, 0.2, 0.6);
+        result = solver.solve(100, f, 0.2, 0.6);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 8);
-        result = solver.solve(f, 0.05, 0.95);
+        result = solver.solve(100, f, 0.05, 0.95);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 0.5, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 10);
-        result = solver.solve(f, 0.85, 1.25);
+        result = solver.solve(100, f, 0.85, 1.25);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 12);
-        result = solver.solve(f, 0.8, 1.2);
+        result = solver.solve(100, f, 0.8, 1.2);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 10);
-        result = solver.solve(f, 0.85, 1.75);
+        result = solver.solve(100, f, 0.85, 1.75);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 16);
         // The followig is especially slow because the solver first has to reduce
         // the bracket to exclude the extremum. After that, convergence is rapide.
-        result = solver.solve(f, 0.55, 1.45);
+        result = solver.solve(100, f, 0.55, 1.45);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
         Assert.assertTrue(solver.getEvaluations() <= 9);
-        result = solver.solve(f, 0.85, 5);
+        result = solver.solve(100, f, 0.85, 5);
         //System.out.println(
         //    "Root: " + result + " Evaluations: " + solver.getEvaluations());
         Assert.assertEquals(result, 1.0, solver.getAbsoluteAccuracy());
@@ -130,16 +130,16 @@ public final class SecantSolverTest {
         SecantSolver solver = new SecantSolver();
 
         // endpoint is root
-        double result = solver.solve(f, FastMath.PI, 4);
+        double result = solver.solve(100, f, FastMath.PI, 4);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 3, FastMath.PI);
+        result = solver.solve(100, f, 3, FastMath.PI);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, FastMath.PI, 4, 3.5);
+        result = solver.solve(100, f, FastMath.PI, 4, 3.5);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
-        result = solver.solve(f, 3, FastMath.PI, 3.07);
+        result = solver.solve(100, f, 3, FastMath.PI, 3.07);
         Assert.assertEquals(FastMath.PI, result, solver.getAbsoluteAccuracy());
 
     }
@@ -149,19 +149,19 @@ public final class SecantSolverTest {
         UnivariateRealFunction f = new SinFunction();
         SecantSolver solver = new SecantSolver();
         try {  // bad interval
-            solver.solve(f, 1, -1);
+            solver.solve(100, f, 1, -1);
             Assert.fail("Expecting NumberIsTooLargeException - bad interval");
         } catch (NumberIsTooLargeException ex) {
             // expected
         }
         try {  // no bracket
-            solver.solve(f, 1, 1.5);
+            solver.solve(100, f, 1, 1.5);
             Assert.fail("Expecting NoBracketingException - non-bracketing");
         } catch (NoBracketingException ex) {
             // expected
         }
         try {  // no bracket
-            solver.solve(f, 1, 1.5, 1.2);
+            solver.solve(100, f, 1, 1.5, 1.2);
             Assert.fail("Expecting NoBracketingException - non-bracketing");
         } catch (NoBracketingException ex) {
             // expected



Mime
View raw message