Skip to content

lazymatrix::LogicalColumn ​

LazyMatrix for Rust · 0.8.1

Source

rust
pub trait LogicalColumn<F: Scalar>

Operations on one logical, possibly normalized column.

Methods ​

center ​

rust
fn center(&self) -> F

Source

dot ​

rust
fn dot<V: VectorView<F> + ?Sized>(&self, vector: &V) -> F

Source

dot_with_sum ​

rust
fn dot_with_sum<V: VectorView<F> + ?Sized>(
    &self,
    vector: &V,
    vector_sum: F
) -> F

Source

is_empty ​

rust
fn is_empty(&self) -> bool

Source

len ​

rust
fn len(&self) -> usize

Source

norm_squared ​

rust
fn norm_squared(&self) -> F

Source

scale ​

rust
fn scale(&self) -> F

Source

scaled_add_to ​

rust
fn scaled_add_to<V: VectorViewMut<F> + ?Sized>(
    &self,
    alpha: F,
    destination: &mut V
)

Source

sum ​

rust
fn sum(&self) -> F

Source

weighted_dot ​

rust
fn weighted_dot<V, W>(
    &self,
    vector: &V,
    weights: &W
) -> F where V: VectorView<F> + ?Sized, W: VectorView<F> + ?Sized

Source

weighted_dot_with_sum ​

rust
fn weighted_dot_with_sum<V, W>(
    &self,
    vector: &V,
    weights: &W,
    weighted_vector_sum: F
) -> F where V: VectorView<F> + ?Sized, W: VectorView<F> + ?Sized

Source

weighted_norm_squared ​

rust
fn weighted_norm_squared<W: VectorView<F> + ?Sized>(&self, weights: &W) -> F

Source

Sum weighted squares of logical entries, including implicit zeros.

weighted_norm_squared_with_sum ​

rust
fn weighted_norm_squared_with_sum<W: VectorView<F> + ?Sized>(
    &self,
    weights: &W,
    weight_sum: F
) -> F

Source

Accept a cached total, which implementations may ignore for stability.

LazyColumn uses the same O(n + nnz) calculation as its uncached method to preserve small implicit-zero contributions.

Implementation of LogicalColumn ​

Source

rust
impl<C: RawColumn<F>, F: Scalar> LogicalColumn<F> for LazyColumn<C, F>

Released under the MIT and Apache 2.0 licenses.