25 #ifndef PAGMO_UTIL_HV_ALGORITHM_BF_APPROX_H
26 #define PAGMO_UTIL_HV_ALGORITHM_BF_APPROX_H
33 #include "../../rng.h"
37 #include "../hypervolume.h"
39 namespace pagmo {
namespace util {
namespace hv_algorithm {
53 bf_approx(
const bool use_exact =
true,
const unsigned int trivial_subcase_size = 1,
const double eps = 1e-2,
const double delta = 1e-6,
const double delta_multiplier = 0.775,
const double m_alpha = 0.2,
const double initial_delta_coeff = 0.1,
const double gamma = 0.25);
54 double compute(std::vector<fitness_vector> &,
const fitness_vector &)
const;
55 unsigned int least_contributor(std::vector<fitness_vector> &,
const fitness_vector &)
const;
56 unsigned int greatest_contributor(std::vector<fitness_vector> &,
const fitness_vector &)
const;
57 void verify_before_compute(
const std::vector<fitness_vector> &,
const fitness_vector &)
const;
59 std::string get_name()
const;
62 inline double compute_point_delta(
const unsigned int,
const unsigned int,
const double)
const;
65 inline void sampling_round(
const std::vector<fitness_vector>&,
const double,
const unsigned int,
const unsigned int,
const double)
const;
66 inline bool sample_successful(
const std::vector<fitness_vector> &,
const unsigned int)
const;
68 enum extreme_contrib_type {
73 unsigned int approx_extreme_contributor(std::vector<fitness_vector> &points,
const fitness_vector &r_point, extreme_contrib_type,
bool (*cmp_func)(
double,
double),
74 bool (*erase_condition)(
unsigned int,
unsigned int, std::vector<double> &, std::vector<double> &),
double (*end_condition)(
unsigned int,
unsigned int, std::vector<double> &, std::vector<double> &))
const;
76 static double lc_end_condition(
unsigned int,
unsigned int, std::vector<double>&, std::vector<double>&);
77 static double gc_end_condition(
unsigned int,
unsigned int, std::vector<double>&, std::vector<double>&);
78 static bool lc_erase_condition(
unsigned int,
unsigned int, std::vector<double>&, std::vector<double>&);
79 static bool gc_erase_condition(
unsigned int,
unsigned int, std::vector<double>&, std::vector<double>&);
82 const bool m_use_exact;
86 const unsigned int m_trivial_subcase_size;
95 const double m_delta_multiplier;
101 const double m_initial_delta_coeff;
104 const double m_gamma;
115 mutable std::vector<unsigned long long> m_no_ops;
118 mutable std::vector<unsigned long long> m_no_samples;
121 mutable std::vector<unsigned long long> m_no_succ_samples;
124 mutable std::vector<unsigned int> m_point_set;
127 mutable std::vector<double> m_box_volume;
130 mutable std::vector<double> m_approx_volume;
133 mutable std::vector<double> m_point_delta;
136 mutable std::vector<fitness_vector> m_boxes;
140 mutable std::vector<std::vector<unsigned int> > m_box_points;
145 friend class boost::serialization::access;
146 template <
class Archive>
147 void serialize(Archive &ar,
const unsigned int)
149 ar & boost::serialization::base_object<base>(*this);
150 ar &
const_cast<bool &
>(m_use_exact);
151 ar &
const_cast<unsigned int &
>(m_trivial_subcase_size);
152 ar &
const_cast<double &
>(m_eps);
153 ar &
const_cast<double &
>(m_delta);
154 ar &
const_cast<double &
>(m_delta_multiplier);
155 ar &
const_cast<double &
>(m_alpha);
156 ar &
const_cast<double &
>(m_initial_delta_coeff);
157 ar &
const_cast<double &
>(m_gamma);
Bringmann-Friedrich approximation method.
std::vector< double > fitness_vector
Fitness vector type.
boost::shared_ptr< base > base_ptr
Base hypervolume algorithm class.
This rng returns a double in the [0,1[ range.