OverSim
|
OverlayKey prefix metric. More...
#include <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 (uint8_t bitsPerDigit) |
Private Attributes | |
uint8_t | bitsPerDigit |
OverlayKey prefix metric.
Definition at line 180 of file Comparator.h.
|
inline |
Definition at line 183 of file Comparator.h.
|
inline |
calculates the distance from x to y with the prefix metric
x | origination key |
y | destination key |
Definition at line 195 of file Comparator.h.
Referenced by KademliaPRComparator::compare(), AccordionPRComparator::compare(), Kademlia::distance(), BasePastry::distance(), and Kademlia::findNode().
|
inline |
Definition at line 202 of file Comparator.h.
|
private |
Definition at line 208 of file Comparator.h.
Referenced by distance(), KeyPrefixMetric(), and setBitsPerDigit().