commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-376) One-time initialization in "DirectSearchOptimizer"
Date Tue, 15 Jun 2010 19:27:26 GMT

    [ 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.


Mime
View raw message