diff --git a/eo/src/eoScalarFitnessAssembled.h b/eo/src/eoScalarFitnessAssembled.h index 64fc674d..522dc973 100644 --- a/eo/src/eoScalarFitnessAssembled.h +++ b/eo/src/eoScalarFitnessAssembled.h @@ -84,7 +84,7 @@ private: with this quantity as if it were a ScalarType. - Global fitness value is stored as first element in the vector */ -template +template class eoScalarFitnessAssembled : public std::vector { public: @@ -176,13 +176,13 @@ public: } // implementation of the other operators - bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } + bool operator>( const eoScalarFitnessAssembled& y ) const { return y < *this; } // implementation of the other operators - bool operator<=( const eoScalarFitnessAssembled& y ) const { return !(*this > y); } + bool operator<=( const eoScalarFitnessAssembled& y ) const { return !(*this > y); } // implementation of the other operators - bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } + bool operator>=(const eoScalarFitnessAssembled& y ) const { return !(*this < y); } }; @@ -192,19 +192,19 @@ and minimizing fitness compares with greater. This because we want ordinary fitness values (doubles) to be equivalent with Maximizing Fitness, and comparing with less is the default behaviour. */ -typedef eoScalarFitnessAssembled > eoAssembledMaximizingFitness; -typedef eoScalarFitnessAssembled > eoAssembledMinimizingFitness; +typedef eoScalarFitnessAssembled, eoScalarFitnessAssembledTraits > eoAssembledMaximizingFitness; +typedef eoScalarFitnessAssembled, eoScalarFitnessAssembledTraits > eoAssembledMinimizingFitness; -template -std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled& f) +template +std::ostream& operator<<(std::ostream& os, const eoScalarFitnessAssembled& f) { for (unsigned i=0; i < f.size(); ++i) os << f[i] << " "; return os; } -template -std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled& f) +template +std::istream& operator>>(std::istream& is, eoScalarFitnessAssembled& f) { for (unsigned i=0; i < f.size(); ++i){ F value;