git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1339 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
jhumeau 2009-01-16 10:13:58 +00:00
commit d4cb185f79

View file

@ -197,10 +197,15 @@ class moeoHyperVolumeMetric : public moeoVectorUnaryMetric < ObjectiveVector , d
* @param _j index of the second element to swap * @param _j index of the second element to swap
*/ */
void swap(std::vector< std::vector<double> >& _front, unsigned int _i, unsigned int _j){ void swap(std::vector< std::vector<double> >& _front, unsigned int _i, unsigned int _j){
_front.push_back(_front[_i]); std::vector<double> _tmp;
_tmp= _front[_i];
_front[_i]= _front[_j]; _front[_i]= _front[_j];
_front[_j]=_front.back(); _front[_j]=_tmp;
_front.pop_back();
//other way which don't work on windows
//_front.push_back(_front[_i]);
//front.back();
//_front.pop_back();
} }
@ -347,6 +352,8 @@ class moeoHyperVolumeMetric : public moeoVectorUnaryMetric < ObjectiveVector , d
/*vectors contains bounds for normalization*/ /*vectors contains bounds for normalization*/
std::vector < eoRealInterval > bounds; std::vector < eoRealInterval > bounds;
}; };
#endif /*MOEOHYPERVOLUMEMETRIC_H_*/ #endif /*MOEOHYPERVOLUMEMETRIC_H_*/