Appearance
cellpack::scans::CsrRef
Module contract · All interfaces
At a glance
pub struct CsrRef<'a> {
pub n_genes: u32,
pub value_width: usize,
pub indptr: &'a [u64],
pub indices: Indices<'a>,
pub data: &'a [u8],
}Borrowed inputs, selections and encoding options. A canonical CSR matrix: every row’s indices strictly ascending and below n_genes; data holds value_width little-endian bytes per element. Values are opaque bit patterns, so any 1/2/4/8-byte type round-trips.
Fields and variants
n_genes
n_genes: u32Genes each row may name (ids lie in 0..n_genes).
value_width
value_width: usizeBytes per value: 1, 2, 4 or 8.
indptr
indptr: &'a [u64]n_rows + 1 row offsets.
indices
indices: Indices<'a>Gene indices of every row, in row order.
data
data: &'a [u8]Value bytes, value_width per index.
Member index
1 of 1 members
n_rowsRows the offsets describe; an empty indptr has none.
Methods and associated constants
n_rows
Rows the offsets describe; an empty indptr has none.
Implemented traits
Contract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.