From 8f499ab64ede643d0aae86dc9c21a961da9e95d3 Mon Sep 17 00:00:00 2001 From: fatene Date: Thu, 5 Mar 2009 10:33:51 +0000 Subject: [PATCH] Avoid generating documentation on undocumented sources. git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1474 331e1502-861f-0410-8da2-ba01fb791d7f --- trunk/paradiseo-peo/src/core/peo_debug.cpp | 2 +- trunk/paradiseo-peo/src/peoData.h | 65 ++++++++++++++++------ trunk/paradiseo-peo/src/peoEvalFunc.h | 11 ++-- trunk/paradiseo-peo/src/peoPSO.h | 34 +++++++---- trunk/paradiseo-peo/src/peoPopEval.h | 18 ------ 5 files changed, 77 insertions(+), 53 deletions(-) diff --git a/trunk/paradiseo-peo/src/core/peo_debug.cpp b/trunk/paradiseo-peo/src/core/peo_debug.cpp index 84d9418e5..8badb1628 100644 --- a/trunk/paradiseo-peo/src/core/peo_debug.cpp +++ b/trunk/paradiseo-peo/src/core/peo_debug.cpp @@ -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); diff --git a/trunk/paradiseo-peo/src/peoData.h b/trunk/paradiseo-peo/src/peoData.h index e6ba3397b..e5f477da3 100644 --- a/trunk/paradiseo-peo/src/peoData.h +++ b/trunk/paradiseo-peo/src/peoData.h @@ -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 & //! @param eoPop & +*/ eoContinuator(eoContinue & _cont, const eoPop & _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 & //! @param eoPop & +*/ eoContinue & cont ; const eoPop & 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 & //! @param unsigned _nb_select //! @param TYPE & _source (with TYPE which is the template type) +*/ eoSelector(eoSelectOne & _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(nb_select); @@ -137,9 +149,11 @@ template < class EOT, class TYPE> class eoSelector : public selector< TYPE > } protected: +/* //! @param eoSelectOne & //! @param unsigned nb_select //! @param TYPE & source +*/ eoSelectOne & 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 & //! @param TYPE & _destination (with TYPE which is the template type) +*/ eoReplace(eoReplacement & _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 & //! @param TYPE & destination +*/ eoReplacement & 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; }; diff --git a/trunk/paradiseo-peo/src/peoEvalFunc.h b/trunk/paradiseo-peo/src/peoEvalFunc.h index 3b3a5f7b3..adfd8a4f3 100644 --- a/trunk/paradiseo-peo/src/peoEvalFunc.h +++ b/trunk/paradiseo-peo/src/peoEvalFunc.h @@ -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 { - +/* //! @brief Constructor //! @param FitT (* _eval)( FunctionArg ) +*/ peoEvalFunc( FitT (* _eval)( FunctionArg ) ) : eoEvalFunc(), 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 ); }; diff --git a/trunk/paradiseo-peo/src/peoPSO.h b/trunk/paradiseo-peo/src/peoPSO.h index 13933a1bb..aa2de53e4 100644 --- a/trunk/paradiseo-peo/src/peoPSO.h +++ b/trunk/paradiseo-peo/src/peoPSO.h @@ -45,27 +45,30 @@ #include #include - +/* //! @class peoPSOSelect //! @brief Specific class for a selection of a population of a PSO //! @see eoSelectOne //! @version 1.1 //! @date october 2007 +*/ template class peoPSOSelect: public eoSelectOne { 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& _pop //! @return POT& +*/ virtual const POT& operator()(const eoPop& _pop) { //return topology.globalBest(_pop); @@ -73,32 +76,35 @@ template class peoPSOSelect: public eoSelectOne } 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 peoGlobalBestVelocity : public eoReplacement { 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& _dest //! @param eoPop& _source +*/ void operator()(eoPop& _dest, eoPop& _source) { @@ -114,27 +120,31 @@ class peoGlobalBestVelocity : public eoReplacement } 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 peoWorstPositionReplacement : public eoReplacement { public: - //! @brief constructor +// //! @brief constructor peoWorstPositionReplacement() {} - +/* //! @brief operator //! @param eoPop& _dest //! @param eoPop& _source +*/ void operator()(eoPop& _dest, eoPop& _source) { unsigned ind=0; diff --git a/trunk/paradiseo-peo/src/peoPopEval.h b/trunk/paradiseo-peo/src/peoPopEval.h index db767fb77..258f7ea60 100644 --- a/trunk/paradiseo-peo/src/peoPopEval.h +++ b/trunk/paradiseo-peo/src/peoPopEval.h @@ -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; - } - */ }