Skip to main content

Module matrix

Module matrix 

Source
Expand description

Sparse operands and the traits the solvers consume.

§Index widths

SvdMat defaults to u32 column indices with u64 row pointers. Against usize-everywhere that is 12 bytes per non-zero instead of 16 for f64 data (8 instead of 16 for f32), and the separate pointer width keeps matrices with more than u32::MAX non-zeros representable. Callers who need wider indices can name them: SvdMat<f64, u64, u64>.

Re-exports§

pub use kernels::DEFAULT_SCRATCH_BUDGET;
pub use masked::MaskedCsMat;

Modules§

kernels
Parallel sparse × dense kernels.
masked
A submatrix view over a sparse matrix.

Traits§

SparseMat
The operand interface the Krylov solvers (crate::lanczos, crate::irlba) need: shape and a matrix-vector product.
SparseMatDense
Blocked products, needed by the randomized solvers.

Functions§

apply_centering
Subtract the rank-1 centering term from an uncentered product. Public so an implementor writing a fused mul_dense_centered can reuse it.
total_squared_norm
‖A‖²_F, or the centered version when means is supplied. What the solvers store in SvdRec::total_squared_norm.

Type Aliases§

SvdMat
An owned sparse matrix. Defaults to u32 indices and u64 row pointers.
SvdMatView
A borrowed sparse matrix. Defaults to u32 indices and u64 row pointers.