32 #ifndef SHARK_ALGORITHMS_DIRECTSEARCH_HYPERVOLUMEINDICATOR_H 33 #define SHARK_ALGORITHMS_DIRECTSEARCH_HYPERVOLUMEINDICATOR_H 58 template<
typename Extractor,
typename ParetoFrontType,
typename VectorType>
59 double operator()( Extractor
const& extractor, ParetoFrontType
const& front,
VectorType const& referencePoint) {
61 if(front.empty())
return 0;
63 return (
m_hv( extractor, front, referencePoint) );
74 template<
typename Extractor,
typename ParetoFrontType>
75 double operator()( Extractor
const& extractor, ParetoFrontType
const& front) {
86 template<
typename Extractor,
typename ParetoFrontType,
typename VectorType>
89 std::vector<double> indicatorValues( front.size() );
94 ParetoFrontType copy( front );
95 copy.erase( copy.begin() + i );
97 indicatorValues[i] = ind( extractor, copy,referencePoint);
98 std::cout<<i<<
" "<<indicatorValues[i]<<std::endl;
101 std::vector<double>::iterator it = std::max_element( indicatorValues.begin(), indicatorValues.end() );
114 template<
typename Extractor,
typename ParetoFrontType>
126 template<
typename Extractor,
typename Po
intSet>
129 if(
set.empty())
return;
132 std::size_t noObjectives = extractor(
set[0]).size();
136 for(
unsigned int i = 0; i <
set.size(); i++ )
148 template<
typename Archive>
149 void serialize( Archive & archive,
const unsigned int version ) {
150 archive & BOOST_SERIALIZATION_NVP(
m_hv );