refactor: replace explicit bit-setting loops with optimized bulk operations

Refactor bitmatrix, colgroup, and layer modules to replace manual iteration with concise `or_where` predicates and bulk inversion calls. This simplifies the codebase and leverages optimized internal implementations for improved performance.
This commit is contained in:
Eric Coissac
2026-06-19 09:20:14 +02:00
parent 7c1efa9cbb
commit 9abb2db92f
3 changed files with 4 additions and 16 deletions
+1 -3
View File
@@ -107,9 +107,7 @@ impl Layer<()> {
fs::create_dir_all(&presence_dir).map_err(OLMError::Io)?;
let mut mb = PersistentBitMatrixBuilder::new(n_kmers, &presence_dir).map_err(OLMError::Io)?;
let mut col = mb.add_col().map_err(OLMError::Io)?;
for slot in 0..n_kmers {
col.set(slot, true);
}
col.not();
col.close().map_err(OLMError::Io)?;
mb.close().map_err(OLMError::Io)
}