pub trait Radix {
    const RADIX_BITS: u32;

    fn radix_similarity(&self, other: &Self) -> u32;

    fn radix_distance(&self, other: &Self) -> u32 { ... }
}
Expand description

A number that can be compared using radix distance

Associated Constants

The value returned by radix_similarty if all bits are equal

Required methods

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

Opposite of radix_similarity. If radix_distance returns 0, then radix_similarity returns radix_bits and vice versa.

Implementations on Foreign Types

Implementors