kaleidicassociates / lubeck

High level linear algebra library for Dlang
http://lubeck.libmir.org/
Boost Software License 1.0
66 stars 14 forks source link

Add helper functions to QRResult #23

Closed jmh530 closed 5 years ago

jmh530 commented 5 years ago

Addresses issue #17.

Adding functions to produce Q and R matrices as well as reconstruct the original matrix.

Note that this is only tested on square matrices. I could only get qrDecomp function to work on square matrices, which prevented me from testing further.

jmh530 commented 5 years ago

@9il Checks are passing. I still need to make this work for rectangular matrices, but I don't know if you want me to do that in a separate PR.

9il commented 5 years ago

This PR is fine for rectangular changes

jmh530 commented 5 years ago

@9il Finally got around to getting it working for rectangular matrices. I had tried to get UTs that replicate exactly the qr() output from R, but it didn't match up exactly. The Q() and R() functions though produce the same results, so I think that's sufficient for now.