#include <Comparator.h>
Public Member Functions | |
KeyDistanceComparator (const OverlayKey &relativeKey, uint bitsPerDigit=1) | |
constructor | |
int | compare (const OverlayKey &lhs, const OverlayKey &rhs) const |
indicates which of the two given keys has a longer distance to the relative key | |
Private Attributes | |
KeyPrefixMetric | m |
indicates which metric to use for the comparison | |
OverlayKey | key |
the relative key to which distances are compared |
KeyDistanceComparator< KeyPrefixMetric >::KeyDistanceComparator | ( | const OverlayKey & | relativeKey, | |
uint | bitsPerDigit = 1 | |||
) | [inline] |
int KeyDistanceComparator< KeyPrefixMetric >::compare | ( | const OverlayKey & | lhs, | |
const OverlayKey & | rhs | |||
) | const [inline, virtual] |
indicates which of the two given keys has a longer distance to the relative key
lhs | first key | |
rhs | second key |
Reimplemented from Comparator< OverlayKey >.
KeyPrefixMetric KeyDistanceComparator< KeyPrefixMetric >::m [private] |
indicates which metric to use for the comparison
OverlayKey KeyDistanceComparator< KeyPrefixMetric >::key [private] |
the relative key to which distances are compared