Skip to main content

singular_values

Function singular_values 

Source
pub fn singular_values(a: &[f64], rows: usize, cols: usize) -> Vec<f64>
Expand description

Singular values of a dense rows × cols matrix (row-major), descending, by one-sided Jacobi: pairwise orthogonalisation of the columns until every pair is numerically orthogonal; the singular values are then the column norms. O(sweeps · cols² · rows) with a handful of sweeps — fine for the K × K matrices of the canonical-correlation step (K ≤ ~50).