diff --git a/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeUnaryMetric.h b/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeUnaryMetric.h index 74e43a50c..74d57475e 100644 --- a/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeUnaryMetric.h +++ b/trunk/paradiseo-moeo/src/metric/moeoHyperVolumeUnaryMetric.h @@ -51,10 +51,11 @@ class moeoHyperVolumeUnaryMetric : public moeoVectorUnaryMetric < ObjectiveVecto public: /** - * Default Construtcor + * Constructor with a coefficient (rho) * @param _normalize allow to normalize data (default true) + * @param _rho coefficient to determine the reference point. */ - moeoHyperVolumeUnaryMetric(bool _normalize=true, double _rho=1.1): normalize(_normalize), rho(_rho){ + moeoHyperVolumeUnaryMetric(bool _normalize=true, double _rho=1.1): normalize(_normalize), rho(_rho), ref_point(NULL){ bounds.resize(ObjectiveVector::Traits::nObjectives()); // initialize bounds in case someone does not want to use them for (unsigned int i=0; i & _set) { - return 0.0; + std::vector < std::vector > front; + + //determine the reference point if a coefficient is passed in paremeter + if(rho >= 1.0){ + //determine bounds + setup(_set); + //determine reference point + for (unsigned int i=0; i getBounds(){ @@ -277,6 +334,8 @@ class moeoHyperVolumeUnaryMetric : public moeoVectorUnaryMetric < ObjectiveVecto /*vectors contains bounds for normalization*/ std::vector < eoRealInterval > bounds; + ObjectiveVector ref_point; +