grouping classes in documentation

This commit is contained in:
Johann Dreo 2010-11-05 11:26:04 +01:00
commit 8e70cbea01
39 changed files with 140 additions and 23 deletions

View file

@ -31,6 +31,8 @@
/**
Applies a unary function to a std::vector of things.
@ingroup Utilities
*/
template <class EOT>
void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)

View file

@ -34,6 +34,8 @@
/** Abstract class for binary flight of particle swarms. Positions are updated but are expected to be binary.
* A function must be used to decide, according to continuous velocities, of the
* new positions (0,1 ... ?)
*
* @ingroup Core
*/
template < class POT > class eoBinaryFlight:public eoFlight < POT >{};

View file

@ -31,6 +31,8 @@
/** eoBitParticle: Implementation of a bit-coded particle (swarm optimization).
* Positions and best positions are 0 or 1 but the velocity is a vector of double.
*
* @ingroup Bitstring
*/
template < class FitT> class eoBitParticle: public eoVectorParticle<FitT,bool,double>

View file

@ -35,6 +35,9 @@
* within the eoGenOp framework
* eoMonCloneOp will probably be useful as the copy operator
* eoBinCloneOp will certainly never been used - but let's be complete :-)
*
* @addtogroup Core
* @{
*/
/**
@ -76,4 +79,5 @@ virtual bool operator()(EOT& , EOT& ) {return false;}
};
#endif
/** @} */

View file

@ -36,8 +36,9 @@
and allow to easily handle more than 2 continuators
02/2003 Ramón Casero Cañas - added the removeLast() method
*/
@ingroup Combination
*/
template< class EOT>
class eoCombinedContinue: public eoContinue<EOT> {
public:

View file

@ -39,6 +39,8 @@
* At step t: v(t+1)= K * ( w*v(t) + c1*r1* (xbest(t)-x(t)) + c2*r2* (gbest(t) - x(t)))
* w is updated each time the velocity performer is called and K is fixed
* (ci given and Ri chosen at random in [0;1]).
*
* @ingroup Variators
*/
template < class POT > class eoConstrictedVariableWeightVelocity:public eoVelocity < POT >
{

View file

@ -40,6 +40,8 @@
* C is fixed for all the particles and all the generations.
* Default C = 2 * k / abs(2 - P - sqrt (P*(P-4)))
* (ci and C given;P=c1*r1 + c2*r2 ; Ri chosen at random * in [0;1])
*
* @ingroup Variators
*/
template < class POT > class eoConstrictedVelocity:public eoVelocity < POT >
{

View file

@ -29,9 +29,20 @@
#include <eoPop.h>
#include <eoPersistent.h>
/** @defgroup Continuators Stopping criteria
*
* A stopping criterion is called a "continue". This is a functor that is called at each generation end
* and that return true if one should stop the search.
*
* @ingroup Utilities
*/
/** Termination condition for the genetic algorithm
* Takes the population as input, returns true for continue,
* false for termination
*
* @ingroup Continuators
* @ingroup Core
*/
template< class EOT>
class eoContinue : public eoUF<const eoPop<EOT>&, bool>, public eoPersistent

View file

@ -36,6 +36,8 @@
use this class instead of it.
It is derived from eoValueParam so you can add it to a monitor.
@ingroup Utilities
*/
template <class Procedure>
class eoProcedureCounter : public Procedure, public eoValueParam<unsigned long>

View file

@ -33,6 +33,11 @@
#include <signal.h>
#include <eoContinue.h>
/**
* @addtogroup Continuators
* @{
*/
extern bool arret_demande, existCtrlCContinue;
extern void signal_handler( int sig );
@ -78,5 +83,5 @@ public:
#endif
/** @} */
// of MSVC comment-out

View file

@ -35,6 +35,8 @@
//-----------------------------------------------------------------------------
/** eoDetSelect selects many individuals determinisctically
*
* @ingroup Selectors
*/
template<class EOT>
class eoDetSelect : public eoSelect<EOT>

View file

@ -36,12 +36,12 @@
#include <utils/eoLogger.h>
#include <utils/selectors.h>
//-----------------------------------------------------------------------------
/** eoDetTournamentSelect: a selection method that selects ONE individual by
deterministic tournament
-MS- 24/10/99 */
//-----------------------------------------------------------------------------
-MS- 24/10/99
@ingroup Selectors
*/
template <class EOT> class eoDetTournamentSelect: public eoSelectOne<EOT>
{
public:

View file

@ -37,8 +37,8 @@
*
* It takes one distribution and updates it according to one population
*
* @ingroup Core
*/
template <class EOT>
class eoDistribUpdater :
public eoBF<eoDistribution<EOT> &, eoPop<EOT> &, void>

View file

@ -39,6 +39,8 @@
*
* The instances will probably be eoValueParam of some kind
* see eoPBILDistrib.h
*
* @ingroup Core
*/
template <class EOT>

View file

@ -30,7 +30,11 @@ Authors:
#include <iostream>
#include <utility> // for std::pair
//! A fitness class that permits to compare feasible and unfeasible individuals. It guaranties that a feasible individual will always be better than an unfeasible one.
/** @addtogroup Evaluation
* @{
*/
//! A fitness class that permits to compare feasible and unfeasible individuals and guaranties that a feasible individual will always be better than an unfeasible one.
/**
* Use this class as fitness if you have some kind of individuals
* that must be always considered as better than others while having the same fitness type.
@ -232,5 +236,6 @@ typedef eoDualFitness<double, std::greater<double> > eoMinimizingDualFitness;
template< class EOT>
bool eoIsFeasible ( const EOT & sol ) { return sol.fitness().is_feasible(); }
/** @} */
#endif // _eoDualFitness_h_

View file

@ -31,6 +31,8 @@
/**
* Continues until a number of evaluations has been made
*
* @ingroup Continuators
*/
template< class EOT>
class eoEvalContinue: public eoContinue<EOT>

View file

@ -41,6 +41,8 @@ The class first call the evaluation function, then check the number of
times it has been called. If the maximum number of evaluation has been
reached, it throw an eoMaxEvalException. You can catch this exception
from your main function, so as to stop everything properly.
@ingroup Evaluation
*/
template < typename EOT >
class eoEvalCounterThrowException : public eoEvalFuncCounter< EOT >

View file

@ -27,17 +27,23 @@
#include <eoFunctor.h>
/** @defgroup Evaluation Evaluation
* @ingroup Operators
*/
/** Evaluate: takes one EO and sets its "fitness" property
* returning this fitness also. That is why EOT is passed by
* non-const reference: it must be altered within evaluate.\\
returning this fitness also. That is why EOT is passed by
non-const reference: it must be altered within evaluate.\\
The requirements on the types with which this class is to be
instantiated with are null, or else, they depend on the particular
class it's going to be applied to; EO does not impose any requirement
on it. If you subclass this abstract class, and use it to evaluate an
EO, the requirements on this EO will depend on the evaluator.
*/
@ingroup Evaluation
@ingroup Core
*/
template<class EOT> class eoEvalFunc : public eoUF<EOT&, void>
{
public :

View file

@ -31,8 +31,9 @@
#include <utils/eoParam.h>
/**
Counts the number of evaluations actually performed, thus checks first
if it has to evaluate.. etc.
Counts the number of evaluations actually performed.
@ingroup Evaluation
*/
template<class EOT> class eoEvalFuncCounter : public eoEvalFunc<EOT>, public eoValueParam<unsigned long>
{

View file

@ -4,6 +4,13 @@
#include <eoEvalFunc.h>
#include <utils/eoParam.h>
/** @addtogroup Evaluation
* @{
*/
/** The exception raised by eoEvalFuncCounterBounder
* when the maximum number of allowed evaluations is reached.
*/
class eoEvalFuncCounterBounderException : public std::exception
{
public:
@ -20,9 +27,12 @@ private:
unsigned long _threshold;
};
/**
Counts the number of evaluations actually performed, thus checks first
if it has to evaluate.. etc.
/** Counts the number of evaluations actually performed and throw an eoEvalFuncCounterBounderException
* when the maximum number of allowed evaluations is reached.
*
* This eval counter permits to stop a search during a generation, without waiting for a continue to be
* checked at the end of the loop. Useful if you have 10 individuals and 10 generations,
* but want to stop after 95 evaluations.
*/
template < typename EOT >
class eoEvalFuncCounterBounder : public eoEvalFuncCounter< EOT >
@ -53,4 +63,5 @@ private :
unsigned long _threshold;
};
/** @} */
#endif

View file

@ -34,6 +34,8 @@
* takes an existing function pointer and converts it into a evaluation
* function class. That way, old style C or C++ functions can be adapted to EO
* function classes.
*
* @ingroup Evaluation
*/
#ifdef _MSC_VER
template< class EOT, class FitT = EOT::Fitness, class FunctionArg = const EOT& >

View file

@ -25,6 +25,13 @@ Johann Dréo <johann.dreo@thalesgroup.com>
#include <eoExceptions.h>
/** Check at each evaluation if a given tie contract has been reached.
*
* Throw an eoMaxTimeException if the given max time has been reached.
* Usefull if you want to end the search independently of generations.
*
* @ingroup Evaluation
*/
template< class EOT >
class eoEvalTimeThrowException : public eoEvalFuncCounter< EOT >
{

View file

@ -35,6 +35,8 @@ class eoMaxException : public std::exception {};
An error that signals that a maximum elapsed time has been reached.
Thrown by @see eoEvalTimeThrowException
@ingroup Evaluation
*/
class eoMaxTimeException : public eoMaxException
{
@ -58,6 +60,8 @@ private:
An error that signals that a maximum number of evaluations has been reached.
Thrown by @see eoEvalEvalThrowException
@ingroup Evaluation
*/
class eoMaxEvalException : public eoMaxException
{

View file

@ -39,6 +39,8 @@
* At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) )
* It includes both a "topology" best and a global best in the social knowledge. Each topology
* provides a method to retrieve the global best <=> the best of all the neighborhood the topology contains.
*
* @ingroup Variators
*/
template < class POT > class eoExtendedVelocity:public eoVelocity < POT >
{

View file

@ -37,7 +37,10 @@ or whatever; but the instance class should be the parent class from which all th
object that are going to be created descend. This class basically defines an interface,
as usual. The base factory class for each hierarchy should be redefined every time a new
object is added to the hierarchy, which is not too good, but in any case, some code would
have to be modified*/
have to be modified
@ingroup Utilities
*/
template<class EOClass>
class eoFactory: public eoObject {

View file

@ -29,13 +29,12 @@
#include <utils/eoLogger.h>
/**
Fitness continuation:
Continues until the optimum fitness level is reached.
Continues until the optimum fitness level is reached.
All types which derive from eoScalarFitness is able to compare well via the operator override ( <, >, <=, ...)
@ingroup Continuators
*/
//! all types which derive from eoScalarFitness is able to compare well via the operator override ( <, >, <=, ...)
template< class EOT>
class eoFitContinue: public eoContinue<EOT> {
public:

View file

@ -35,6 +35,8 @@
/** eoFitnessScalingSelect: select an individual proportional to the
* linearly scaled fitness that is computed by the private
* eoLinearFitScaling object
*
* @ingroup Selectors
*/
template <class EOT>
class eoFitnessScalingSelect: public eoRouletteWorthSelect<EOT, double>

View file

@ -38,6 +38,8 @@
* At step t+1 : v(t+1)= w * v(t) + c1*r1 * (xbest(t)-x(t)) + c2*r2 * (gbest(t) - x(t))
* w is fixed for all the particles and all the generations.
* (ci and w given; Ri chosen at random * in [0;1])
*
* @ingroup Variators
*/
template < class POT > class eoFixedInertiaWeightedVelocity:public eoVelocity < POT >
{

View file

@ -29,6 +29,10 @@
#include <eoFunctor.h>
#include <eoOp.h>
/** @addtogroup Variators
* @{
*/
/** Generic eoBinOps on fixed length genotypes.
* Contains exchange crossovers (1pt and uniform)
* and crossovers that applies an Atom crossover
@ -215,5 +219,6 @@ public :
};
/** @} */
#endif

View file

@ -30,6 +30,10 @@
#include <eoOp.h>
#include <eoInit.h>
/** @addtogroup Variators
* @{
*/
/** Base classes for generic mutations on fixed length chromosomes.
* Contains 2 classes that both use an atomic mutation
* eoFlOrAllMutation applies the atom mutation to all components with given rate
@ -114,5 +118,6 @@ private:
eoMonOp<AtomType> & atomMutation; // the atom mutation
};
/** @} */
#endif

View file

@ -29,6 +29,10 @@
#include <eoFunctor.h>
#include <eoOp.h>
/** @addtogroup Variators
* @{
*/
/** Generic eoQuadOps on fixed length genotypes.
* Contains exchange crossovers (1pt and uniform)
* and crossovers that applies an Atom crossover
@ -209,5 +213,6 @@ public :
};
/** @} */
#endif

View file

@ -32,8 +32,9 @@
/** Abstract class for particle swarm optimization flight.
* All the flights must derivated from eoFlight.
*
* @ingroup Variators
*/
template < class POT > class eoFlight:public eoUF < POT &, void >
{
public:

View file

@ -29,6 +29,10 @@
#include <functional>
/** @ddtogroup Core
* @{
*/
/** Base class for functors to get a nice hierarchy diagram
That's actually quite an understatement as it does quite a bit more than
@ -173,5 +177,6 @@ eoFunctorBase::binary_function_tag functor_category(const eoBF<A1, A2, R>&)
return eoFunctorBase::binary_function_tag();
}
/** @} */
#endif

View file

@ -35,6 +35,8 @@ class eoFunctorBase;
eoFunctorStore is a class that stores functors that are allocated on the
heap. This class can be used in factories to store allocated memory for
dynamically created functors.
@ingroup Utilities
*/
class eoFunctorStore
{

View file

@ -44,8 +44,8 @@ eoG3Replacement is an eoReplacement:
- select best N of this merged population
- put them back into parent population
@ingroup Replacors
*/
template <class EOT>
class eoG3Replacement : public eoReplacement<EOT>
{

View file

@ -34,6 +34,8 @@
/**
* Update an inertia weight by assigning it a Gaussian randomized value
* (used for the velocity in particle swarm optimization).
*
* @ingroup Variators
*/
class eoGaussRealWeightUp:public eoWeightUpdater<double>
{

View file

@ -31,6 +31,8 @@
/**
Generational continuator: continues until a number of generations is reached
@ingroup Continuators
*/
template< class EOT>
class eoGenContinue: public eoContinue<EOT>, public eoValueParam<unsigned>

View file

@ -38,6 +38,9 @@ thanks to the friend class eoPopulator
@author Maarten Keijzer
@version 0.0
@ingroup Core
@ingroup Variators
*/
//@{

View file

@ -41,6 +41,8 @@
/**
Base class for breeders using generalized operators.
@ingroup Combination
*/
template<class EOT>
class eoGeneralBreeder: public eoBreed<EOT>