Skip to content

lazymatrix::MatMatInto ​

LazyMatrix for Rust · 0.8.1

Source

rust
pub trait MatMatInto<F: Scalar>: MatrixShape + MatrixErrorType

Batched product out = A B, overwriting reusable dense output.

For an n × p operator and a p × k input, output has shape n × k. Inputs are borrowed without requiring cloning or contiguity. Every output entry is overwritten, ignoring previous values. Implementations batch the responses rather than calling the public vector product for each column. Internal scratch is permitted; output reuse does not imply zero allocation. No normalized design matrix may be materialized.

Errors ​

Returns the operator's error. Output may be partial and must be discarded.

Panics ​

Dimension mismatches panic before output writes or storage reads, even for empty batches. A valid zero-column batch performs no storage reads.

Methods ​

matmat_into ​

rust
fn matmat_into<R, O>(
    &self,
    rhs: &R,
    out: &mut O
) -> Result<(), <Self as MatrixErrorType>::Error> where R: MatrixRead<F> + ?Sized, O: MatrixRead<F> + MatrixWrite<F> + ?Sized

Source

matmat_normalized_into ​

rust
fn matmat_normalized_into<R, O>(
    &self,
    rhs: &R,
    centers: Option<&[F]>,
    scales: Option<&[F]>,
    out: &mut O
) -> Result<(), <Self as MatrixErrorType>::Error> where R: MatrixRead<F> + ?Sized, O: MatrixRead<F> + MatrixWrite<F> + ?Sized

Source

Apply optional column normalization without materializing the design.

The default uses an indexed view of scaled coefficients and corrects the raw product only after success. Dense backends override this hook to center entries before accumulation, preserving small variations. Parameter lengths and exact zero scales are checked before writes or reads. Negative scales and nonfinite values are preserved.

Implementation of MatMatInto ​

Source

rust
impl<A: ZarrArray<F>, F: Scalar> MatMatInto<F> for ZarrMatrix<A, F>

Implementation of MatMatInto ​

Source

rust
impl<M: MatMatInto<F>, F: Scalar> MatMatInto<F> for lazymatrix::WithIntercept<M, F>

Implementation of MatMatInto ​

Source

rust
impl<M: MatMatInto<F>, F: Scalar> MatMatInto<F> for lazymatrix::LazyMatrix<M, F>

Implementation of MatMatInto ​

Source

rust
impl<M: lazymatrix::MatMatInto<F>, F: Scalar, T> MatMatInto<F> for EagerMatrix<M, T>

Implementation of MatMatInto ​

Source

rust
impl<M: lazymatrix::MatMatInto<F>, F: Scalar> MatMatInto<F> for SprsCsc<M>

Implementation of MatMatInto ​

Source

rust
impl<M: lazymatrix::MatMatInto<F>, F: Scalar> MatMatInto<F> for SprsCsr<M>

Released under the MIT and Apache 2.0 licenses.