refactor: add rolling buffer methods and document label constraints
Added `is_empty()`, `clear()`, and `iter()` methods to the rolling statistics buffer to enable standard traversal and state reset operations. Documented genome label constraints, specifying forbidden characters, empty label rejection, space quoting requirements, and auto-derived label bypass rules. Additionally, updated doc comments and added `#[allow(dead_code)]` attributes for `kmer_offset` and `n_kmers` fields to suppress compiler warnings while reserving them for future `--detail` coverage vector logic.
This commit is contained in:
@@ -24,10 +24,6 @@ impl<T: Copy + Default, const N: usize> Ring<T, N> {
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
fn is_empty(&self) -> bool {
|
||||
self.len == 0
|
||||
}
|
||||
#[inline]
|
||||
fn clear(&mut self) {
|
||||
self.len = 0;
|
||||
self.head = 0;
|
||||
@@ -67,10 +63,6 @@ impl<T: Copy + Default, const N: usize> Ring<T, N> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Iterate over elements front-to-back (copies, since T: Copy).
|
||||
fn iter(&self) -> impl Iterator<Item = T> + '_ {
|
||||
(0..self.len).map(move |i| self.buf[(self.head + i) % N])
|
||||
}
|
||||
}
|
||||
|
||||
// ── MmerItem ──────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user