PaGMO  1.1.5
Public Member Functions
pagmo::util::hv_algorithm::fitness_vector_cmp Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
[in]dimdimension index by which we compare the fitness vectors
[in]cmp_typeinequality expression used for comparison, either character '<' or '>'

Definition at line 350 of file util/hv_algorithm/base.cpp.

Member Function Documentation

bool pagmo::util::hv_algorithm::fitness_vector_cmp::operator() ( const fitness_vector lhs,
const fitness_vector rhs 
)
inline

Overloaded operator()

Overloading call operator is required for all sorting and data structure key comparators in stl library.

Parameters
[in]lhsfitness_vector on the left hand side
[in]rhsfitness_vector on the right hand side
Returns
Boolean variable stating whether given expression is true for fitness_vectors.

Definition at line 181 of file util/hv_algorithm/base.h.


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