Factorize algorithms code in a hierarchy of classes

CMAES-like algorithm (edoAlgoAdaptive) main loop work on an extern distribution passed as a reference, which is updated at each iteration
EDA-like algorithm (edoAlgoStateless) work on an intern distribution, that is replaced at each iteration

edoAlgoStateless inherits from edoAlgoAdaptive, and embed a default member on which the work is done.
This commit is contained in:
Johann Dreo 2012-07-18 10:41:17 +02:00
commit 8120116c1b
5 changed files with 136 additions and 80 deletions

View file

@ -140,7 +140,7 @@ int main(int ac, char** av)
eoPopLoopEval<RealVec> popEval( eval );
// EDA algorithm configuration
edoAlgo< Distrib >* algo = new edoAdaptiveAlgo< Distrib >
edoAlgo< Distrib >* algo = new edoAlgoAdaptive< Distrib >
(distribution, popEval, *selector, *estimator, *sampler, *replacor,
pop_continue, *distribution_continue );

View file

@ -161,7 +161,7 @@ int main(int ac, char** av)
eoPopLoopEval<EOT> popEval( eval );
// EDA algorithm configuration
edoAlgo< Distrib >* algo = new edoAdaptiveAlgo< Distrib >
edoAlgo< Distrib >* algo = new edoAlgoStateless< Distrib >
(popEval, *selector, *estimator, *sampler, *replacor,
pop_continue, *distribution_continue );