From be87159dc040fa57a7dc03c72bdd6351299d39f3 Mon Sep 17 00:00:00 2001 From: Caner Candan Date: Thu, 12 May 2011 10:15:18 +0200 Subject: [PATCH] * eoDualFitness: overrided the operator equal in order to compare equality between two dual fitness --- eo/src/eoDualFitness.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eo/src/eoDualFitness.h b/eo/src/eoDualFitness.h index 4803361f..3b7fda0d 100644 --- a/eo/src/eoDualFitness.h +++ b/eo/src/eoDualFitness.h @@ -132,7 +132,6 @@ public: return *this; } - //! Comparison that separate feasible individuals from unfeasible ones. Feasible are always better /*! * Use less as a default comparison operator @@ -160,14 +159,16 @@ public: } //! Greater: if the other is lesser than me - bool operator>( const eoDualFitness& other ) const { return other < *this; } + bool operator>( const eoDualFitness& other ) const { return other < *this; } //! Less or equal: if the other is not lesser than me - bool operator<=( const eoDualFitness& other ) const { return !(other < *this); } + bool operator<=( const eoDualFitness& other ) const { return !(other < *this); } //! Greater or equal: if the other is not greater than me - bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + bool operator>=(const eoDualFitness& other ) const { return !(*this < other); } + //! Equal: if the other is equal to me + bool operator==(const eoDualFitness& other) const { return ( _is_feasible == other._is_feasible ) && ( _value == other._value ); } public: