PaGMO  1.1.5
Public Member Functions | Friends
pagmo::util::hv_algorithm::hv2d Class Reference

hv2d hypervolume algorithm class More...

#include <hv2d.h>

Inheritance diagram for pagmo::util::hv_algorithm::hv2d:
Inheritance graph
[legend]

Public Member Functions

 hv2d (const bool initial_sorting=true)
 Constructor.
 
double compute (std::vector< fitness_vector > &, const fitness_vector &) const
 Computes hypervolume method. More...
 
double compute (double **, unsigned int n_points, double *) const
 Compute hypervolume method. More...
 
std::vector< double > contributions (std::vector< fitness_vector > &, const fitness_vector &) const
 Contributions method. More...
 
void verify_before_compute (const std::vector< fitness_vector > &, const fitness_vector &) const
 Verify input method. More...
 
base_ptr clone () const
 Clone method.
 
std::string get_name () const
 Algorithm name.
 
- Public Member Functions inherited from pagmo::util::hv_algorithm::base
virtual double exclusive (const unsigned int, std::vector< fitness_vector > &, const fitness_vector &) const
 Exclusive hypervolume method. More...
 
virtual unsigned int least_contributor (std::vector< fitness_vector > &, const fitness_vector &) const
 Least contributor method. More...
 
virtual unsigned int greatest_contributor (std::vector< fitness_vector > &, const fitness_vector &) const
 Greatest contributor method. More...
 
virtual ~base ()
 Destructor required for pure virtual methods.
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Public Member Functions inherited from pagmo::util::hv_algorithm::base
static double volume_between (const fitness_vector &, const fitness_vector &, unsigned int=0)
 Compute volume between two points. More...
 
- Protected Types inherited from pagmo::util::hv_algorithm::base
enum  { DOM_CMP_B_DOMINATES_A = 1, DOM_CMP_A_DOMINATES_B = 2, DOM_CMP_A_B_EQUAL = 3, DOM_CMP_INCOMPARABLE = 4 }
 
- Protected Member Functions inherited from pagmo::util::hv_algorithm::base
void assert_minimisation (const std::vector< fitness_vector > &, const fitness_vector &) const
 Assert that reference point dominates every other point from the set. More...
 
virtual unsigned int extreme_contributor (std::vector< fitness_vector > &, const fitness_vector &, bool(*)(double, double)) const
 compute the extreme contributor More...
 
- Static Protected Member Functions inherited from pagmo::util::hv_algorithm::base
static bool cmp_least (const double, const double)
 Comparison method for the least contributor. More...
 
static bool cmp_greatest (const double, const double)
 Comparison method for the least contributor. More...
 
static double volume_between (double *, double *, unsigned int)
 Compute volume between two points. More...
 
static int dom_cmp (double *, double *, unsigned int)
 Dominance comparison method. More...
 
static int dom_cmp (const fitness_vector &, const fitness_vector &, unsigned int=0)
 Dominance comparison method. More...
 

Detailed Description

hv2d hypervolume algorithm class

This is the class containing the implementation of the hypervolume algorithm for the 2-dimensional fronts. This method achieves the lower bound of n*log(n) time by sorting the initial set of points and then computing the partial areas linearly.

Author
Krzysztof Nowak (kn@ki.nosp@m.ryx..nosp@m.net)

Definition at line 44 of file hv2d.h.

Member Function Documentation

double pagmo::util::hv_algorithm::hv2d::compute ( std::vector< fitness_vector > &  points,
const fitness_vector r_point 
) const
virtual

Computes hypervolume method.

This method should be used both as a solution to 2-dimensional cases, and as a general termination method for algorithms that reduce n-dimensional problem to 2D.

Computational complexity: n*log(n)

Parameters
[in]pointsvector of points containing the 2-dimensional points for which we compute the hypervolume
[in]r_pointreference point for the points
Returns
hypervolume

Implements pagmo::util::hv_algorithm::base.

Definition at line 45 of file hv2d.cpp.

double pagmo::util::hv_algorithm::hv2d::compute ( double **  points,
unsigned int  n_points,
double *  r_point 
) const

Compute hypervolume method.

This method should be used both as a solution to 2-dimensional cases, and as a general termination method for algorithms that reduce n-dimensional problem to 2d. This method is overloaded to work with arrays of double, in order to provide other algorithms that internally work with arrays (such as hv_algorithm::wfg) with an efficient computation.

Computational complexity: n*log(n)

Parameters
[in]pointsarray of 2-dimensional points
[in]n_pointsnumber of points
[in]r_point2-dimensional reference point for the points
Returns
hypervolume

Definition at line 92 of file hv2d.cpp.

std::vector< double > pagmo::util::hv_algorithm::hv2d::contributions ( std::vector< fitness_vector > &  points,
const fitness_vector r_point 
) const
virtual

Contributions method.

Computes the contributions of each point by invoking the HV3D algorithm with mock third dimension.

Parameters
[in]pointsvector of points containing the 2-dimensional points for which we compute the hypervolume
[in]r_pointreference point for the points
Returns
vector of exclusive contributions by every point

Reimplemented from pagmo::util::hv_algorithm::base.

Definition at line 126 of file hv2d.cpp.

void pagmo::util::hv_algorithm::hv2d::verify_before_compute ( const std::vector< fitness_vector > &  points,
const fitness_vector r_point 
) const
virtual

Verify input method.

Verifies whether the requested data suits the hv2d algorithm.

Parameters
[in]pointsvector of points containing the d dimensional points for which we compute the hypervolume
[in]r_pointreference point for the vector of points
Exceptions
value_errorwhen trying to compute the hypervolume for the dimension other than 3 or non-maximal reference point

Implements pagmo::util::hv_algorithm::base.

Definition at line 172 of file hv2d.cpp.


The documentation for this class was generated from the following files: