OverSim
ProxKeyComparator< KeyPrefixMetric > Class Template Reference

#include <Comparator.h>

Inheritance diagram for ProxKeyComparator< KeyPrefixMetric >:
AbstractProxKeyComparator AccordionPRComparator KademliaPRComparator

Public Member Functions

 ProxKeyComparator (const OverlayKey &relativeKey, uint32_t bitsPerDigit=1)
 constructor
- Public Member Functions inherited from AbstractProxKeyComparator
virtual ~AbstractProxKeyComparator ()
virtual int compare (const ProxKey &lhs, const ProxKey &rhs) const =0
 indicates which of the two given prox/key-pairs is closer to the relative key

Protected Attributes

KeyPrefixMetric m
 indicates which metric to use for the key comparison
StdProxComparator pc
OverlayKey key
 the relative key to which distances are compared

Detailed Description

template<>
class ProxKeyComparator< KeyPrefixMetric >

Definition at line 343 of file Comparator.h.

Constructor & Destructor Documentation

ProxKeyComparator< KeyPrefixMetric >::ProxKeyComparator ( const OverlayKey relativeKey,
uint32_t  bitsPerDigit = 1 
)
inline

constructor

Definition at line 354 of file Comparator.h.

{
this->key = relativeKey;
m.setBitsPerDigit(bitsPerDigit);
}

Member Data Documentation

the relative key to which distances are compared

Definition at line 348 of file Comparator.h.

Referenced by KademliaPRComparator::compare(), and AccordionPRComparator::compare().

indicates which metric to use for the key comparison

Definition at line 346 of file Comparator.h.

Referenced by KademliaPRComparator::compare(), and AccordionPRComparator::compare().


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