Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 5040 invoked from network); 3 Dec 2010 17:29:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Dec 2010 17:29:48 -0000 Received: (qmail 13289 invoked by uid 500); 3 Dec 2010 17:29:48 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 13174 invoked by uid 500); 3 Dec 2010 17:29:48 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 13166 invoked by uid 99); 3 Dec 2010 17:29:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 17:29:48 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [194.206.126.239] (HELO smtp.nordnet.fr) (194.206.126.239) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Dec 2010 17:29:40 +0000 Received: from lehrin (78.202.141.79.dynamic.adsl.abo.nordnet.fr [79.141.202.78]) by smtp.nordnet.fr (Postfix) with ESMTP id 3009F34B9B for ; Fri, 3 Dec 2010 18:29:16 +0100 (CET) Received: by lehrin (Postfix, from userid 5001) id 7B950406C; Fri, 3 Dec 2010 18:29:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lehrin.spaceroots.local X-Spam-Level: Received: from lehrin.spaceroots.local (lehrin.spaceroots.local [127.0.0.1]) by lehrin (Postfix) with ESMTP id D9292405F for ; Fri, 3 Dec 2010 18:29:13 +0100 (CET) Message-ID: <4CF928E9.5020409@free.fr> Date: Fri, 03 Dec 2010 18:29:13 +0100 From: Luc Maisonobe User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Commons Developers List Subject: [math] Re: [jira] Created: (MATH-451) "solvers": Make the maximum number of evaluations a parameter of the "solve" methods References: <4106785.94311291389551252.JavaMail.jira@thor> In-Reply-To: <4106785.94311291389551252.JavaMail.jira@thor> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Old-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,FREEMAIL_FROM autolearn=unavailable version=3.3.1 Hi, Le 03/12/2010 16:19, Gilles (JIRA) a écrit : > "solvers": Make the maximum number of evaluations a parameter of the "solve" methods > ------------------------------------------------------------------------------------ > > Key: MATH-451 > URL: https://issues.apache.org/jira/browse/MATH-451 > Project: Commons Math > Issue Type: Improvement > Reporter: Gilles > Assignee: Gilles > Priority: Minor > Fix For: 3.0 > > > Currently, the number of allowed evaluations is set by the {{setMaxEvaluations}} method. > In the ML, it was proposed to pass that parameter when calling the {{solve}} method. The setter will be removed. > The existing {{solve}} methods will remain, using a default value (100) for the the maximum number of evaluations. > > For simplifying transition, this should probably be added in 2.X rather than in 3.0. Of course it IS an incompatible change since it is in a public interface, but this interface is not intended for people to implement it. It is rather an interface commons-math implements in the spirit of the algorithm design pattern: the user can rely on the interface definition if he wants a generic solver (or he uses a specific solver if a needs special features available only in one type of solver). So I would propose to first add the new methods in the interface in 2.X, and only deprecate the old ones without maxEvaluations. We would delete the deprecated methods as proposed in 3.0. I'm not sure if there should how the default value should be handled: an additional method in the interface or a special handling if for example the provided value is 0 or negative ? Also as this maxEvaluation is mostly used as a safeguard to avoid infinite loops, a default value should be much higher than 100. Probably something like 1000 or event higher. I would personnaly prefer to not have a default value and let the user always set one as he wants according to his type of problem. However, I'm on the fence on it. best regards, Luc --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org