Rename PersistentCompactIntMatrix to PersistentIntMatrix
Update all matrix type references, imports, and instantiations across the codebase to use the new PersistentIntMatrix name. The change also includes standardizing code formatting, such as multi-line statements and import ordering, without altering any behavioral logic or public API contracts.
This commit is contained in:
@@ -34,7 +34,7 @@ fn presence(mode: MergeMode) -> bool {
|
||||
mod matrix_builder_tests {
|
||||
use tempfile::tempdir;
|
||||
|
||||
use obicompactvec::{PersistentBitMatrix, PersistentCompactIntMatrix};
|
||||
use obicompactvec::{PersistentBitMatrix, PersistentIntMatrix};
|
||||
|
||||
use super::{ColBuilder, MatrixBuilder};
|
||||
|
||||
@@ -90,7 +90,7 @@ mod matrix_builder_tests {
|
||||
col.close().unwrap();
|
||||
mb.close().unwrap();
|
||||
|
||||
let m = PersistentCompactIntMatrix::open(dir.path()).unwrap();
|
||||
let m = PersistentIntMatrix::open(dir.path()).unwrap();
|
||||
assert_eq!(m.n_cols(), 2);
|
||||
assert_eq!(&*m.row(0), &[0u32, 7]);
|
||||
assert_eq!(&*m.row(1), &[0u32, 42]);
|
||||
@@ -422,8 +422,13 @@ pub(crate) fn merge_partition(
|
||||
move |data: Pass2Data,
|
||||
push: &PipelineSender<Result<Pass2Data, PipelineError>>,
|
||||
delta: &PipelineSender<isize>| {
|
||||
if let Pass2Data::SrcLayer((col_offset, src_n, unitigs_path, src_layer, _guard)) =
|
||||
data
|
||||
if let Pass2Data::SrcLayer((
|
||||
col_offset,
|
||||
src_n,
|
||||
unitigs_path,
|
||||
src_layer,
|
||||
_guard,
|
||||
)) = data
|
||||
{
|
||||
// _guard dropped at end of block, releasing the slot.
|
||||
// `src_layer` (MPHF + matrix) was already opened up
|
||||
@@ -455,8 +460,10 @@ pub(crate) fn merge_partition(
|
||||
}
|
||||
}
|
||||
if !batch.is_empty() {
|
||||
push.send(Ok(Pass2Data::RawBatch((col_offset, src_n, src_layer, batch))))
|
||||
.ok();
|
||||
push.send(Ok(Pass2Data::RawBatch((
|
||||
col_offset, src_n, src_layer, batch,
|
||||
))))
|
||||
.ok();
|
||||
count += 1;
|
||||
}
|
||||
delta.send(count - 1).ok();
|
||||
@@ -480,8 +487,9 @@ pub(crate) fn merge_partition(
|
||||
// per kmer — matches the underlying matrix's own
|
||||
// column-major layout.
|
||||
let slots = src_layer.hash_batch(&kmers);
|
||||
let mut cols: Vec<Vec<u32>> =
|
||||
(0..src_n).map(|_| Vec::with_capacity(kmers.len())).collect();
|
||||
let mut cols: Vec<Vec<u32>> = (0..src_n)
|
||||
.map(|_| Vec::with_capacity(kmers.len()))
|
||||
.collect();
|
||||
src_layer.fill_sub_matrix(&slots, &mut cols);
|
||||
|
||||
// Membership against dst, grouped by dst layer
|
||||
|
||||
Reference in New Issue
Block a user