32 #ifndef HYPERVOLUME_APPROXIMATOR_H 33 #define HYPERVOLUME_APPROXIMATOR_H 54 template<
typename Archive>
55 void serialize( Archive & archive,
const unsigned int version ) {
56 archive & BOOST_SERIALIZATION_NVP(m_epsilon);
57 archive & BOOST_SERIALIZATION_NVP(m_delta);
79 template<
typename Set,
typename VectorType >
81 std::size_t noPoints = points.size();
87 boost::uint_fast64_t maxSamples=
static_cast<boost::uint_fast64_t
>( 12. * std::log( 1. /
delta() ) / std::log( 2. ) * noPoints/
sqr(
epsilon()) );
91 for( std::size_t p = 0; p != noPoints; ++p) {
94 min(refPoint - points[p] ) >= 0,
95 "HyperVolumeApproximator: points must be better than reference point" 98 vol[p] = std::exp(sum(log(refPoint[ 0 ] - points[p] )));
101 double totalVolume = sum(vol);
104 boost::uint_fast64_t samples_sofar=0;
105 boost::uint_fast64_t round=0;
116 for( std::size_t i = 0; i < rndpoint.size(); i++ ){
122 if (samples_sofar>=maxSamples)
return maxSamples * totalVolume / noPoints / round;
140 #endif // HYPERVOLUME_APPROXIMATOR_H