|
"QR solve: unable to solve a non-square system." |
I suggest to update solve_mut to return the least squares solution in the case when the problem is overdetermined. Note that https://docs.rs/nalgebra-lapack/latest/nalgebra_lapack/trait.QrDecomposition.html#method.solve does this as well. Also Julia and octave take A \ b as $| A x - b|_2 -> \min$.
All that needs to be done is to multiply b with q.transpose() from left and solve then.
May I draft a pull request for this?
nalgebra/src/linalg/qr.rs
Line 216 in 96c5d87
I suggest to update$| A x - b|_2 -> \min$ .
solve_mutto return the least squares solution in the case when the problem is overdetermined. Note that https://docs.rs/nalgebra-lapack/latest/nalgebra_lapack/trait.QrDecomposition.html#method.solve does this as well. Also Julia and octave takeA \ basAll that needs to be done is to multiply b with q.transpose() from left and solve then.
May I draft a pull request for this?