pub fn qr_factor<F>(a: &ArrayView2<'_, F>) -> LinalgResult<QRDecomposition<F>>
Expand description
Performs QR decomposition using Householder reflections.
§Arguments
a
- Input matrix
§Returns
- QR decomposition result
§Examples
use scirs2_core::ndarray::{array, ScalarOperand};
use scirs2_linalg::lapack::qr_factor;
let a = array![[2.0, 1.0], [4.0, 3.0], [8.0, 7.0]];
let qr_result = qr_factor(&a.view()).unwrap();
// Check that A = Q*R
// (implementation dependent, so not shown here)