28 namespace pagmo {
namespace util {
namespace hv_algorithm {
40 double* data =
new double[points.size() * 4];
42 for (
unsigned int d_idx = 0 ; d_idx < 4 ; ++d_idx) {
43 refpoint[d_idx] = r_point[d_idx];
45 unsigned int data_idx = 0;
46 for (
unsigned int p_idx = 0 ; p_idx < points.size() ; ++p_idx) {
47 for (
unsigned int d_idx = 0 ; d_idx < 4 ; ++d_idx) {
48 data[data_idx++] = points[p_idx][d_idx];
52 double hv = guerreiro_hv4d(data, points.size(), refpoint);
68 if (r_point.size() != 4) {
69 pagmo_throw(value_error,
"Algorithm HV4D works only for 4-dimensional cases");
83 return "Four-dimensional hypervolume by Andreia P. Guerreiro";
double compute(std::vector< fitness_vector > &, const fitness_vector &) const
Compute hypervolume.
void assert_minimisation(const std::vector< fitness_vector > &, const fitness_vector &) const
Assert that reference point dominates every other point from the set.
hv4d hypervolume algorithm
std::string get_name() const
Algorithm name.
std::vector< double > fitness_vector
Fitness vector type.
boost::shared_ptr< base > base_ptr
Base hypervolume algorithm class.
void verify_before_compute(const std::vector< fitness_vector > &, const fitness_vector &) const
Verify before compute.
base_ptr clone() const
Clone method.