OverSim
|
OverlayKey distance comparator. More...
#include <Comparator.h>
Public Member Functions | |
KeyDistanceComparator (const OverlayKey &relativeKey) | |
constructor | |
int | compare (const OverlayKey &lhs, const OverlayKey &rhs) const |
indicates which of the two given keys is closer to the relative key | |
Public Member Functions inherited from Comparator< OverlayKey > | |
virtual | ~Comparator () |
virtual destructor |
Private Attributes | |
Metric | m |
indicates which metric to use for the comparison | |
OverlayKey | key |
the relative key to which distances are compared |
OverlayKey distance comparator.
Definition at line 215 of file Comparator.h.
|
inline |
|
inlinevirtual |
indicates which of the two given keys is closer to the relative key
lhs | first key |
rhs | second key |
Reimplemented from Comparator< OverlayKey >.
Definition at line 239 of file Comparator.h.
|
private |
the relative key to which distances are compared
Definition at line 219 of file Comparator.h.
Referenced by KeyDistanceComparator< KeyXorMetric >::compare(), KeyDistanceComparator< KeyPrefixMetric >::compare(), KeyDistanceComparator< KeyXorMetric >::KeyDistanceComparator(), and KeyDistanceComparator< KeyPrefixMetric >::KeyDistanceComparator().
|
private |
indicates which metric to use for the comparison
Definition at line 218 of file Comparator.h.
Referenced by KeyDistanceComparator< KeyXorMetric >::compare(), KeyDistanceComparator< KeyPrefixMetric >::compare(), and KeyDistanceComparator< KeyPrefixMetric >::KeyDistanceComparator().