Hi.

[This refers to classes in package "optimization.direct".]
Currently the class "NelderMead" inherits from "DirectSearchOptimizer".
However the method "doOptimize" is _implemented_ in "DirectSearchOptimizer".
This is backwards from the intended design (where an "optimizer" is defined
as a class that implements a specific algorithm within "doOptimize").
According to this "terminology", "DirectSearchOptimizer" is the optimizer
whereas "NelderMead" could be considered as a specific way to construct a
simplex. [Indeed, that's what seems intended since it overrides the abstract
method "iterateSimplex".]

So, I think that it would be better to create an interface "Simplex"
that would contain a method equivalent to the current "iterateSimplex".
"NelderMead" would thus implement "Simplex", and a object of type "Simplex"
should be passed to the constructor of "DirectSearchOptimizer".

Along those lines, I'd also try to avoid using "protected" fields such as
the "simplex" variable (defined in "DirectSearchOptimizer" but modified in
"NelderMead").

In this new scheme, the methods "evaluateSimplex" and "replaceWorstPoint"
would also belong to "Simplex".

What do you think? [This is all untested, so I may have overlooked
something.]


Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to