Skip to content

lazymatrix::RawColumn ​

LazyMatrix for Rust · 0.8.1

Source

rust
pub trait RawColumn<F: Scalar>

A borrowed raw column supplied by a matrix backend.

for_each_stored visits every stored entry, including explicitly stored zeros. Dense implementations visit every row. Sparse implementations omit structural zeros.

Methods ​

affine_add_to ​

rust
fn affine_add_to<V>(
    &self,
    raw_multiplier: F,
    offset: F,
    destination: &mut V
) where V: VectorViewMut<F> + ?Sized

Source

Add raw_multiplier * raw_column + offset to a dense destination.

Sparse implementations take O(nnz) when offset == 0, and O(n + nnz) otherwise. Dense implementations take O(n).

for_each_stored ​

rust
fn for_each_stored(&self, f: impl FnMut(usize, F))

Source

is_empty ​

rust
fn is_empty(&self) -> bool

Source

len ​

rust
fn len(&self) -> usize

Source

raw_sum ​

rust
fn raw_sum(&self) -> F

Source

stored_len ​

rust
fn stored_len(&self) -> usize

Source

Implementation of RawColumn ​

Source

rust
impl<C: RawColumn<F>, F: Scalar> RawColumn<F> for FilteredRawColumn<C>

Implementation of RawColumn ​

Source

rust
impl<F: Scalar> RawColumn<F> for SparseColumnRef<'_, F>

Released under the MIT and Apache 2.0 licenses.