lazymatrix::LogicalColumn
LazyMatrix for Rust · 0.8.1
rust
pub trait LogicalColumn<F: Scalar>Operations on one logical, possibly normalized column.
Methods
center
rust
fn center(&self) -> Fdot
rust
fn dot<V: VectorView<F> + ?Sized>(&self, vector: &V) -> Fdot_with_sum
rust
fn dot_with_sum<V: VectorView<F> + ?Sized>(
&self,
vector: &V,
vector_sum: F
) -> Fis_empty
rust
fn is_empty(&self) -> boollen
rust
fn len(&self) -> usizenorm_squared
rust
fn norm_squared(&self) -> Fscale
rust
fn scale(&self) -> Fscaled_add_to
rust
fn scaled_add_to<V: VectorViewMut<F> + ?Sized>(
&self,
alpha: F,
destination: &mut V
)sum
rust
fn sum(&self) -> Fweighted_dot
rust
fn weighted_dot<V, W>(
&self,
vector: &V,
weights: &W
) -> F where V: VectorView<F> + ?Sized, W: VectorView<F> + ?Sizedweighted_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> + ?Sizedweighted_norm_squared
rust
fn weighted_norm_squared<W: VectorView<F> + ?Sized>(&self, weights: &W) -> FSum 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
) -> FAccept 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
rust
impl<C: RawColumn<F>, F: Scalar> LogicalColumn<F> for LazyColumn<C, F>
