Appearance
cellpack::scans::CsrView
Module contract · All interfaces
At a glance
pub struct CsrView<'a> {
pub n_genes: u32,
pub value_width: usize,
pub indptr: Offsets<'a>,
pub indices: Indices<'a>,
pub data: &'a [u8],
}Borrowed inputs, selections and encoding options. Canonical CSR with row offsets borrowed in the caller’s integer type.
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: Offsets<'a>n_rows + 1 row offsets, in any integer type.
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.