Appearance
cellpack::scans::Parts
Module contract · All interfaces
At a glance
pub struct Parts<'a> { /* private fields */ }Record and chunk decoding: CSR arrays, dense rows and Parts views, plus the workspace sizing those calls need. A decoded record before values are materialized: ids and values in the same order, borrowed from the workspace (or the record). With IdSpace::Coded the ids ascend in the chunk’s coded numbering and no order restoration runs; with IdSpace::Source they ascend in source numbering. Callers mapping genes themselves can convert the k dictionary entries once instead of every value. Read-only access keeps the validated ids and rank lengths aligned.
Member index
6 of 6 members
idsValidated ascending ids, aligned with Self::values .valuesValues aligned with Self::ids ; ranks remain tied to this row.nnzDeclared element count of the record: stored entries for a sparse record, non-zeros for a dense one.elementsElements: the stored entries of a sparse record, every gene of a dense one.layoutHow the record stores its elements. A dense record’s elements are every gene in id order, zeros included.expand_valuesWrites the element values in order to out ( elements × value_width bytes).
Methods and associated constants
ids
Validated ascending ids, aligned with Self::values.
values
Values aligned with Self::ids; ranks remain tied to this row.
nnz
Declared element count of the record: stored entries for a sparse record, non-zeros for a dense one.
elements
Elements: the stored entries of a sparse record, every gene of a dense one.
layout
pub fn layout(&self) -> RecordLayoutHow the record stores its elements. A dense record’s elements are every gene in id order, zeros included.
expand_values
pub fn expand_values(&self, out: &mut [u8]) -> Result<()>Writes the element values in order to out (elements × value_width bytes).
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.