Struct bio::data_structures::bwt::Occ
[−]
[src]
pub struct Occ { // some fields omitted }
An occurence array implementation.
Methods
impl Occ
[src]
fn new(bwt: &BWTSlice, k: usize, alphabet: &Alphabet) -> Self
Calculate occ array with sampling from BWT of length n. Time complexity: O(n). Space complexity: O(n / k * A) with A being the alphabet size. Alphabet size is determined on the fly from the BWT. For large texts, it is therefore advisable to transform the text before calculating the BWT (see alphabets::rank_transform).
Arguments
bwt
- the BWTk
- the sampling rate: every k-th entry will be stored
fn get(&self, bwt: &BWTSlice, r: usize, a: u8) -> usize
Get occurrence count of symbol a in BWT[..r+1]. Complexity: O(k).