document some exceptions that may be thrown by derived classes

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1152268 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2011-07-29 15:35:19 +00:00
parent b5d183025d
commit 21d9fa79fb
1 changed files with 7 additions and 2 deletions

View File

@ -19,6 +19,7 @@ package org.apache.commons.math.analysis.solvers;
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 BaseAbstractUnivariateRealSolver<FUNC extends UnivariateRe
* @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 BaseAbstractUnivariateRealSolver<FUNC extends UnivariateRe
* @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.