commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1152268 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.java
Date Fri, 29 Jul 2011 15:35:20 GMT
Author: luc
Date: Fri Jul 29 15:35:19 2011
New Revision: 1152268

URL: http://svn.apache.org/viewvc?rev=1152268&view=rev
Log:
document some exceptions that may be thrown by derived classes

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/analysis/solvers/BaseAbstractUnivariateRealSolver.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=1152268&r1=1152267&r2=1152268&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
Fri Jul 29 15:35:19 2011
@@ -19,6 +19,7 @@ package org.apache.commons.math.analysis
 
 import org.apache.commons.math.analysis.UnivariateRealFunction;
 import org.apache.commons.math.exception.MaxCountExceededException;
+import org.apache.commons.math.exception.NoBracketingException;
 import org.apache.commons.math.exception.TooManyEvaluationsException;
 import org.apache.commons.math.util.Incrementor;
 import org.apache.commons.math.util.MathUtils;
@@ -147,7 +148,8 @@ public abstract class BaseAbstractUnivar
      * @throws TooManyEvaluationsException if the maximal number of evaluations
      * is exceeded.
      */
-    protected double computeObjectiveValue(double point) {
+    protected double computeObjectiveValue(double point)
+        throws TooManyEvaluationsException {
         incrementEvaluationCount();
         return function.value(point);
     }
@@ -205,8 +207,11 @@ public abstract class BaseAbstractUnivar
      * @return the root.
      * @throws TooManyEvaluationsException if the maximal number of evaluations
      * is exceeded.
+     * @throws NoBracketingException if the initial search interval does not bracket
+     * a root and the solver requires it.
      */
-    protected abstract double doSolve();
+    protected abstract double doSolve()
+        throws TooManyEvaluationsException, NoBracketingException;
 
     /**
      * Check whether the function takes opposite signs at the endpoints.



Mime
View raw message