add tests interfaces as examples in the doc ; remove unused test binaries ; some code formating
This commit is contained in:
parent
c4c27907ed
commit
bd236ee67f
54 changed files with 129 additions and 1410 deletions
|
|
@ -628,7 +628,7 @@ EXCLUDE_SYMBOLS =
|
|||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/test
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
|
|
|
|||
|
|
@ -60,4 +60,3 @@ article in Lecture Notes In Computer Science, 2310, Selected Papers from the 5th
|
|||
- http://eodev.sourceforge.net/eo/doc/LeCreusot.pdf
|
||||
- http://eodev.sourceforge.net/eo/doc/EO_EA2001.pdf
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
@ref Operators that effectively modify EO objects must invalidate them.
|
||||
|
||||
The fitness object must have, besides an void ctor, a copy ctor.
|
||||
|
||||
@example t-eo.cpp
|
||||
*/
|
||||
template<class F = double> class EO: public eoObject, public eoPersistent
|
||||
{
|
||||
|
|
|
|||
|
|
@ -307,5 +307,7 @@ eoAlgo<EOT> & do_make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc
|
|||
// that's it!
|
||||
return *algo;
|
||||
}
|
||||
/** @example t-eoGA.cpp
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -273,9 +273,11 @@ template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
|||
// Friend classes
|
||||
friend class eoIslandsEasyEA <EOT> ;
|
||||
friend class eoDistEvalEasyEA <EOT> ;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
};
|
||||
/**
|
||||
@example t-eoEasyEA.cpp
|
||||
Example of a test program building an EA algorithm.
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -188,6 +188,9 @@ protected:
|
|||
}dummyInit;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @example t-eoEasyPSO.cpp
|
||||
* Example of a test program building a PSO algorithm.
|
||||
*/
|
||||
|
||||
#endif /*_EOEASYPSO_H*/
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/** Extended velocity performer for particle swarm optimization. Derivated from abstract eoVelocity,
|
||||
/** Extended velocity performer for particle swarm optimization.
|
||||
*
|
||||
* Derivated from abstract eoVelocity,
|
||||
* 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.
|
||||
|
|
@ -60,7 +62,7 @@ public:
|
|||
* @param _c3 - Learning factor used for the global best
|
||||
* @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities.
|
||||
* If the velocities are not real, they won't be bounded by default. Should have a eoBounds ?
|
||||
* @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only).
|
||||
* @param _bndsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only).
|
||||
* @param _gen - The eo random generator, default=rng
|
||||
*/
|
||||
eoExtendedVelocity (eoTopology < POT > & _topology,
|
||||
|
|
@ -204,7 +206,9 @@ protected:
|
|||
// If the bound modifier doesn't need to be used, use the dummy instance
|
||||
eoDummyRealBoundModifier dummyModifier;
|
||||
};
|
||||
|
||||
|
||||
/** @todo this example does not appear in the doc for an unknown reason
|
||||
* @example t-eoExtendedVelocity.cpp
|
||||
* Example of a test program using this class:
|
||||
*/
|
||||
#endif /*eoExtendedVelocity_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ public :
|
|||
/// tag to identify a binary function in compile time function selection @see functor_category
|
||||
struct binary_function_tag {};
|
||||
};
|
||||
/** @example t-eoFunctop.cpp
|
||||
*/
|
||||
|
||||
/**
|
||||
Basic Function. Derive from this class when defining
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@ class eoGenOp : public eoOp<EOT>, public eoUF<eoPopulator<EOT> &, void>
|
|||
*/
|
||||
virtual void apply(eoPopulator<EOT>& _pop) = 0;
|
||||
};
|
||||
/** @example t-eoGenOp.cpp
|
||||
*/
|
||||
|
||||
|
||||
/** Wrapper for eoMonOp */
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ class eoInitPermutation: public eoInit<EOT>
|
|||
unsigned startFrom;
|
||||
UF_random_generator<unsigned int> gen;
|
||||
};
|
||||
/** @example t-eoInitPermutation.cpp
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ template <class FitT> class eoInt: public eoVector<FitT, int>
|
|||
}
|
||||
|
||||
};
|
||||
/** @example t-eoInt.cpp
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -63,10 +63,16 @@ Variators are operators that modify individuals.
|
|||
|
||||
Selectors are operators that select a subset of a population.
|
||||
|
||||
Example:
|
||||
@include t-eoSelect.cpp
|
||||
|
||||
|
||||
@defgroup Replacors Replacement operators
|
||||
|
||||
Replacors are operators that replace a subset of a population by another set of individuals.
|
||||
|
||||
Here is an example with several replacement operators:
|
||||
@include t-eoReplacement.cpp
|
||||
*/
|
||||
|
||||
/** Abstract data types for EO operators.
|
||||
|
|
|
|||
|
|
@ -84,5 +84,7 @@ template<class Chrom> class eoOrderXover: public eoQuadOp<Chrom>
|
|||
}
|
||||
|
||||
};
|
||||
/** @example t-eoOrderXover.cpp
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,5 +81,7 @@ private :
|
|||
typedef std::vector<typename EOT::Fitness> FitVec;
|
||||
FitVec cumulative;
|
||||
};
|
||||
/** @example t-eoRoulette.cpp
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -188,5 +188,7 @@ protected:
|
|||
unsigned neighborhoodSize;
|
||||
bool isSetup;
|
||||
};
|
||||
/** @example t-eoRingTopology.cpp
|
||||
*/
|
||||
|
||||
#endif /*EORINGTOPOLOGY_H_*/
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ class eoScalarFitness
|
|||
private :
|
||||
ScalarType value;
|
||||
};
|
||||
/** @example t-eofitness.cpp
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
Typedefs for fitness comparison, Maximizing Fitness compares with less,
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ public:
|
|||
private:
|
||||
static std::vector<std::string> TermDescriptions;
|
||||
};
|
||||
/** @example t-eoFitnessAssembled.cpp
|
||||
*/
|
||||
|
||||
//! Implements fitness as std::vector, storing all values that might occur during fitness assembly
|
||||
/*! Properties:
|
||||
|
|
@ -237,6 +239,10 @@ public:
|
|||
bool operator>=(const eoScalarFitnessAssembled<ScalarType, Compare, FitnessTraits>& y ) const { return !(*this < y); }
|
||||
|
||||
};
|
||||
/**
|
||||
* @example t-eoFitnessAssembledEA.cpp
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
Typedefs for fitness comparison, Maximizing Fitness compares with less,
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ public:
|
|||
}
|
||||
|
||||
};
|
||||
/** @example t-eoSecondsElapsedContinue.cpp
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ class eoSelectOne : public eoUF<const eoPop<EOT>&, const EOT&>
|
|||
(void)_pop;
|
||||
}
|
||||
};
|
||||
/** @example t-eoSelectOne.cpp
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -53,5 +53,7 @@ public:
|
|||
private :
|
||||
eoSharing<EOT> sharing; // derived from eoPerf2Worth
|
||||
};
|
||||
/** @example t-eoSharing.cpp
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue