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:
parent
ae1d88f530
commit
8120116c1b
5 changed files with 136 additions and 80 deletions
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue