Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 58937 invoked from network); 15 Jun 2010 19:27:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 19:27:51 -0000 Received: (qmail 95909 invoked by uid 500); 15 Jun 2010 19:27:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 95773 invoked by uid 500); 15 Jun 2010 19:27:50 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 95765 invoked by uid 99); 15 Jun 2010 19:27:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 19:27:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 19:27:48 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5FJRQKE014165 for ; Tue, 15 Jun 2010 19:27:26 GMT Message-ID: <27932561.14031276630046244.JavaMail.jira@thor> Date: Tue, 15 Jun 2010 15:27:26 -0400 (EDT) From: "Luc Maisonobe (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (MATH-376) One-time initialization in "DirectSearchOptimizer" In-Reply-To: <25717798.4881276603403525.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879084#action_12879084 ] Luc Maisonobe commented on MATH-376: ------------------------------------ This code is here only for the case setStartConfiguration has not been called by the user, which is not the recommended way. This behaviour is documented in the javadoc of the class. The case of multiple calls with different problems size is explained: in this case users must call setStartConfiguration. > One-time initialization in "DirectSearchOptimizer" > -------------------------------------------------- > > Key: MATH-376 > URL: https://issues.apache.org/jira/browse/MATH-376 > Project: Commons Math > Issue Type: Bug > Reporter: Gilles > Priority: Minor > > In class "DirectSearchOptimizer" (in package "optimization.direct"), the "optimize" method contains this code (at line 270): > {code} > if (startConfiguration == null) { > // no initial configuration has been set up for simplex > // build a default one from a unit hypercube > final double[] unit = new double[startPoint.length]; > Arrays.fill(unit, 1.0); > setStartConfiguration(unit); > } > {code} > I think that this has the consequence that it is impossible to call "optimize" a second time, where one would like to solve a problem with a different dimension. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.