31 #ifndef SHARK_ALGORITHMS_DIRECT_SEARCH_INDICATORS_INVERTED_GENERATIONAL_DISTANCE_H 32 #define SHARK_ALGORITHMS_DIRECT_SEARCH_INDICATORS_INVERTED_GENERATIONAL_DISTANCE_H 49 typename IteratorTypeA,
50 typename IteratorTypeB
52 double operator()( IteratorTypeA itPF, IteratorTypeA itePF, IteratorTypeB itRF, IteratorTypeB iteRF )
55 std::size_t noObjectives = e(*ita).size();
56 for( IteratorTypeA ita = itPF; ita != itePF; ++ita ) {
60 for( IteratorTypeB itb = itRF; itb != iteRF; ++itb ) {
63 for(
unsigned int i = 0; i < noObjectives; i++ ) {
64 sum +=
sqr( e(*itb)[i] - e(*ita)[i] );
71 return std::sqrt( result ) / noObjectives;
75 template<
typename Extractor,
typename ParetofrontType>
78 std::vector<double> relativeApproximation(front.size());
80 relativeApproximation[i] = (*this)( front.begin()+i,front.begin()+(i+1), front.begin(), front.end(), extractor );
83 return std::min_element( relativeApproximation.begin(), relativeApproximation.end() ) - relativeApproximation.begin();
91 template<
typename Extractor,
typename Po
intSet>
97 template<
typename Archive>
98 void serialize( Archive & archive,
const unsigned int version ) {