quadrank 0.2.0

Fast rank over binary and size-4 DNA alphabets.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::binary::BiRanker;

pub use rsdict::RsDict;

impl BiRanker for rsdict::RsDict {
    fn new_packed(seq: &[u64]) -> Self {
        Self::from_blocks(seq.iter().map(|x| *x))
    }

    fn size(&self) -> usize {
        self.heap_size()
    }

    unsafe fn rank_unchecked(&self, pos: usize) -> u64 {
        self.rank(pos as u64, true)
    }
}