lazymatrix::RectangularProducts
LazyMatrix for Rust · 0.12.0
pub trait RectangularProducts: MatrixShape + MatrixErrorTypeVector products restricted to a rectangle of a logical operator.
Ranges refer to the parent operator, while input and output indices are local to the rectangle. Implementations preserve the parent's fitted transformation, including stage order, without fitting new statistics. They visit only selected dense entries, selected sparse outer storage, or intersecting storage chunks, using bounded workspace.
Validate ranges and dimensions before reading data or modifying outputs. Zero alpha skips all source reads, and zero beta ignores previous output values. Empty inner dimensions represent empty sums. On a backend error, output may be partial; normalization corrections follow successful reads.
Associated types
Scalar
type Scalar: Scalar;Scalar of the logical entries and product vectors.
Methods
rectangle_matvec_into
fn rectangle_matvec_into<X, Y>(
&self,
rows: Range<usize>,
columns: Range<usize>,
alpha: <Self as RectangularProducts>::Scalar,
x: &X,
beta: <Self as RectangularProducts>::Scalar,
out: &mut Y
) -> Result<(), <Self as MatrixErrorType>::Error> where X: VectorView<<Self as RectangularProducts>::Scalar> + ?Sized, Y: VectorViewMut<<Self as RectangularProducts>::Scalar> + ?SizedCompute out = alpha * self[rows, columns] * x + beta * out.
rectangle_transpose_into
fn rectangle_transpose_into<X, Y>(
&self,
rows: Range<usize>,
columns: Range<usize>,
alpha: <Self as RectangularProducts>::Scalar,
x: &X,
beta: <Self as RectangularProducts>::Scalar,
out: &mut Y
) -> Result<(), <Self as MatrixErrorType>::Error> where X: VectorView<<Self as RectangularProducts>::Scalar> + ?Sized, Y: VectorViewMut<<Self as RectangularProducts>::Scalar> + ?SizedCompute out = alpha * self[rows, columns]^T * x + beta * out.
Implementation of RectangularProducts
impl<M, A, B> RectangularProducts for lazymatrix::LazyMatrix<M, lazymatrix::NormalizationChainParams<A, B>> where M: MatrixShape + MatrixErrorType, lazymatrix::NormalizationChainParams<A, B>: Stage, <lazymatrix::NormalizationChainParams<A, B> as Stage>::Kind: ChainRectangle<M, lazymatrix::NormalizationChainParams<A, B>>Implementation of RectangularProducts
impl<M, P> RectangularProducts for lazymatrix::EagerMatrix<M, P> where P: NormalizationParams, M: SubmatrixKernel<<P as NormalizationParams>::Scalar>Implementation of RectangularProducts
impl<M: MatrixTraversal<F>, F: Scalar, S: AsRef<[F]>> RectangularProducts for lazymatrix::LazyMatrix<M, lazymatrix::RowNormalizationParams<F, S>>Implementation of RectangularProducts
impl<M: SubmatrixKernel<F>, F: Scalar, S: AsRef<[F]>> RectangularProducts for lazymatrix::LazyMatrix<M, lazymatrix::ColumnNormalizationParams<F, S>>Implementation of RectangularProducts
impl<O: RectangularProducts + ?Sized> RectangularProducts for lazymatrix::Submatrix<'_, O>Implementation of RectangularProducts
impl<O: RectangularProducts + ?Sized> RectangularProducts for lazymatrix::Transpose<'_, O>
