Documentation updated

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1692 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
jhumeau 2010-03-15 13:55:25 +00:00
commit deaeaeec36
16 changed files with 101 additions and 33 deletions

View file

@ -109,7 +109,7 @@ ALWAYS_DETAILED_SEC = NO
# members were ordinary class members. Constructors, destructors and assignment
# operators of the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
INLINE_INHERITED_MEMB = YES
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
# path before files name in the file list and in the header files. If set
@ -139,7 +139,7 @@ STRIP_FROM_INC_PATH =
# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
SHORT_NAMES = YES
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
@ -235,7 +235,7 @@ EXTENSION_MAPPING =
# func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
BUILTIN_STL_SUPPORT = NO
BUILTIN_STL_SUPPORT = YES
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
@ -480,7 +480,7 @@ SHOW_USED_FILES = YES
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO.
SHOW_DIRECTORIES = NO
SHOW_DIRECTORIES = YES
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
# This will remove the Files entry from the Quick Index and from the
@ -1352,7 +1352,7 @@ HIDE_UNDOC_RELATIONS = YES
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
HAVE_DOT = NO
HAVE_DOT = YES
# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
@ -1389,7 +1389,7 @@ CLASS_GRAPH = YES
# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
COLLABORATION_GRAPH = YES
COLLABORATION_GRAPH = NO
# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for groups, showing the direct groups dependencies
@ -1400,12 +1400,12 @@ GROUP_GRAPHS = YES
# collaboration diagrams in a style similar to the OMG's Unified Modeling
# Language.
UML_LOOK = NO
UML_LOOK = YES
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
TEMPLATE_RELATIONS = NO
TEMPLATE_RELATIONS = YES
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
# tags are set to YES then doxygen will generate a graph for each documented
@ -1427,7 +1427,7 @@ INCLUDED_BY_GRAPH = YES
# the time of a run. So in most cases it will be better to enable call graphs
# for selected functions only using the \callgraph command.
CALL_GRAPH = NO
CALL_GRAPH = YES
# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
# doxygen will generate a caller dependency graph for every global function

View file

@ -39,6 +39,9 @@
#include <utils/eoMonitor.h>
#include <continuator/moStatBase.h>
/**
* Continuator allowing to add others (continuators, stats, monitors or updaters)
*/
template <class NH>
class moCheckpoint : public moContinuator<NH> {
public :
@ -46,22 +49,65 @@ public :
typedef NH Neighborhood ;
typedef typename Neighborhood::EOT EOT ;
/**
* Default constructor (moCheckpoint must have at least one continuator)
* @param _cont a continuator
*/
moCheckpoint(moContinuator<Neighborhood>& _cont) {
continuators.push_back(&_cont);
}
void add(moContinuator<Neighborhood>& _cont) { continuators.push_back(&_cont); }
void add(moStatBase<EOT>& _stat) { stats.push_back(&_stat); }
void add(eoMonitor& _mon) { monitors.push_back(&_mon); }
void add(eoUpdater& _upd) { updaters.push_back(&_upd); }
/**
* add a continuator to the checkpoint
* @param _cont a continuator
*/
void add(moContinuator<Neighborhood>& _cont) {
continuators.push_back(&_cont);
}
/**
* add a statistic operator to the checkpoint
* @param _stat a statistic operator
*/
void add(moStatBase<EOT>& _stat) {
stats.push_back(&_stat);
}
/**
* add a monitor to the checkpoint
* @param _mon a monitor
*/
void add(eoMonitor& _mon) {
monitors.push_back(&_mon);
}
/**
* add a updater to the checkpoint
* @param _upd an updater
*/
void add(eoUpdater& _upd) {
updaters.push_back(&_upd);
}
/**
* init all continuators containing in the checkpoint regarding a solution
* @param _sol the corresponding solution
*/
virtual void init(EOT& _sol) {
for(unsigned i = 0; i < continuators.size(); ++i)
continuators[i]->init(_sol);
}
/**
* @return the name of the class
*/
virtual std::string className(void) const { return "moCheckPoint"; }
/**
* apply operator of checkpoint's containers
* @param _sol reference of the solution
* @return true if all continuator return true
*/
bool operator()(EOT & _sol) {
unsigned i;
bool bContinue = true;
@ -82,6 +128,10 @@ public :
return bContinue;
}
/**
* last call of statistic operators, monitors and updaters
* @param _sol reference of the solution
*/
void lastCall(EOT& _sol){
unsigned int i;
for (i = 0; i < stats.size(); ++i)
@ -95,11 +145,15 @@ public :
}
private :
/** continuators vector */
std::vector<moContinuator<Neighborhood>*> continuators;
/** statistic operators vector */
std::vector<moStatBase<EOT>*> stats;
/** monitors vector */
std::vector<eoMonitor*> monitors;
/** updaters vector */
std::vector<eoUpdater*> updaters;
std::vector<moContinuator<Neighborhood>*> continuators;
std::vector<moStatBase<EOT>*> stats;
std::vector<eoMonitor*> monitors;
std::vector<eoUpdater*> updaters;
};

View file

