do not use a temporary default distrib in stateless algorithm, instanciate within base class constructor
This commit is contained in:
parent
f5afa694bc
commit
b4da9edf40
1 changed files with 4 additions and 10 deletions
|
|
@ -59,8 +59,6 @@ public:
|
||||||
\param replacor Replace old solutions by new ones
|
\param replacor Replace old solutions by new ones
|
||||||
\param pop_continuator Stopping criterion based on the population features
|
\param pop_continuator Stopping criterion based on the population features
|
||||||
\param distribution_continuator Stopping criterion based on the distribution features
|
\param distribution_continuator Stopping criterion based on the distribution features
|
||||||
|
|
||||||
You are not supposed to override the tmp_distrib default initalization, or else use edoAlgoAdaptive
|
|
||||||
*/
|
*/
|
||||||
edoAlgoStateless(
|
edoAlgoStateless(
|
||||||
eoPopEvalFunc < EOType > & evaluator,
|
eoPopEvalFunc < EOType > & evaluator,
|
||||||
|
|
@ -69,10 +67,9 @@ public:
|
||||||
edoSampler< EOD > & sampler,
|
edoSampler< EOD > & sampler,
|
||||||
eoReplacement< EOType > & replacor,
|
eoReplacement< EOType > & replacor,
|
||||||
eoContinue< EOType > & pop_continuator,
|
eoContinue< EOType > & pop_continuator,
|
||||||
edoContinue< EOD > & distribution_continuator,
|
edoContinue< EOD > & distribution_continuator
|
||||||
EOD* tmp_distrib = (new EOD())
|
|
||||||
) :
|
) :
|
||||||
edoAlgoAdaptive<EOD>( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator)
|
edoAlgoAdaptive<EOD>( *(new EOD), evaluator, selector, estimator, sampler, replacor, pop_continuator, distribution_continuator)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/** Constructor without an edoContinue
|
/** Constructor without an edoContinue
|
||||||
|
|
@ -83,8 +80,6 @@ public:
|
||||||
\param sampler Generate feasible solutions using the distribution
|
\param sampler Generate feasible solutions using the distribution
|
||||||
\param replacor Replace old solutions by new ones
|
\param replacor Replace old solutions by new ones
|
||||||
\param pop_continuator Stopping criterion based on the population features
|
\param pop_continuator Stopping criterion based on the population features
|
||||||
|
|
||||||
You are not supposed to override the tmp_distrib default initalization, or else use edoAlgoAdaptive
|
|
||||||
*/
|
*/
|
||||||
edoAlgoStateless (
|
edoAlgoStateless (
|
||||||
eoPopEvalFunc < EOType > & evaluator,
|
eoPopEvalFunc < EOType > & evaluator,
|
||||||
|
|
@ -92,10 +87,9 @@ public:
|
||||||
edoEstimator< EOD > & estimator,
|
edoEstimator< EOD > & estimator,
|
||||||
edoSampler< EOD > & sampler,
|
edoSampler< EOD > & sampler,
|
||||||
eoReplacement< EOType > & replacor,
|
eoReplacement< EOType > & replacor,
|
||||||
eoContinue< EOType > & pop_continuator,
|
eoContinue< EOType > & pop_continuator
|
||||||
EOD* tmp_distrib = (new EOD())
|
|
||||||
) :
|
) :
|
||||||
edoAlgoAdaptive<EOD>( *tmp_distrib, evaluator, selector, estimator, sampler, replacor, pop_continuator)
|
edoAlgoAdaptive<EOD>( *(new EOD), evaluator, selector, estimator, sampler, replacor, pop_continuator)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
~edoAlgoStateless()
|
~edoAlgoStateless()
|
||||||
|
|
|
||||||
Reference in a new issue