Compare elements based on a single comparable attribute. More...
#include <ogdf/basic/comparer.h>
Public Types | |
| using | OrderFunction = std::function< NUM(const ELEM &)> |
Public Member Functions | |
| GenericComparer (const OrderFunction &mapToValue) | |
Construct a comparer with mapping mapToValue. | |
| int | compare (const ELEM &x, const ELEM &y) const |
See OGDF_AUGMENT_COMPARER. | |
Private Attributes | |
| const OrderFunction | m_mapToValue |
Compare elements based on a single comparable attribute.
Defines a non-static OGDF comparer (see macro OGDF_AUGMENT_COMPARER) that compares values of type NUM to compare elements of type ELEM.
One must provide a function that maps each element to its value.
Definition at line 402 of file comparer.h.
| using ogdf::GenericComparer< ELEM, NUM, ascending >::OrderFunction = std::function<NUM(const ELEM&)> |
Definition at line 403 of file comparer.h.
|
inline |
Construct a comparer with mapping mapToValue.
Definition at line 406 of file comparer.h.
|
inline |
See OGDF_AUGMENT_COMPARER.
Definition at line 409 of file comparer.h.
|
private |
Definition at line 419 of file comparer.h.