Trait compacts::bits::Rank [] [src]

pub trait Rank<T> {
    fn rank1(&self, i: T) -> T;

    fn rank0(&self, i: T) -> T
    where
        T: Sub<Output = T> + Copy
, { ... } }

Rank is a generalization of PopCount.

Required Methods

Returns occurences of non-zero bit in [0, i). rank1(i) should be equal to i - self.rank0(i).

Provided Methods

Returns occurences of zero bit in [0, i). rank0(i) should be equal to i - self.rank1(i).

Implementations on Foreign Types

impl Rank<u32> for u64
[src]

[src]

[src]

Implementors