pub fn lu_factor<F>(a: &ArrayView2<'_, F>) -> LinalgResult<LUDecomposition<F>>
Expand description
Performs LU decomposition with partial pivoting.
§Arguments
a
- Input matrix
§Returns
- LU decomposition result
§Examples
use scirs2_core::ndarray::{array, ScalarOperand};
use scirs2_linalg::lapack::lu_factor;
let a = array![[2.0, 1.0, 1.0], [4.0, 3.0, 3.0], [8.0, 7.0, 9.0]];
let lu_result = lu_factor(&a.view()).unwrap();
// Check that P*A = L*U
// (implementation dependent, so not shown here)