Skip to main content

singular_values

Function singular_values 

Source
pub fn singular_values<const K: usize>(matrix: &[[f64; K]; K]) -> [f64; K]
Expand description

Singular values of a square matrix, in decreasing order.

The matrix is given row by row: matrix[i][j] is the element in row i, column j.

Applicable both to R from TSQR and to an explicitly assembled H. In the latter case it returns the eigenvalues of H, since H is symmetric positive semi-definite. Using one and the same routine on both paths is deliberate: then any difference in the results is explained by squaring the condition number alone, not by the choice of solver.