PaGMO
1.1.5
|
Fitness vector comparator class. More...
#include <base.h>
Public Member Functions | |
fitness_vector_cmp (int dim, char cmp_type) | |
Constructor of the comparator object. More... | |
bool | operator() (const fitness_vector &lhs, const fitness_vector &rhs) |
Overloaded operator() More... | |
Fitness vector comparator class.
This is a helper class that allows for the generation of comparator objects. Many hypervolume algorithms use comparator functions for sorting, or data structures handling. In most cases the difference between the comparator functions differ either by the dimension number, or the inequality sign ('>' or '<'). We provide a general comparator class for that purpose.
Definition at line 167 of file util/hv_algorithm/base.h.
pagmo::util::hv_algorithm::fitness_vector_cmp::fitness_vector_cmp | ( | int | dim, |
char | cmp_type | ||
) |
Constructor of the comparator object.
Create a comparator object, that compares items by given dimension, according to given inequality function.
[in] | dim | dimension index by which we compare the fitness vectors |
[in] | cmp_type | inequality expression used for comparison, either character '<' or '>' |
Definition at line 350 of file util/hv_algorithm/base.cpp.
|
inline |
Overloaded operator()
Overloading call operator is required for all sorting and data structure key comparators in stl library.
[in] | lhs | fitness_vector on the left hand side |
[in] | rhs | fitness_vector on the right hand side |
Definition at line 181 of file util/hv_algorithm/base.h.