Le 26/11/2010 13:34, Dr. Dietmar Wolz a écrit : >> Should we simply allow user to register an instance of some optimizer > reconfigurator interface in the constructor ? Something like: >> >> public MultiStartDifferentiableMultivariateVectorialOptimizer( >> DifferentiableMultivariateVectorialOptimizer optimizer, >> int starts, >> RandomVectorGenerator generator, >> OptimizerReconfigurator reconfigurator) > >> with > >> public interface OptimizerReconfigurator { >> public DifferentiableMultivariateVectorialOptimizer >> reconfigure(DifferentiableMultivariateVectorialOptimizer); >> } > > +1 from me. > Question is how reconfigure() is configured?
It is entirely up to the user who implements it, and it depends on the algorithm he chose. If the algorithm does have some setXxx() setter, he could do: public DifferentiableMultivariateVectorialOptimizer reconfigure(DifferentiableMultivariateVectorialOptimizer optimizer, RandomGenerator r) { optimizer.setXxx(r.nextDouble()); return optimizer; } otherwise (i.e. if the optimizer is immutable, which is the best thing to do), he would simply create a new instance. Note that I have added a random generator to the call sequence, as is may be useful. Luc > In the CMA-ES case this would mean how the population increase factor > Is defined. May be simply by an additional parameter for the > optimization algo? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org