Skip to content
API REFERENCEUsage guides →

cellpack::scans::Parts ​

struct

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 ​

pub fn ids(&self) -> &'a [u32]

Validated ascending ids, aligned with Self::values.

values ​

pub fn values(&self) -> Values<'a>

Values aligned with Self::ids; ranks remain tied to this row.

nnz ​

pub fn nnz(&self) -> usize

Declared element count of the record: stored entries for a sparse record, non-zeros for a dense one.

elements ​

pub fn elements(&self) -> usize

Elements: the stored entries of a sparse record, every gene of a dense one.

layout ​

pub fn layout(&self) -> RecordLayout

How 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 ​

impl<'a> Clone for Parts<'a>
impl<'a> Debug for Parts<'a>

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.

Definition