Struct bio::data_structures::bwt::Occ
source · pub struct Occ { /* private fields */ }
Expand description
An occurrence array implementation.
Implementations
sourceimpl Occ
impl Occ
sourcepub fn new(bwt: &BWTSlice, k: u32, alphabet: &Alphabet) -> Self
pub fn new(bwt: &BWTSlice, k: u32, 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
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Occ
impl<'de> Deserialize<'de> for Occ
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Occ
impl Send for Occ
impl Sync for Occ
impl Unpin for Occ
impl UnwindSafe for Occ
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more