I need to perform a QR decomposition with all of the diagonal elements of R to be positive. I’d like to do this by multiplying relevant columns of Q and rows of R by -1, but the issue that comes up is that
LinearAlgebra.QRCompactWY, which stores the Q factors as a
LinearAlgebra.QRCompactWYQ. Is there a nice way to multiply the columns of the matrix represented by this struct by -1? This would prevent me from having to convert Q to a matrix and then somehow rebuild a new QR struct.
I know this paper exists describing the compact WY format the Q matrix is stored in, but I am no expert in implementations of fast linear algebra.