Trait radix_heap::Radix
[−]
[src]
pub trait Radix { const RADIX_BITS: u32; fn radix_similarity(&self, other: &Self) -> u32; fn radix_distance(&self, other: &Self) -> u32 { ... } }
A number that can be compared using radix distance
Associated Constants
const RADIX_BITS: u32
The value returned by radix_similarty
if all bits are equal
Required Methods
fn radix_similarity(&self, other: &Self) -> u32
The number of high bits in a row that this and other
has in common
Eg. the radix similarity of 001001 and 000001 is 2 because they share the 2 high bits.
Provided Methods
fn radix_distance(&self, other: &Self) -> u32
Opposite of radix_similarity
. If radix_distance
returns 0, then radix_similarity
returns radix_bits
and vice versa.