pub fn lu<T: LinalgScalar>(
a: &[T],
batch: usize,
m: usize,
n: usize,
) -> (Vec<T>, Vec<i32>, Vec<i32>)Expand description
The LU factorization with partial pivoting P A = L U of each m x n
matrix of a batch (LAPACK’s getrf).
Returns the factors (L below the diagonal with an implicit unit
diagonal, U on and above it), the pivots (min(m, n) row swaps per
matrix, 0-based: row i was swapped with row pivots[i]), and the
permutation (m per matrix: row i of P A is row permutation[i] of
A).
§Panics
Panics if a does not have batch * m * n elements, or if m does not
fit in an i32.