Skip to content
API REFERENCEUsage guides →

cellpack::scans::CsrView ​

struct

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: u32

Genes each row may name (ids lie in 0..n_genes).

value_width ​

value_width: usize

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

pub fn n_rows(&self) -> usize

Rows the offsets describe; an empty indptr has none.

Implemented traits ​

impl<'a> Clone for CsrView<'a>
impl<'a> Debug for CsrView<'a>
impl<'a> From<CsrView<'a>> for MatrixRef<'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