pub struct NtHash<'a> { /* private fields */ }Expand description
Rolling k‑mer hasher over a contiguous DNA sequence.
- Initialization is deferred until the first valid k‑mer (skips any
windows containing
N). roll()/roll_back()advance by one base, handling skips transparently.- Each valid k‑mer emits
num_hashesvalues: the canonical hash plus extra mixes.
Implementations§
Source§impl<'a> NtHash<'a>
impl<'a> NtHash<'a>
Sourcepub fn roll(&mut self) -> bool
pub fn roll(&mut self) -> bool
Advance forward by one base, skipping over k‑mers with N.
Returns true if a new valid hash was produced.
Sourcepub fn peek_back_char(&mut self, incoming: u8) -> bool
pub fn peek_back_char(&mut self, incoming: u8) -> bool
Peek backward with explicit incoming byte.
Sourcepub fn forward_hash(&self) -> u64
pub fn forward_hash(&self) -> u64
Returns the forward‑strand hash.
Sourcepub fn reverse_hash(&self) -> u64
pub fn reverse_hash(&self) -> u64
Returns the reverse‑complement hash.
Auto Trait Implementations§
impl<'a> Freeze for NtHash<'a>
impl<'a> RefUnwindSafe for NtHash<'a>
impl<'a> Send for NtHash<'a>
impl<'a> Sync for NtHash<'a>
impl<'a> Unpin for NtHash<'a>
impl<'a> UnwindSafe for NtHash<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more