This is a followup on https://github.com/JuliaLang/julia/pull/26391. As @KlausC points out, it is currently not possible to multiply Q*R for QRSparseQ (in the tall case). For the dense QR factorizations, this is possible because the multiplication methods allow that Q can both be interpreted as thin and square. E.g.
Multiply Q in Householder form is actually only possible when the right hand side corresponds to a square Q so the special behavior is implemented by zero padding the right hand side.
There are two solutions here. Either we make sparse QR behave like the dense or the opposite. The former is the more complicated solution and I like the simplicity of the latter. People like to reconstruct the input with Q*R which wouldn't be possible if go with the latter. However, reconstructing the input is only useful for teaching and in that case, it might be instructive to require F.Q*Matrix(I, 4, 2)*F.R. Finally, if we decide to stick with dense behavior then we also need to fix R'Q' (as also pointed out by @KlausC).
This is a followup on https://github.com/JuliaLang/julia/pull/26391. As @KlausC points out, it is currently not possible to multiply
Q*R
forQRSparseQ
(in the tall case). For the dense QR factorizations, this is possible because the multiplication methods allow that Q can both be interpreted as thin and square. E.g.Multiply Q in Householder form is actually only possible when the right hand side corresponds to a square Q so the special behavior is implemented by zero padding the right hand side.
There are two solutions here. Either we make sparse QR behave like the dense or the opposite. The former is the more complicated solution and I like the simplicity of the latter. People like to reconstruct the input with
Q*R
which wouldn't be possible if go with the latter. However, reconstructing the input is only useful for teaching and in that case, it might be instructive to requireF.Q*Matrix(I, 4, 2)*F.R
. Finally, if we decide to stick with dense behavior then we also need to fixR'Q'
(as also pointed out by @KlausC).