@ -56,7 +56,8 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _neighborComparator a neighbor comparator
* @param _solNeighborComparator a solution vs neighbor comparator
*/
moFirstImprExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, moNeighborComparator<Neighbor>& _neighborComparator, moSolNeighborComparator<Neighbor>& _solNeighborComparator) : moNeighborhoodExplorer<Neighborhood>(_neighborhood, _eval), neighborComparator(_neighborComparator), solNeighborComparator(_solNeighborComparator) {
isAccept = false;

View file

@ -60,7 +60,9 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _neighborComparator a neighbor comparator
* @param _solNeighborComparator a solution vs neighbor comparator
* @param _nbStep maximum step to do
*/
moHCneutralExplorer(Neighborhood& _neighborhood,
moEval<Neighbor>& _eval,

View file

@ -57,7 +57,9 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _neighborComparator a neighbor comparator
* @param _solNeighborComparator a solution vs neighbor comparator
* @param _nbStep maximum number of step to do
*/
moMetropolisHastingExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, moNeighborComparator<Neighbor>& _neighborComparator, moSolNeighborComparator<Neighbor>& _solNeighborComparator, unsigned int _nbStep) : moNeighborhoodExplorer<Neighborhood>(_neighborhood, _eval), neighborComparator(_neighborComparator), solNeighborComparator(_solNeighborComparator), nbStep(_nbStep) {
isAccept = false;
@ -73,23 +75,26 @@ public:
/**
* initialization of the number of step to be done
* @param _solution the solution (unused here)
*/
virtual void initParam(EOT & solution){
virtual void initParam(EOT & _solution){
step = 0;
isAccept = true;
};
/**
* increase the number of step
* @param _solution the solution (unused here)
*/
virtual void updateParam(EOT & solution){
virtual void updateParam(EOT & _solution){
step++;
};
/**
* terminate: NOTHING TO DO
* @param _solution the solution (unused here)
*/
virtual void terminate(EOT & solution){};
virtual void terminate(EOT & _solution){};
/**
* Explore the neighborhood of a solution

View file

@ -56,7 +56,6 @@ public:
* Constructor with a Neighborhood and evaluation function
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
*/
moNeighborhoodExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval):neighborhood(_neighborhood), eval(_eval), isMoved(false) {}

View file

@ -57,7 +57,8 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _solNeighborComparator a solution vs neighbor comparator
* @param _nbStep maximum number of step to do
*/
moRandomNeutralWalkExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval,
moSolNeighborComparator<Neighbor>& _solNeighborComparator,

View file

@ -56,7 +56,7 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _nbStep maximum number of step to do
*/
moRandomWalkExplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, unsigned _nbStep) : moNeighborhoodExplorer<Neighborhood>(_neighborhood, _eval), nbStep(_nbStep) {
isAccept = false;

View file

@ -56,7 +56,8 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _neighborComparator a neighbor comparator
* @param _solNeighborComparator solution vs neighbor comparator
*/
moSimpleHCexplorer(Neighborhood& _neighborhood, moEval<Neighbor>& _eval, moNeighborComparator<Neighbor>& _neighborComparator, moSolNeighborComparator<Neighbor>& _solNeighborComparator) : moNeighborhoodExplorer<Neighborhood>(_neighborhood, _eval), neighborComparator(_neighborComparator), solNeighborComparator(_solNeighborComparator) {
isAccept = false;

View file

@ -56,7 +56,8 @@ public:
* Constructor
* @param _neighborhood the neighborhood
* @param _eval the evaluation function
* @param _comparator a neighbor comparator
* @param _neighborComparator a neighbor comparator
* @param _solNeighborComparator solution vs neighbor comparator
*/
moSimpleHCneutralExplorer(Neighborhood& _neighborhood,
moEval<Neighbor>& _eval,

View file

@ -40,6 +40,9 @@
#include <comparator/moSolNeighborComparator.h>
#include <memory/moAspiration.h>
#include <memory/moTabuList.h>
#include <memory/moIntensification.h>
#include <memory/moDiversification.h>
/**
* Explorer for a Tabu Search
@ -135,6 +138,7 @@ public:
*/
virtual void operator()(EOT & _solution)
{
bool found=false;
intensification(_solution);
diversification(_solution);
if(neighborhood.hasNeighbor(_solution))

View file

@ -86,7 +86,7 @@ public:
/**
* Setter
* @param index of the IndexNeighbor
* @param _key index of the IndexNeighbor
*/
void index(unsigned int _key){
key=_key;

View file

@ -51,7 +51,7 @@ public:
/**
* Constructor
* @param _neighborhood the size of the neighborhood
* @param _neighborhoodSize the size of the neighborhood
*/
moIndexNeighborhood(unsigned int _neighborhoodSize):neighborhoodSize(_neighborhoodSize){}

View file

@ -57,7 +57,7 @@ public:
/**
* Constructor
* @param _neighborhood the size of the neighborhood
* @param _neighborhoodSize the size of the neighborhood
*/
moOrderNeighborhood(unsigned int _neighborhoodSize): moIndexNeighborhood<Neighbor>(_neighborhoodSize), currentIndex(0){}

View file

@ -57,7 +57,7 @@ public:
/**
* Constructor
* @param _neighborhood the size of the neighborhood
* @param _neighborhoodSize the size of the neighborhood
*/
moRndWithReplNeighborhood(unsigned int _neighborhoodSize): moIndexNeighborhood<Neighbor>(_neighborhoodSize){}

View file

@ -57,7 +57,7 @@ public:
/**
* Constructor
* @param _neighborhood the size of the neighborhood
* @param _neighborhoodSize the size of the neighborhood
*/
moRndWithoutReplNeighborhood(unsigned int _neighborhoodSize): moIndexNeighborhood<Neighbor>(_neighborhoodSize), maxIndex(0){
for(unsigned int i=0; i < neighborhoodSize; i++)