constructors parameters in the correct order, a constructor without an edoContinue
This commit is contained in:
parent
e4399683dd
commit
c7d060efc0
1 changed files with 50 additions and 21 deletions
|
|
@ -60,32 +60,61 @@ public:
|
||||||
/*!
|
/*!
|
||||||
Takes algo operators, all are mandatory
|
Takes algo operators, all are mandatory
|
||||||
|
|
||||||
|
\param evaluation Evaluate a population
|
||||||
\param selector Selection of the best candidate solutions in the population
|
\param selector Selection of the best candidate solutions in the population
|
||||||
\param estimator Estimation of the distribution parameters
|
\param estimator Estimation of the distribution parameters
|
||||||
\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 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
|
||||||
\param evaluation Evaluate a population
|
|
||||||
\param replacor Replace old solutions by new ones
|
|
||||||
*/
|
*/
|
||||||
edoEDA (
|
edoEDA (
|
||||||
eoSelect< EOT > & selector,
|
eoPopEvalFunc < EOT > & evaluator,
|
||||||
edoEstimator< D > & estimator,
|
eoSelect< EOT > & selector,
|
||||||
edoSampler< D > & sampler,
|
edoEstimator< D > & estimator,
|
||||||
eoContinue< EOT > & pop_continuator,
|
edoSampler< D > & sampler,
|
||||||
edoContinue< D > & distribution_continuator,
|
eoReplacement< EOT > & replacor,
|
||||||
eoPopEvalFunc < EOT > & evaluator,
|
eoContinue< EOT > & pop_continuator,
|
||||||
eoReplacement< EOT > & replacor
|
edoContinue< D > & distribution_continuator
|
||||||
)
|
) :
|
||||||
: _selector(selector),
|
_evaluator(evaluator),
|
||||||
_estimator(estimator),
|
_selector(selector),
|
||||||
_sampler(sampler),
|
_estimator(estimator),
|
||||||
_pop_continuator(pop_continuator),
|
_sampler(sampler),
|
||||||
_distribution_continuator(distribution_continuator),
|
_replacor(replacor),
|
||||||
_evaluator(evaluator),
|
_pop_continuator(pop_continuator),
|
||||||
_replacor(replacor)
|
_distribution_continuator(distribution_continuator)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
//! edoEDA constructor without an edoContinue
|
||||||
|
/*!
|
||||||
|
Takes algo operators, all are mandatory
|
||||||
|
|
||||||
|
\param evaluation Evaluate a population
|
||||||
|
\param selector Selection of the best candidate solutions in the population
|
||||||
|
\param estimator Estimation of the distribution parameters
|
||||||
|
\param sampler Generate feasible solutions using the distribution
|
||||||
|
\param replacor Replace old solutions by new ones
|
||||||
|
\param pop_continuator Stopping criterion based on the population features
|
||||||
|
*/
|
||||||
|
edoEDA (
|
||||||
|
eoPopEvalFunc < EOT > & evaluator,
|
||||||
|
eoSelect< EOT > & selector,
|
||||||
|
edoEstimator< D > & estimator,
|
||||||
|
edoSampler< D > & sampler,
|
||||||
|
eoReplacement< EOT > & replacor,
|
||||||
|
eoContinue< EOT > & pop_continuator
|
||||||
|
) :
|
||||||
|
_evaluator(evaluator),
|
||||||
|
_selector(selector),
|
||||||
|
_estimator(estimator),
|
||||||
|
_sampler(sampler),
|
||||||
|
_replacor(replacor),
|
||||||
|
_pop_continuator(pop_continuator),
|
||||||
|
_distribution_continuator( edoDummyContinue<D>() )
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
/** A basic EDA algorithm that iterates over:
|
/** A basic EDA algorithm that iterates over:
|
||||||
* selection, estimation, sampling, bounding, evaluation, replacement
|
* selection, estimation, sampling, bounding, evaluation, replacement
|
||||||
*
|
*
|
||||||
|
|
@ -135,6 +164,9 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
//! A full evaluation function.
|
||||||
|
eoPopEvalFunc < EOT > & _evaluator;
|
||||||
|
|
||||||
//! A EOT selector
|
//! A EOT selector
|
||||||
eoSelect < EOT > & _selector;
|
eoSelect < EOT > & _selector;
|
||||||
|
|
||||||
|
|
@ -144,17 +176,14 @@ private:
|
||||||
//! A D sampler
|
//! A D sampler
|
||||||
edoSampler< D > & _sampler;
|
edoSampler< D > & _sampler;
|
||||||
|
|
||||||
|
//! A EOT replacor
|
||||||
|
eoReplacement < EOT > & _replacor;
|
||||||
|
|
||||||
//! A EOT population continuator
|
//! A EOT population continuator
|
||||||
eoContinue < EOT > & _pop_continuator;
|
eoContinue < EOT > & _pop_continuator;
|
||||||
|
|
||||||
//! A D continuator
|
//! A D continuator
|
||||||
edoContinue < D > & _distribution_continuator;
|
edoContinue < D > & _distribution_continuator;
|
||||||
|
|
||||||
//! A full evaluation function.
|
|
||||||
eoPopEvalFunc < EOT > & _evaluator;
|
|
||||||
|
|
||||||
//! A EOT replacor
|
|
||||||
eoReplacement < EOT > & _replacor;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !_edoEDA_h
|
#endif // !_edoEDA_h
|
||||||
|
|
|
||||||
Reference in a new issue