Skip to content

lazymatrix::MatVecInto ​

LazyMatrix for Rust · 0.8.1

Source

rust
pub trait MatVecInto<X, Y = X>: MatrixShape + MatrixErrorType

Matrix–vector product out = A x, overwriting reusable output storage.

X and Y may differ so that backends can accept borrowed or strided inputs while writing into an owned output. Implementations must not depend on the previous values in out.

Errors ​

Returns the backend error if the product cannot be completed. After an error, out may be partially overwritten and must not be used as a product result.

Panics ​

Panics unless x has length ncols and out has length nrows.

Methods ​

matvec_into ​

rust
fn matvec_into(
    &self,
    x: &X,
    out: &mut Y
) -> Result<(), <Self as MatrixErrorType>::Error>

Source

matvec_normalized_into ​

rust
fn matvec_normalized_into<F: lazymatrix::Scalar>(
    &self,
    x: &X,
    centers: Option<&[F]>,
    scales: Option<&[F]>,
    out: &mut Y
) -> Result<(), <Self as MatrixErrorType>::Error> where X: Clone + lazymatrix::ElemDivAssign<F> + lazymatrix::DotSlice<F>, Y: lazymatrix::SubScalarAssign<F>

Source

Apply optional column normalization without materializing the matrix.

The default uses raw products and algebraic corrections. Backends may override this method to center entries before accumulation, which avoids cancellation when column offsets are large.

Implementation of MatVecInto ​

Source

rust
impl<A, F, X, Y> MatVecInto<X, Y> for ZarrMatrix<A, F> where A: ZarrArray<F>, F: Scalar, X: VectorView<F>, Y: VectorViewMut<F>

Implementation of MatVecInto ​

Source

rust
impl<M, F, X, Y> MatVecInto<X, Y> for WithIntercept<M, F> where F: Scalar, X: VectorOwned<F>, Y: VectorViewMut<F>, M: MatVecInto<<X as VectorOwned>::Owned, Y>

Implementation of MatVecInto ​

Source

rust
impl<M, X, Y, F> MatVecInto<X, Y> for LazyMatrix<M, F> where F: Scalar, M: MatVecInto<X, Y>, X: Clone + ElemDivAssign<F> + DotSlice<F>, Y: SubScalarAssign<F>

Implementation of MatVecInto ​

Source

rust
impl<M, X, Y, F> MatVecInto<X, Y> for Submatrix<'_, M, F> where M: SubmatrixKernel<F>, F: Scalar, X: VectorView<F>, Y: VectorViewMut<F>

Implementation of MatVecInto ​

Source

rust
impl<M, X, Y, T> MatVecInto<X, Y> for EagerMatrix<M, T> where M: MatVecInto<X, Y>

Implementation of MatVecInto ​

Source

rust
impl<M: MatVecInto<X, Y>, X, Y> MatVecInto<X, Y> for SprsCsc<M>

Implementation of MatVecInto ​

Source

rust
impl<M: MatVecInto<X, Y>, X, Y> MatVecInto<X, Y> for SprsCsr<M>

Released under the MIT and Apache 2.0 licenses.