Avoid generating documentation on undocumented sources.
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1474 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
378fd7bb5e
commit
8f499ab64e
5 changed files with 77 additions and 53 deletions
|
|
@ -102,7 +102,7 @@ void printDebugMessage (const char * __mess)
|
|||
sprintf (buff, "[%s][%s: ", host, localTime );
|
||||
|
||||
for (unsigned i = 0; i < files.size (); i ++)
|
||||
fprintf (files [i], buff);
|
||||
fprintf (files [i],"%s" ,buff);
|
||||
|
||||
/* Message */
|
||||
sprintf (buff, "%s", __mess);
|
||||
|
|
|
|||
|
|
@ -43,48 +43,55 @@
|
|||
/**************************************************************************************/
|
||||
/************************** DEFINE A CONTINUATOR ***********************************/
|
||||
/**************************************************************************************/
|
||||
|
||||
/*
|
||||
//! @class continuator
|
||||
//! @brief Abstract class for a continuator within the exchange of data by migration
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
class continuator
|
||||
{
|
||||
public:
|
||||
|
||||
/*
|
||||
//! @brief Virtual function of check
|
||||
//! @return true if the algorithm must continue
|
||||
*/
|
||||
virtual bool check()=0;
|
||||
//! @brief Virtual destructor
|
||||
// //! @brief Virtual destructor
|
||||
virtual ~continuator(){}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
//! @class eoContinuator
|
||||
//! @brief Specific class for a continuator within the exchange of migration of a population
|
||||
//! @see continuator
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
template < class EOT> class eoContinuator : public continuator
|
||||
{
|
||||
public:
|
||||
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param eoContinue<EOT> &
|
||||
//! @param eoPop<EOT> &
|
||||
*/
|
||||
eoContinuator(eoContinue<EOT> & _cont, const eoPop<EOT> & _pop): cont (_cont), pop(_pop)
|
||||
{}
|
||||
|
||||
/*
|
||||
//! @brief Virtual function of check
|
||||
//! @return false if the algorithm must continue
|
||||
*/
|
||||
virtual bool check()
|
||||
{
|
||||
return cont(pop);
|
||||
}
|
||||
|
||||
protected:
|
||||
/*
|
||||
//! @param eoContinue<EOT> &
|
||||
//! @param eoPop<EOT> &
|
||||
*/
|
||||
eoContinue<EOT> & cont ;
|
||||
const eoPop<EOT> & pop;
|
||||
};
|
||||
|
|
@ -93,41 +100,46 @@ template < class EOT> class eoContinuator : public continuator
|
|||
/**************************************************************************************/
|
||||
/************************** DEFINE A SELECTOR **************************************/
|
||||
/**************************************************************************************/
|
||||
|
||||
/*
|
||||
//! @class selector
|
||||
//! @brief Abstract class for a selector within the exchange of data by migration
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
template < class TYPE> class selector
|
||||
{
|
||||
public:
|
||||
|
||||
/*
|
||||
//! @brief Virtual operator on the template type
|
||||
//! @param TYPE &
|
||||
*/
|
||||
virtual void operator()(TYPE &)=0;
|
||||
//! @brief Virtual destructor
|
||||
// //! @brief Virtual destructor
|
||||
virtual ~selector(){}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
//! @class eoSelector
|
||||
//! @brief Specific class for a selector within the exchange of migration of a population
|
||||
//! @see selector
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
template < class EOT, class TYPE> class eoSelector : public selector< TYPE >
|
||||
{
|
||||
public:
|
||||
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param eoSelectOne<EOT> &
|
||||
//! @param unsigned _nb_select
|
||||
//! @param TYPE & _source (with TYPE which is the template type)
|
||||
*/
|
||||
eoSelector(eoSelectOne<EOT> & _select, unsigned _nb_select, const TYPE & _source): selector (_select), nb_select(_nb_select), source(_source)
|
||||
{}
|
||||
|
||||
/*
|
||||
//! @brief Virtual operator on the template type
|
||||
//! @param TYPE & _dest
|
||||
*/
|
||||
virtual void operator()(TYPE & _dest)
|
||||
{
|
||||
size_t target = static_cast<size_t>(nb_select);
|
||||
|
|
@ -137,9 +149,11 @@ template < class EOT, class TYPE> class eoSelector : public selector< TYPE >
|
|||
}
|
||||
|
||||
protected:
|
||||
/*
|
||||
//! @param eoSelectOne<EOT> &
|
||||
//! @param unsigned nb_select
|
||||
//! @param TYPE & source
|
||||
*/
|
||||
eoSelectOne<EOT> & selector ;
|
||||
unsigned nb_select;
|
||||
const TYPE & source;
|
||||
|
|
@ -149,46 +163,55 @@ template < class EOT, class TYPE> class eoSelector : public selector< TYPE >
|
|||
/**************************************************************************************/
|
||||
/************************** DEFINE A REPLACEMENT ***********************************/
|
||||
/**************************************************************************************/
|
||||
|
||||
/*
|
||||
//! @class replacement
|
||||
//! @brief Abstract class for a replacement within the exchange of data by migration
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
template < class TYPE> class replacement
|
||||
{
|
||||
public:
|
||||
/*
|
||||
//! @brief Virtual operator on the template type
|
||||
//! @param TYPE &
|
||||
*/
|
||||
virtual void operator()(TYPE &)=0;
|
||||
//! @brief Virtual destructor
|
||||
// //! @brief Virtual destructor
|
||||
virtual ~replacement(){}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
//! @class eoReplace
|
||||
//! @brief Specific class for a replacement within the exchange of migration of a population
|
||||
//! @see replacement
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
template < class EOT, class TYPE> class eoReplace : public replacement< TYPE >
|
||||
{
|
||||
public:
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param eoReplacement<EOT> &
|
||||
//! @param TYPE & _destination (with TYPE which is the template type)
|
||||
*/
|
||||
eoReplace(eoReplacement<EOT> & _replace, TYPE & _destination): replace(_replace), destination(_destination)
|
||||
{}
|
||||
|
||||
/*
|
||||
//! @brief Virtual operator on the template type
|
||||
//! @param TYPE & _source
|
||||
*/
|
||||
virtual void operator()(TYPE & _source)
|
||||
{
|
||||
replace(destination, _source);
|
||||
}
|
||||
|
||||
protected:
|
||||
/*
|
||||
//! @param eoReplacement<EOT> &
|
||||
//! @param TYPE & destination
|
||||
*/
|
||||
eoReplacement<EOT> & replace;
|
||||
TYPE & destination;
|
||||
};
|
||||
|
|
@ -197,24 +220,28 @@ template < class EOT, class TYPE> class eoReplace : public replacement< TYPE >
|
|||
/**************************************************************************************/
|
||||
/************************ Continuator for synchrone migartion ************************/
|
||||
/**************************************************************************************/
|
||||
|
||||
/*
|
||||
//! @class eoSyncContinue
|
||||
//! @brief Class for a continuator within the exchange of data by synchrone migration
|
||||
//! @see continuator
|
||||
//! @version 1.0
|
||||
//! @date january 2008
|
||||
*/
|
||||
class eoSyncContinue: public continuator
|
||||
{
|
||||
|
||||
public:
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param unsigned __period
|
||||
//! @param unsigned __init_counter
|
||||
*/
|
||||
eoSyncContinue (unsigned __period, unsigned __init_counter = 0): period (__period),counter (__init_counter)
|
||||
{}
|
||||
|
||||
/*
|
||||
//! @brief Virtual function of check
|
||||
//! @return true if the algorithm must continue
|
||||
*/
|
||||
virtual bool check()
|
||||
{
|
||||
return ((++ counter) % period) != 0 ;
|
||||
|
|
@ -222,8 +249,10 @@ class eoSyncContinue: public continuator
|
|||
|
||||
|
||||
private:
|
||||
/*
|
||||
//! @param unsigned period
|
||||
//! @param unsigned counter
|
||||
*/
|
||||
unsigned period;
|
||||
unsigned counter;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,12 +36,13 @@
|
|||
|
||||
#ifndef PEOEVALFUNC_H
|
||||
#define PEOEVALFUNC_H
|
||||
|
||||
/*
|
||||
//! @class peoEvalFunc
|
||||
//! @brief Specific class for evaluation
|
||||
//! @see eoEvalFunc
|
||||
//! @version 1.0
|
||||
//! @date november 2007
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& >
|
||||
#else
|
||||
|
|
@ -49,22 +50,24 @@ template< class EOT, class FitT = typename EOT::Fitness, class FunctionArg = con
|
|||
#endif
|
||||
struct peoEvalFunc: public eoEvalFunc<EOT>
|
||||
{
|
||||
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param FitT (* _eval)( FunctionArg )
|
||||
*/
|
||||
peoEvalFunc( FitT (* _eval)( FunctionArg ) )
|
||||
: eoEvalFunc<EOT>(), evalFunc( _eval )
|
||||
{};
|
||||
|
||||
/*
|
||||
//! @brief Virtual operator
|
||||
//! @param EOT & _peo
|
||||
*/
|
||||
virtual void operator() ( EOT & _peo )
|
||||
{
|
||||
_peo.fitness((*evalFunc)( _peo ));
|
||||
};
|
||||
|
||||
private:
|
||||
//! @param FitT (* evalFunc )( FunctionArg )
|
||||
// //! @param FitT (* evalFunc )( FunctionArg )
|
||||
FitT (* evalFunc )( FunctionArg );
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -45,27 +45,30 @@
|
|||
#include <utils/eoHowMany.h>
|
||||
#include <eoSelectOne.h>
|
||||
|
||||
|
||||
/*
|
||||
//! @class peoPSOSelect
|
||||
//! @brief Specific class for a selection of a population of a PSO
|
||||
//! @see eoSelectOne
|
||||
//! @version 1.1
|
||||
//! @date october 2007
|
||||
*/
|
||||
template <class POT> class peoPSOSelect: public eoSelectOne<POT>
|
||||
{
|
||||
public:
|
||||
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param eoTopology < POT > & _topology
|
||||
*/
|
||||
peoPSOSelect(eoTopology < POT > & _topology):topology(_topology)
|
||||
{}
|
||||
|
||||
//! @brief typedef : creation of Fitness
|
||||
// //! @brief typedef : creation of Fitness
|
||||
typedef typename PO < POT >::Fitness Fitness;
|
||||
|
||||
/*
|
||||
//! @brief Virtual operator
|
||||
//! @param eoPop<POT>& _pop
|
||||
//! @return POT&
|
||||
*/
|
||||
virtual const POT& operator()(const eoPop<POT>& _pop)
|
||||
{
|
||||
//return topology.globalBest(_pop);
|
||||
|
|
@ -73,32 +76,35 @@ template <class POT> class peoPSOSelect: public eoSelectOne<POT>
|
|||
}
|
||||
|
||||
private:
|
||||
//! @param eoTopology < POT > & topology
|
||||
// //! @param eoTopology < POT > & topology
|
||||
eoTopology < POT > & topology;
|
||||
};
|
||||
|
||||
/*
|
||||
//! @class peoGlobalBestVelocity
|
||||
//! @brief Specific class for a replacement thanks to the velocity migration of a population of a PSO
|
||||
//! @see eoReplacement
|
||||
//! @version 1.1
|
||||
//! @date october 2007
|
||||
*/
|
||||
template <class POT>
|
||||
class peoGlobalBestVelocity : public eoReplacement<POT>
|
||||
{
|
||||
public:
|
||||
|
||||
//! @brief typedef : creation of VelocityType
|
||||
// //! @brief typedef : creation of VelocityType
|
||||
typedef typename POT::ParticleVelocityType VelocityType;
|
||||
|
||||
/*
|
||||
//! @brief Constructor
|
||||
//! @param double & _c3
|
||||
//! @param eoVelocity < POT > &_velocity
|
||||
*/
|
||||
peoGlobalBestVelocity( const double & _c3, eoVelocity < POT > &_velocity): c3 (_c3),velocity (_velocity)
|
||||
{}
|
||||
|
||||
/*
|
||||
//! @brief Virtual operator
|
||||
//! @param eoPop<POT>& _dest
|
||||
//! @param eoPop<POT>& _source
|
||||
*/
|
||||
void operator()(eoPop<POT>& _dest, eoPop<POT>& _source)
|
||||
{
|
||||
|
||||
|
|
@ -114,27 +120,31 @@ class peoGlobalBestVelocity : public eoReplacement<POT>
|
|||
}
|
||||
|
||||
protected:
|
||||
/*
|
||||
//! @param double & c3
|
||||
//! @param eoVelocity < POT > & velocity
|
||||
*/
|
||||
const double & c3;
|
||||
eoVelocity < POT > & velocity;
|
||||
};
|
||||
|
||||
/*
|
||||
//! @class peoWorstPositionReplacement
|
||||
//! @brief Specific class for a replacement of a population of a PSO
|
||||
//! @see eoReplacement
|
||||
//! @version 1.1
|
||||
//! @date october 2007
|
||||
*/
|
||||
template <class POT> class peoWorstPositionReplacement : public eoReplacement<POT>
|
||||
{
|
||||
public:
|
||||
//! @brief constructor
|
||||
// //! @brief constructor
|
||||
peoWorstPositionReplacement()
|
||||
{}
|
||||
|
||||
/*
|
||||
//! @brief operator
|
||||
//! @param eoPop<POT>& _dest
|
||||
//! @param eoPop<POT>& _source
|
||||
*/
|
||||
void operator()(eoPop<POT>& _dest, eoPop<POT>& _source)
|
||||
{
|
||||
unsigned ind=0;
|
||||
|
|
|
|||
|
|
@ -246,12 +246,6 @@ template< class EOT > void peoPopEval< EOT > :: unpackResult()
|
|||
{
|
||||
long int __fit; unpack( __fit );fit = __fit;
|
||||
}
|
||||
/*
|
||||
if ( type[position] == types[3])
|
||||
{
|
||||
long long int __fit; unpack( __fit );fit = __fit;
|
||||
}
|
||||
* */
|
||||
if ( type[position] == types[4])
|
||||
{
|
||||
unsigned int __fit; unpack( __fit );fit = __fit;
|
||||
|
|
@ -264,12 +258,6 @@ template< class EOT > void peoPopEval< EOT > :: unpackResult()
|
|||
{
|
||||
unsigned long __fit; unpack( __fit );fit = __fit;
|
||||
}
|
||||
/*
|
||||
if ( type[position] == types[7])
|
||||
{
|
||||
unsigned long long __fit; unpack( __fit );fit = __fit;
|
||||
}
|
||||
*/
|
||||
if ( type[position] == types[8])
|
||||
{
|
||||
float __fit; unpack( __fit );fit = __fit;
|
||||
|
|
@ -278,12 +266,6 @@ template< class EOT > void peoPopEval< EOT > :: unpackResult()
|
|||
{
|
||||
double __fit; unpack( __fit );fit = __fit;
|
||||
}
|
||||
/*
|
||||
if ( type[position] == types[10])
|
||||
{
|
||||
long double __fit; unpack( __fit );fit = __fit;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue