Computes the LU factorization of a matrix.
Value
A list with components p (pivot indices), l (lower triangular),
and u (upper triangular). The relationship is A = L[P, ] %*% U.
Examples
A <- mlx_matrix(rnorm(16), 4, 4)
lu_result <- mlx_lu(A)
P <- lu_result$p # Pivot indices
L <- lu_result$l # Lower triangular
U <- lu_result$u # Upper triangular