#include <Comparator.h>
Public Member Functions | |
| OverlayKey | distance (const OverlayKey &x, const OverlayKey &y) const |
| calculates the distance from x to y on a bidirectional ring | |
Definition at line 111 of file Comparator.h.
| OverlayKey KeyRingMetric::distance | ( | const OverlayKey & | x, | |
| const OverlayKey & | y | |||
| ) | const [inline] |
calculates the distance from x to y on a bidirectional ring
| x | origination key | |
| y | destination key |
Definition at line 121 of file Comparator.h.
00123 { 00124 OverlayKey dist1(x - y); 00125 OverlayKey dist2(y - x); 00126 00127 if (dist1 > dist2) 00128 return dist2; 00129 else 00130 return dist1; 00131 }
1.5.8