// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // moeoNormalizedDistance.h // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007 /* This library... Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr */ //----------------------------------------------------------------------------- #ifndef MOEONORMALIZEDDISTANCE_H_ #define MOEONORMALIZEDDISTANCE_H_ #include #include #include /** * The base class for double distance computation with normalized objective values (i.e. between 0 and 1). */ template < class MOEOT , class Type = double > class moeoNormalizedDistance : public moeoDistance < MOEOT , Type > { public: /** the objective vector type of the solutions */ typedef typename MOEOT::ObjectiveVector ObjectiveVector; /** * Default ctr */ moeoNormalizedDistance() { bounds.resize(ObjectiveVector::Traits::nObjectives()); // initialize bounds in case someone does not want to use them for (unsigned int i=0; i & _pop) { double min, max; for (unsigned int i=0; i bounds; }; #endif /*MOEONORMALIZEDDISTANCE_H_*/