commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] Commented: (MATH-376) One-time initialization in "DirectSearchOptimizer"
Date Wed, 16 Jun 2010 09:14:25 GMT


Gilles commented on MATH-376:

Sorry, I should have read the documentation :-}. It would have me rephrased this issue as
Considering the algorithm operation, is it a serious problem that the automatic default is
used as initial simplex?
In the affirmative, instead of providing a default (as in the above excerpt) the code should
throw an "IllegalStateException", signaling that "setStartConfiguration" must be called.
The alternative would be to extend the check:
if (startConfiguration == null
    ||  (startConfiguration.length != startPoint.length) {
    // Re-initialize the default simplex with the appropriate number of vertices.
    // ...
Because it is confusing (and IMO doesn't make much sense) to allow one default run but not

> One-time initialization in "DirectSearchOptimizer"
> --------------------------------------------------
>                 Key: MATH-376
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Gilles
>            Priority: Minor
> In class  "DirectSearchOptimizer" (in package ""), 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.

View raw message