OverSim
KeyCwRingMetric Class Reference

OverlayKey Clockwise Unidirectional Ring Metric. More...

#include <Comparator.h>

Public Member Functions

OverlayKey distance (const OverlayKey &x, const OverlayKey &y) const
 calculates the distance from x to y on a clockwise unidirectional ring

Detailed Description

OverlayKey Clockwise Unidirectional Ring Metric.

Definition at line 138 of file Comparator.h.

Member Function Documentation

OverlayKey KeyCwRingMetric::distance ( const OverlayKey x,
const OverlayKey y 
) const
inline

calculates the distance from x to y on a clockwise unidirectional ring

Parameters
xorigination key
ydestination key
Returns
distance from x to y on a unidirectional ring

Definition at line 148 of file Comparator.h.

Referenced by oversim::Chord::distance(), and OverlayKey::test().

{
return y-x;
}

The documentation for this class was generated from the following file: