pub fn svd_lowrank(
data: &[f32],
rows: usize,
cols: usize,
rank: usize,
niter: usize,
seed: u64,
) -> Result<ThinSvd>Expand description
Compute a deterministic randomized low-rank SVD (A ≈ U * diag(S) * V^T),
matching torch.svd_lowrank (Halko-Martinsson-Tropp Algorithm 5.1).
Falls back to exact thin SVD when min(rows, cols) <= 256 or when rank + 10 >= min(rows, cols).
§Errors
Returns an error if the matrix is empty, dimensions mismatch data.len(), or SVD fails.