Début du nettoyage et verif de la doc
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1811 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
89638f5140
commit
c4b0699f53
25 changed files with 66 additions and 61 deletions
|
|
@ -34,11 +34,11 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <explorer/moDummyExplorer.h>
|
#include <explorer/moDummyExplorer.h>
|
||||||
#include <continuator/moTrueContinuator.h>
|
#include <continuator/moTrueContinuator.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Dummy Local Search:
|
* Dummy Local Search:
|
||||||
*
|
*
|
||||||
* To do nothing, only the full evaluation of the solution if necessary ;-)
|
* To do nothing, only the full evaluation of the solution if necessary ;-)
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moDummyLS: public moLocalSearch<Neighbor>
|
class moDummyLS: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* First improvement HC:
|
* First improvement HC:
|
||||||
* Hill-Climber local search
|
* Hill-Climber local search
|
||||||
*
|
*
|
||||||
|
|
@ -45,7 +45,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* if the selected neighbor have higher fitness than the current solution
|
* if the selected neighbor have higher fitness than the current solution
|
||||||
* then the solution is replaced by the selected neighbor
|
* then the solution is replaced by the selected neighbor
|
||||||
* the algorithm stops when there is no higher neighbor
|
* the algorithm stops when there is no higher neighbor
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moFirstImprHC: public moLocalSearch<Neighbor>
|
class moFirstImprHC: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
typedef moNeighborhood<Neighbor> Neighborhood ;
|
typedef moNeighborhood<Neighbor> Neighborhood ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a hill-climber
|
* Basic constructor for a hill-climber
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
@ -77,7 +77,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a hill-climber
|
* General constructor for a hill-climber
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,10 @@ public:
|
||||||
typedef typename Neighbor::EOT EOT ;
|
typedef typename Neighbor::EOT EOT ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of a moLocalSearch needs a NeighborhooExplorer and a Continuator
|
* Constructor of a moLocalSearch
|
||||||
|
* @param _searchExpl a neighborhood explorer
|
||||||
|
* @param _cont an external continuator (can be a checkpoint!)
|
||||||
|
* @param _fullEval a full evaluation function
|
||||||
*/
|
*/
|
||||||
moLocalSearch(NeighborhoodExplorer& _searchExpl, moContinuator<Neighbor> & _cont, eoEvalFunc<EOT>& _fullEval) : searchExplorer(_searchExpl), cont(&_cont), fullEval(_fullEval) { } ;
|
moLocalSearch(NeighborhoodExplorer& _searchExpl, moContinuator<Neighbor> & _cont, eoEvalFunc<EOT>& _fullEval) : searchExplorer(_searchExpl), cont(&_cont), fullEval(_fullEval) { } ;
|
||||||
|
|
||||||
|
|
@ -99,8 +102,8 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* external continuator object
|
* Set an external continuator
|
||||||
* @return the external continuator
|
* @param _cont the external continuator
|
||||||
*/
|
*/
|
||||||
void setContinuator(moContinuator<Neighbor> & _cont) {
|
void setContinuator(moContinuator<Neighbor> & _cont) {
|
||||||
cont = &_cont ;
|
cont = &_cont ;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Metropolis-Hasting local search
|
* Metropolis-Hasting local search
|
||||||
* Only the symetric case is considered when Q(x,y) = Q(y,x)
|
* Only the symetric case is considered when Q(x,y) = Q(y,x)
|
||||||
* Fitness must be > 0
|
* Fitness must be > 0
|
||||||
|
|
@ -48,7 +48,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* if a random number from [0,1] is lower than fitness(neighbor) / fitness(solution)
|
* if a random number from [0,1] is lower than fitness(neighbor) / fitness(solution)
|
||||||
* then the solution is replaced by the selected neighbor
|
* then the solution is replaced by the selected neighbor
|
||||||
* the algorithm stops when the number of iterations is too large
|
* the algorithm stops when the number of iterations is too large
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moMetropolisHasting: public moLocalSearch<Neighbor>
|
class moMetropolisHasting: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -57,7 +57,7 @@ public:
|
||||||
typedef moNeighborhood<Neighbor> Neighborhood ;
|
typedef moNeighborhood<Neighbor> Neighborhood ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor of the Metropolis-Hasting
|
* Basic constructor of the Metropolis-Hasting
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
@ -82,7 +82,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor of the Metropolis-Hasting
|
* General constructor of the Metropolis-Hasting
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Hill-Climber local search
|
* Hill-Climber local search
|
||||||
*
|
*
|
||||||
* At each iteration,
|
* At each iteration,
|
||||||
|
|
@ -44,7 +44,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* if the selected neighbor have higher or equal fitness than the current solution
|
* if the selected neighbor have higher or equal fitness than the current solution
|
||||||
* then the solution is replaced by the selected neighbor
|
* then the solution is replaced by the selected neighbor
|
||||||
* the algorithm stops when there is no higher or equal neighbor, or if the number of iterations is too large
|
* the algorithm stops when there is no higher or equal neighbor, or if the number of iterations is too large
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moNeutralHC: public moLocalSearch<Neighbor>
|
class moNeutralHC: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -53,7 +53,7 @@ public:
|
||||||
typedef moNeighborhood<Neighbor> Neighborhood ;
|
typedef moNeighborhood<Neighbor> Neighborhood ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a hill-climber
|
* Basic constructor for a hill-climber
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
@ -78,7 +78,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a hill-climber
|
* General constructor for a hill-climber
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Random Best HC:
|
* Random Best HC:
|
||||||
* Hill-Climber local search
|
* Hill-Climber local search
|
||||||
*
|
*
|
||||||
|
|
@ -45,7 +45,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* if the selected neighbor have higher fitness than the current solution
|
* if the selected neighbor have higher fitness than the current solution
|
||||||
* then the solution is replaced by the selected neighbor
|
* then the solution is replaced by the selected neighbor
|
||||||
* the algorithm stops when there is no higher neighbor
|
* the algorithm stops when there is no higher neighbor
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moRandomBestHC: public moLocalSearch<Neighbor>
|
class moRandomBestHC: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
typedef moNeighborhood<Neighbor> Neighborhood ;
|
typedef moNeighborhood<Neighbor> Neighborhood ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a hill-climber
|
* Basic constructor for a hill-climber
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
@ -77,7 +77,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a hill-climber
|
* General constructor for a hill-climber
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,14 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Random Neutral Walk:
|
* Random Neutral Walk:
|
||||||
* Random Neutral walk local search
|
* Random Neutral walk local search
|
||||||
*
|
*
|
||||||
* At each iteration,
|
* At each iteration,
|
||||||
* one random neighbor with the same fitness is selected and replace the current solution
|
* one random neighbor with the same fitness is selected and replace the current solution
|
||||||
* the algorithm stops when the number of steps is reached
|
* the algorithm stops when the number of steps is reached
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moRandomNeutralWalk: public moLocalSearch<Neighbor>
|
class moRandomNeutralWalk: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -52,7 +52,7 @@ public:
|
||||||
typedef moNeighborhood<Neighbor> Neighborhood ;
|
typedef moNeighborhood<Neighbor> Neighborhood ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a random walk
|
* Basic constructor for a random walk
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
@ -77,7 +77,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a random walk
|
* General constructor for a random walk
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,14 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eoInit.h>
|
#include <eoInit.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Random Search:
|
* Random Search:
|
||||||
* Pure random search local search
|
* Pure random search local search
|
||||||
*
|
*
|
||||||
* At each iteration,
|
* At each iteration,
|
||||||
* one random solution is selected and replace the current solution
|
* one random solution is selected and replace the current solution
|
||||||
* the algorithm stops when the number of solution is reached
|
* the algorithm stops when the number of solution is reached
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moRandomSearch: public moLocalSearch<Neighbor>
|
class moRandomSearch: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -62,10 +62,11 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a random search
|
* General constructor for a random search
|
||||||
* @param _init the solution initializer, to explore at random the search space
|
* @param _init the solution initializer, to explore at random the search space
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _nbSolMax number of solutions
|
* @param _nbSolMax number of solutions
|
||||||
|
* @param _cont external continuator
|
||||||
*/
|
*/
|
||||||
moRandomSearch(eoInit<EOT> & _init, eoEvalFunc<EOT>& _fullEval, unsigned _nbSolMax, moContinuator<Neighbor>& _cont):
|
moRandomSearch(eoInit<EOT> & _init, eoEvalFunc<EOT>& _fullEval, unsigned _nbSolMax, moContinuator<Neighbor>& _cont):
|
||||||
moLocalSearch<Neighbor>(explorer, _cont, _fullEval),
|
moLocalSearch<Neighbor>(explorer, _cont, _fullEval),
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,14 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Random Walk:
|
* Random Walk:
|
||||||
* Random walk local search
|
* Random walk local search
|
||||||
*
|
*
|
||||||
* At each iteration,
|
* At each iteration,
|
||||||
* one random neighbor is selected and replace the current solution
|
* one random neighbor is selected and replace the current solution
|
||||||
* the algorithm stops when the number of steps is reached
|
* the algorithm stops when the number of steps is reached
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moRandomWalk: public moLocalSearch<Neighbor>
|
class moRandomWalk: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple constructor for a random walk
|
* General constructor for a random walk
|
||||||
* @param _neighborhood the neighborhood
|
* @param _neighborhood the neighborhood
|
||||||
* @param _fullEval the full evaluation function
|
* @param _fullEval the full evaluation function
|
||||||
* @param _eval neighbor's evaluation function
|
* @param _eval neighbor's evaluation function
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,9 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simulated Annealing
|
||||||
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moSA: public moLocalSearch<Neighbor>
|
class moSA: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
/********************************************************
|
/**
|
||||||
* Simple HC:
|
* Simple HC:
|
||||||
* Hill-Climber local search
|
* Hill-Climber local search
|
||||||
*
|
*
|
||||||
|
|
@ -45,7 +45,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* if the selected neighbor have higher fitness than the current solution
|
* if the selected neighbor have higher fitness than the current solution
|
||||||
* then the solution is replaced by the selected neighbor
|
* then the solution is replaced by the selected neighbor
|
||||||
* the algorithm stops when there is no higher neighbor
|
* the algorithm stops when there is no higher neighbor
|
||||||
********************************************************/
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moSimpleHC: public moLocalSearch<Neighbor>
|
class moSimpleHC: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <eval/moEval.h>
|
#include <eval/moEval.h>
|
||||||
#include <eoEvalFunc.h>
|
#include <eoEvalFunc.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tabu Search
|
||||||
|
*/
|
||||||
template<class Neighbor>
|
template<class Neighbor>
|
||||||
class moTS: public moLocalSearch<Neighbor>
|
class moTS: public moLocalSearch<Neighbor>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,18 +38,6 @@
|
||||||
#include <EO.h>
|
#include <EO.h>
|
||||||
#include <eoFunctor.h>
|
#include <eoFunctor.h>
|
||||||
|
|
||||||
// moComparator => comparer deux solutions
|
|
||||||
// idée :
|
|
||||||
// - eoComparator
|
|
||||||
// - moComparator qui hérite de eoComparator ?
|
|
||||||
// - moeoComparator qui hérite de eoComparator
|
|
||||||
// idée J :
|
|
||||||
// - eoComparator<TYPE> : eoBF <const TYPE & , const TYPE & , bool>
|
|
||||||
// - eoSolComparator : eoComparator<EOT> ?
|
|
||||||
// - moNeighborCompartor : : eoComparator<Neighbor>
|
|
||||||
//
|
|
||||||
// une instantiation possible !!
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Comparator of two types
|
* Comparator of two types
|
||||||
|
|
@ -58,7 +46,13 @@ template< class T1, class T2 >
|
||||||
class moComparator : public eoBF<const T1 & , const T2 & , bool>
|
class moComparator : public eoBF<const T1 & , const T2 & , bool>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool equals(const T1&, const T2&) = 0;
|
|
||||||
|
/**
|
||||||
|
* @param _ref1 a reference on a variable of type T1
|
||||||
|
* @param _ref2 a reference on a variable of type T2
|
||||||
|
* @return true if _ref1 and _ref2 are equals
|
||||||
|
*/
|
||||||
|
virtual bool equals(const T1& _ref1, const T2& _ref2) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
#include <continuator/moNeighborhoodStat.h>
|
#include <continuator/moNeighborhoodStat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From moNeighborhoodStat, to compute the average and the standard deviation of fitness in the neighborhood
|
* From moNeighborhoodStat, to compute the average of fitness in the neighborhood
|
||||||
*/
|
*/
|
||||||
template< class Neighbor >
|
template< class Neighbor >
|
||||||
class moAverageFitnessNeighborStat : public moStat<typename Neighbor::EOT, double >
|
class moAverageFitnessNeighborStat : public moStat<typename Neighbor::EOT, double >
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
#include <continuator/moContinuator.h>
|
#include <continuator/moContinuator.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combined several continuators
|
* Combined several continuators
|
||||||
* Continue until one of the continuators is false
|
* Continue until one of the continuators is false
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,7 @@
|
||||||
#include <utils/eoMonitor.h>
|
#include <utils/eoMonitor.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The actual class that will be used as base for all statistics
|
* Class calling monitors with a given frequency
|
||||||
* that need to be calculated over the solution
|
|
||||||
* It is a moStatBase AND an eoValueParam so it can be used in Monitors.
|
|
||||||
*/
|
*/
|
||||||
class moCounterMonitorSaver : public eoUpdater {
|
class moCounterMonitorSaver : public eoUpdater {
|
||||||
public :
|
public :
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
|
|
||||||
#include <continuator/moContinuator.h>
|
#include <continuator/moContinuator.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Continue until a maximum fitness is reached
|
* Continue until a maximum fitness is reached
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,8 @@
|
||||||
#include <continuator/moStat.h>
|
#include <continuator/moStat.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The actual class that will be used as base for all statistics
|
* Stat given the fitness of the current solution
|
||||||
* that need to be calculated over the solution
|
*/
|
||||||
* It is a moStatBase AND an eoValueParam so it can be used in Monitors.
|
|
||||||
*/
|
|
||||||
template <class EOT>
|
template <class EOT>
|
||||||
class moFitnessStat : public moStat<EOT, typename EOT::Fitness>
|
class moFitnessStat : public moStat<EOT, typename EOT::Fitness>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,8 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if continue
|
* Test if continue
|
||||||
*@param _solution a solution
|
* @param _solution a solution
|
||||||
*@return true if number of evaluations < maxFullEval
|
* @return true if number of evaluations < maxFullEval
|
||||||
*/
|
*/
|
||||||
virtual bool operator()(EOT & _solution) {
|
virtual bool operator()(EOT & _solution) {
|
||||||
return (eval.value() - nbEval_start < maxFullEval);
|
return (eval.value() - nbEval_start < maxFullEval);
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
|
|
||||||
#include <continuator/moContinuator.h>
|
#include <continuator/moContinuator.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Continue until a maximum fixed number of iterations is reached
|
* Continue until a maximum fixed number of iterations is reached
|
||||||
*/
|
*/
|
||||||
|
|
@ -43,6 +44,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param _maxIter number maximum of iterations
|
* @param _maxIter number maximum of iterations
|
||||||
|
* @param _verbose true/false : verbose mode on/off
|
||||||
*/
|
*/
|
||||||
moIterContinuator(unsigned int _maxIter, bool _verbose=true): maxIter(_maxIter), verbose(_verbose){}
|
moIterContinuator(unsigned int _maxIter, bool _verbose=true): maxIter(_maxIter), verbose(_verbose){}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
#include <continuator/moStat.h>
|
#include <continuator/moStat.h>
|
||||||
#include <continuator/moNeighborhoodStat.h>
|
#include <continuator/moNeighborhoodStat.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From moNeighborhoodStat, to compute the max fitness in the neighborhood
|
* From moNeighborhoodStat, to compute the max fitness in the neighborhood
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
#include <continuator/moStat.h>
|
#include <continuator/moStat.h>
|
||||||
#include <continuator/moNeighborhoodStat.h>
|
#include <continuator/moNeighborhoodStat.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From moNeighborhoodStat, to compute the min fitness in the neighborhood
|
* From moNeighborhoodStat, to compute the min fitness in the neighborhood
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,10 @@
|
||||||
#include <continuator/moStat.h>
|
#include <continuator/moStat.h>
|
||||||
#include <continuator/moNeighborhoodStat.h>
|
#include <continuator/moNeighborhoodStat.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* From moNeighborhoodStat, to compute the number of solutions in the neighborhood
|
* From moNeighborhoodStat, to compute the number of solutions in the neighborhood
|
||||||
* with (strictly) lower fitness than the current solution
|
* with (strictly) lower fitness than the current solution
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
template< class Neighbor >
|
template< class Neighbor >
|
||||||
class moNbInfNeighborStat : public moStat<typename Neighbor::EOT, unsigned>
|
class moNbInfNeighborStat : public moStat<typename Neighbor::EOT, unsigned>
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,11 @@
|
||||||
#include <continuator/moStat.h>
|
#include <continuator/moStat.h>
|
||||||
#include <continuator/moNeighborhoodStat.h>
|
#include <continuator/moNeighborhoodStat.h>
|
||||||
#include <neighborhood/moNeighborhood.h>
|
#include <neighborhood/moNeighborhood.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* From moNeighborhoodStat, to compute the number of solutions in the neighborhood
|
* From moNeighborhoodStat, to compute the number of solutions in the neighborhood
|
||||||
* with higher fitness than the current solution
|
* with higher fitness than the current solution
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
template< class Neighbor >
|
template< class Neighbor >
|
||||||
class moNbSupNeighborStat : public moStat<typename Neighbor::EOT, unsigned>
|
class moNbSupNeighborStat : public moStat<typename Neighbor::EOT, unsigned>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ public :
|
||||||
*
|
*
|
||||||
* @param _neighborhood a neighborhood
|
* @param _neighborhood a neighborhood
|
||||||
* @param _eval an evaluation function
|
* @param _eval an evaluation function
|
||||||
|
* @param _k number of neighbors visited (default all)
|
||||||
*/
|
*/
|
||||||
moNeighborBestStat(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, unsigned _k = 0):
|
moNeighborBestStat(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, unsigned _k = 0):
|
||||||
moStat<EOT, Fitness>(Fitness(), "best"),
|
moStat<EOT, Fitness>(Fitness(), "best"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue