Function rgsl::linear_algebra::QR_lssolve [] [src]

pub fn QR_lssolve(qr: &MatrixF64, tau: &VectorF64, b: &VectorF64, x: &VectorF64, residual: &VectorF64) -> Value

This function finds the least squares solution to the overdetermined system A x = b where the matrix A has more rows than columns. The least squares solution minimizes the Euclidean norm of the residual, ||Ax - b||.The routine requires as input the QR decomposition of A into (QR, tau) given by gsl_linalg_QR_decomp. The solution is returned in x. The residual is computed as a by-product and stored in residual.