{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/7804","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/7804/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/7804/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/7804/events","html_url":"https://github.com/JuliaLang/julia/pull/7804","id":39278384,"number":7804,"title":"add Lapack LQ factorizations","user":{"login":"Jutho","id":4162102,"avatar_url":"https://avatars.githubusercontent.com/u/4162102?v=3","gravatar_id":"","url":"https://api.github.com/users/Jutho","html_url":"https://github.com/Jutho","followers_url":"https://api.github.com/users/Jutho/followers","following_url":"https://api.github.com/users/Jutho/following{/other_user}","gists_url":"https://api.github.com/users/Jutho/gists{/gist_id}","starred_url":"https://api.github.com/users/Jutho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jutho/subscriptions","organizations_url":"https://api.github.com/users/Jutho/orgs","repos_url":"https://api.github.com/users/Jutho/repos","events_url":"https://api.github.com/users/Jutho/events{/privacy}","received_events_url":"https://api.github.com/users/Jutho/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/linear%20algebra","name":"linear algebra","color":"aa8800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/8","html_url":"https://github.com/JuliaLang/julia/milestones/0.4.x","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/8/labels","id":303801,"number":8,"title":"0.4.x","description":"Bugs that should be fixed within the 0.4.x series. Can be fixed for 0.4 as well, but do not block the 0.4 release.","creator":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars.githubusercontent.com/u/330950?v=3","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"open_issues":59,"closed_issues":105,"state":"open","created_at":"2013-04-05T16:15:28Z","updated_at":"2015-09-06T17:32:05Z","due_on":null,"closed_at":null},"comments":20,"created_at":"2014-08-01T10:28:26Z","updated_at":"2015-09-07T07:29:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/7804","html_url":"https://github.com/JuliaLang/julia/pull/7804","diff_url":"https://github.com/JuliaLang/julia/pull/7804.diff","patch_url":"https://github.com/JuliaLang/julia/pull/7804.patch"},"body":"I would love to have the functionality for doing LQ factorisations in a package I am working on. While these can be obtained from QR factorisation of the transposed matrix, there is no way to do this in place (since there is no in place transpose) and thus that approach is suboptimal both memory wise and computation wise.\r\n\r\nThis PR just enables the basis LQ factorisations provided by Lapack, no support for custom types yet. The interface is identical to that of the QR factorization (i.e. there is `lq`, `lqfact` and `lqfact!`).\r\nUsing `F=lqfact(A)` produces an `F::LQ` object. `Q=F[:Q]` produces an `LQPackedQ` object, that can be multiplied with a matrix from the left, from the right and (c)transposed.\r\n\r\nHowever, there is not yet any support for `\\` (or should it be `/` ) with an `LQ` object.\r\n\r\nCurrently the methods are not yet exported. If this could still be added to the 0.3 release, I will add them to export.jl and can add tests and documentation. If not, I will have to add this code to my own package, however, it would still be good if the tiny fixes in the lq methods in lapack.jl could be merged (which are completely invisible to the user, as these methods are not even used by anything).\r\n\r\nCurrently, the following runs without errors:\r\n```julia\r\nusing Base.Test\r\n\r\nD1=10\r\nD2=20\r\nfor T in (Float32, Float64, Complex64, Complex128)\r\n    A=rand(T,D1,D2);\r\n    F=Base.LinAlg.lqfact(A);\r\n    L=F[:L];\r\n    Q=F[:Q];\r\n    Qf=full(Q,thin=false);\r\n    Qt=full(Q,thin=true);\r\n    @test_approx_eq L*Q A\r\n    @test_approx_eq L*Qt A\r\n\r\n    B=rand(T,D2,D2);\r\n    @test_approx_eq B*Q  B*Qf\r\n    @test_approx_eq Q'*B Qf'*B\r\n    @test_approx_eq Q*B  Qf*B\r\n    @test_approx_eq B*Q' B*Qf'\r\n\r\n    C=rand(T,D1,D1);\r\n    @test_approx_eq C*Q  C*Qt\r\n    @test_approx_eq Q'*C Qt'*C\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/138214984","html_url":"https://github.com/JuliaLang/julia/pull/7804#issuecomment-138214984","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/7804","id":138214984,"user":{"login":"ViralBShah","id":744411,"avatar_url":"https://avatars.githubusercontent.com/u/744411?v=3","gravatar_id":"","url":"https://api.github.com/users/ViralBShah","html_url":"https://github.com/ViralBShah","followers_url":"https://api.github.com/users/ViralBShah/followers","following_url":"https://api.github.com/users/ViralBShah/following{/other_user}","gists_url":"https://api.github.com/users/ViralBShah/gists{/gist_id}","starred_url":"https://api.github.com/users/ViralBShah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViralBShah/subscriptions","organizations_url":"https://api.github.com/users/ViralBShah/orgs","repos_url":"https://api.github.com/users/ViralBShah/repos","events_url":"https://api.github.com/users/ViralBShah/events{/privacy}","received_events_url":"https://api.github.com/users/ViralBShah/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T07:29:19Z","updated_at":"2015-09-07T07:29:19Z","body":"This can't be on 0.4.x, since this would introduce a new feature. It has to necessarily be 0.5, now that we are in the 0.4 feature freeze."}}