Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 43F56644C for ; Fri, 29 Jul 2011 15:35:45 +0000 (UTC) Received: (qmail 35069 invoked by uid 500); 29 Jul 2011 15:35:45 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 34964 invoked by uid 500); 29 Jul 2011 15:35:44 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 34956 invoked by uid 99); 29 Jul 2011 15:35:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2011 15:35:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2011 15:35:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CC6D923889E3 for ; Fri, 29 Jul 2011 15:35:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: luc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110729153520.CC6D923889E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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.