FID

Trait FID 

Source
pub trait FID {
    // Required method
    fn len(&self) -> u64;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn rank(&self, b: bool, i: u64) -> u64 { ... }
    fn rank0(&self, i: u64) -> u64 { ... }
    fn rank1(&self, i: u64) -> u64 { ... }
    fn select(&self, b: bool, r: u64) -> u64 { ... }
    fn select0(&self, r: u64) -> u64 { ... }
    fn select1(&self, r: u64) -> u64 { ... }
    fn get(&self, i: u64) -> bool { ... }
}
Expand description

A type that supports rank and support operations.

Required Methods§

Source

fn len(&self) -> u64

Returns the total number of bits.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the structure is empty.

Source

fn rank(&self, b: bool, i: u64) -> u64

Compute the number of bits in [0..i).

Source

fn rank0(&self, i: u64) -> u64

Compute the number of 0s in [0..i).

Source

fn rank1(&self, i: u64) -> u64

Compute the number of 0s in [0..i).

Source

fn select(&self, b: bool, r: u64) -> u64

Locate the position of the (r + 1)-th bit.

Source

fn select0(&self, r: u64) -> u64

Locate the position of the (r + 1)-th 0.

Source

fn select1(&self, r: u64) -> u64

Locate the position of the (r + 1)-th 1.

Source

fn get(&self, i: u64) -> bool

Returns the i-th bit.

Implementors§