commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject [Math] DirectSearchOptimizer vs NelderMead
Date Sun, 17 Oct 2010 23:08:35 GMT

[This refers to classes in package "".]
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

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message