Skip to content
API REFERENCEUsage guides →

cellpack::scans::DenseRef ​

struct

Module contract · All interfaces

At a glance ​

pub struct DenseRef<'a> {
    pub n_genes: u32,
    pub value_width: usize,
    pub data: &'a [u8],
}

Borrowed inputs, selections and encoding options. A row-major dense matrix: n_genes values of value_width little-endian bytes per row. A value whose bytes are all zero is a zero.

Fields and variants ​

n_genes ​

n_genes: u32

Values per row.

value_width ​

value_width: usize

Bytes per value: 1, 2, 4 or 8.

data ​

data: &'a [u8]

n_rows * n_genes * value_width bytes.

Member index ​

1 of 1 members

  • n_rowsWhole rows in data ; a partial trailing row is not counted.

Methods and associated constants ​

n_rows ​

pub fn n_rows(&self) -> usize

Whole rows in data; a partial trailing row is not counted.

Implemented traits ​

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