#include <Comparator.h>
Definition at line 156 of file Comparator.h.
Public Member Functions | |
| KeyPrefixMetric () | |
| OverlayKey | distance (const OverlayKey &x, const OverlayKey &y) const |
| calculates the distance from x to y with the prefix metric | |
| void | setBitsPerDigit (uint32_t bitsPerDigit) |
Private Attributes | |
| uint32_t | bitsPerDigit |
| KeyPrefixMetric::KeyPrefixMetric | ( | ) | [inline] |
| OverlayKey KeyPrefixMetric::distance | ( | const OverlayKey & | x, | |
| const OverlayKey & | y | |||
| ) | const [inline] |
calculates the distance from x to y with the prefix metric
| x | origination key | |
| y | destination key |
Definition at line 171 of file Comparator.h.
00173 { 00174 return OverlayKey::getLength() / bitsPerDigit 00175 - x.sharedPrefixLength(y, bitsPerDigit); 00176 }
| void KeyPrefixMetric::setBitsPerDigit | ( | uint32_t | bitsPerDigit | ) | [inline] |
Definition at line 178 of file Comparator.h.
00179 { 00180 this->bitsPerDigit = bitsPerDigit; 00181 }
uint32_t KeyPrefixMetric::bitsPerDigit [private] |
1.5.5