Skip to main content

factorize

Function factorize 

Source
pub fn factorize<T: SVDScalar>(
    matrix: &Matrix2<T>,
    options: &FactorizeOptions,
) -> Result<FactorizeResult<T>>
Expand description

Factorize a matrix into left and right factors

Returns (L, R, rank, discarded) where:

  • L: left factor matrix (rows x rank)
  • R: right factor matrix (rank x cols)
  • rank: the resulting rank after truncation
  • discarded: the discarded weight (for error estimation)

The original matrix M ≈ L @ R

Note: Only SVD method is fully supported. LU and CI require additional traits and should use factorize_lu directly.