Chenges to EO
This commit is contained in:
parent
6e9ddda69c
commit
2cafee6bc6
2 changed files with 9 additions and 3 deletions
|
|
@ -74,6 +74,11 @@ public:
|
||||||
*/
|
*/
|
||||||
bool invalid() const { return invalidFitness; }
|
bool invalid() const { return invalidFitness; }
|
||||||
|
|
||||||
|
/** Returns true if
|
||||||
|
@return true if the fitness is higher
|
||||||
|
*/
|
||||||
|
bool operator<(const EO& _eo2) { return fitness() < _eo2.fitness();}
|
||||||
|
|
||||||
/// Methods inherited from eoObject
|
/// Methods inherited from eoObject
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|
@ -112,9 +117,9 @@ private:
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
template<class T> bool operator<(const EO<T>& eo1, const EO<T>& eo2)
|
template<class T> bool operator<(const EO<T>& _eo1, const EO<T>& _eo2)
|
||||||
{
|
{
|
||||||
return eo1.fitness() < eo2.fitness();
|
return _eo1.fitness() < _eo2.fitness();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
lib_LTLIBRARIES = libeo.la
|
lib_LTLIBRARIES = libeo.la
|
||||||
libeo_la_SOURCES = eoObject.cpp eoPersistent.cpp eoPrintable.cpp
|
libeo_la_SOURCES =
|
||||||
|
libeo_la_SOURCES = eoPersistent.cpp eoPrint eoPersistent.cpp eoPrintable.cpp
|
||||||
libeoincdir = $(includedir)/eo
|
libeoincdir = $(includedir)/eo
|
||||||
libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h
|
libeoinc_HEADERS = eo EO.h eoDup.h eoMultiMonOp.h eoPop.h eoUniform.h eoESChrom.h eoNegExp.h eoProblem.h eoVector.h eoFitness.h eoNormal.h eoRnd.h eoXOver2.h eo1d.h eoID.h eoObject.h eoString.h eoAged.h eoKill.h eoOp.h eoTranspose.h eoBin.h
|
||||||
|
|
|
||||||
Reference in a new issue