Standard comparer (valid as a static comparer). More...
#include <ogdf/basic/comparer.h>
Static Public Member Functions | |
static bool | equal (const E &x, const E &y) |
static bool | geq (const E &x, const E &y) |
static bool | greater (const E &x, const E &y) |
static bool | leq (const E &x, const E &y) |
static bool | less (const E &x, const E &y) |
Standard comparer (valid as a static comparer).
Standard comparers are used by some sorting and searching methods. The implementation of the generic class only provides dummies that always throw a NoStdComparerException.
The compare operations are static, hence the StdComparer cannot only be used as a comparer object, but also as a static comparer when required.
You need to specialize this class for types you want to use with sorting and searching methods like quicksort and binary search. There already exist specializations for several standard types. If your type already provides compare operators, you can use the macro OGDF_STD_COMPARER to automatically generate the specialization based on these operators.
Definition at line 59 of file comparer.h.
|
inlinestatic |
Definition at line 69 of file comparer.h.
|
inlinestatic |
Definition at line 67 of file comparer.h.
|
inlinestatic |
Definition at line 65 of file comparer.h.
|
inlinestatic |
Definition at line 63 of file comparer.h.
|
inlinestatic |
Definition at line 61 of file comparer.h.