{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/34961826","id":34961826,"diff_hunk":"@@ -24,12 +24,29 @@ one{T}(J::UniformScaling{T}) = one(UniformScaling{T})\n zero{T}(::Type{UniformScaling{T}}) = UniformScaling(zero(T))\n zero{T}(J::UniformScaling{T}) = zero(UniformScaling{T})\n \n-+(J1::UniformScaling, J2::UniformScaling) = UniformScaling(J1.λ+J2.λ)\n-+{T}(B::BitArray{2},J::UniformScaling{T}) = bitunpack(B) + J\n-+(J::UniformScaling, B::BitArray{2})      = J + bitunpack(B)\n-+(J::UniformScaling, A::AbstractMatrix)   = A + J\n-+(J::UniformScaling, x::Number)           = J.λ + x\n-+(x::Number, J::UniformScaling)           = x + J.λ\n+(+)(J1::UniformScaling, J2::UniformScaling) = UniformScaling(J1.λ+J2.λ)\n+(+){T}(B::BitArray{2},J::UniformScaling{T}) = bitunpack(B) + J\n+(+)(J::UniformScaling, B::BitArray{2})      = J + bitunpack(B)\n+(+)(J::UniformScaling, A::AbstractMatrix)   = A + J\n+(+)(J::UniformScaling, x::Number)           = J.λ + x\n+(+)(x::Number, J::UniformScaling)           = x + J.λ\n+\n+(+)(U::UpperTriangular, J::UniformScaling) = UpperTriangular(U.data + J)\n+function (+)(U::LinAlg.UnitUpperTriangular, J::UniformScaling)\n+    Unew = copy(U.data)\n+    for i = 1:size(Unew, 1)\n+        Unew[i,i] = 2\n+    end\n+    UpperTriangular(Unew)\n+end\n+(+)(L::LowerTriangular, J::UniformScaling) = LowerTriangular(L.data + J)\n+function (+)(L::LinAlg.UnitLowerTriangular, J::UniformScaling)\n+    Lnew = copy(L.data)\n+    for i = 1:size(Lnew, 1)\n+        Lnew[i,i] = 2\n+    end\n+    LowerTriangular(Lnew)\n+end","path":"base/linalg/uniformscaling.jl","position":32,"original_position":32,"commit_id":"c1089ebfcc5101c77ecfc110e86931cc5bcdcd1c","original_commit_id":"c1089ebfcc5101c77ecfc110e86931cc5bcdcd1c","user":{"login":"carnaval","id":5307791,"avatar_url":"https://avatars.githubusercontent.com/u/5307791?v=3","gravatar_id":"","url":"https://api.github.com/users/carnaval","html_url":"https://github.com/carnaval","followers_url":"https://api.github.com/users/carnaval/followers","following_url":"https://api.github.com/users/carnaval/following{/other_user}","gists_url":"https://api.github.com/users/carnaval/gists{/gist_id}","starred_url":"https://api.github.com/users/carnaval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carnaval/subscriptions","organizations_url":"https://api.github.com/users/carnaval/orgs","repos_url":"https://api.github.com/users/carnaval/repos","events_url":"https://api.github.com/users/carnaval/events{/privacy}","received_events_url":"https://api.github.com/users/carnaval/received_events","type":"User","site_admin":false},"body":"can you define it for `{T<:Union{Lower,Upper}}(UL::T, ::UniformScaling)` and return `T(ULnew)` at the end ? to save the repetition","created_at":"2015-07-19T20:35:03Z","updated_at":"2015-07-19T20:35:03Z","html_url":"https://github.com/JuliaLang/julia/pull/12218#discussion_r34961826","pull_request_url":"https://api.github.com/repos/JuliaLang/julia/pulls/12218","_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments/34961826"},"html":{"href":"https://github.com/JuliaLang/julia/pull/12218#discussion_r34961826"},"pull_request":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/12218"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/12218","id":40314425,"html_url":"https://github.com/JuliaLang/julia/pull/12218","diff_url":"https://github.com/JuliaLang/julia/pull/12218.diff","patch_url":"https://github.com/JuliaLang/julia/pull/12218.patch","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12218","number":12218,"state":"open","locked":false,"title":"Add + and -(Triangular, UniformScaling) methods","user":{"login":"andreasnoack","id":505001,"avatar_url":"https://avatars.githubusercontent.com/u/505001?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasnoack","html_url":"https://github.com/andreasnoack","followers_url":"https://api.github.com/users/andreasnoack/followers","following_url":"https://api.github.com/users/andreasnoack/following{/other_user}","gists_url":"https://api.github.com/users/andreasnoack/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasnoack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasnoack/subscriptions","organizations_url":"https://api.github.com/users/andreasnoack/orgs","repos_url":"https://api.github.com/users/andreasnoack/repos","events_url":"https://api.github.com/users/andreasnoack/events{/privacy}","received_events_url":"https://api.github.com/users/andreasnoack/received_events","type":"User","site_admin":false},"body":"and move UniformScaling tests to separate file.","created_at":"2015-07-19T20:26:47Z","updated_at":"2015-07-19T20:35:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67edb93b012cea774c3878b57be753bdcc63a724","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaLang/julia/pulls/12218/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/julia/pulls/12218/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12218/comments","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/c1089ebfcc5101c77ecfc110e86931cc5bcdcd1c","head":{"label":"JuliaLang:anj/uniform","ref":"anj/uniform","sha":"c1089ebfcc5101c77ecfc110e86931cc5bcdcd1c","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","created_at":"2011-04-21T07:01:50Z","updated_at":"2015-07-19T15:09:24Z","pushed_at":"2015-07-19T20:27:07Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":202374,"stargazers_count":5773,"watchers_count":5773,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1237,"mirror_url":null,"open_issues_count":1330,"forks":1237,"open_issues":1330,"watchers":5773,"default_branch":"master"}},"base":{"label":"JuliaLang:master","ref":"master","sha":"3b403ab8e9aea99de08a41919ebc77e83576b72f","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":1644196,"name":"julia","full_name":"JuliaLang/julia","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/julia","description":"The Julia Language: A fresh approach to technical computing.","fork":false,"url":"https://api.github.com/repos/JuliaLang/julia","forks_url":"https://api.github.com/repos/JuliaLang/julia/forks","keys_url":"https://api.github.com/repos/JuliaLang/julia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/julia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/julia/teams","hooks_url":"https://api.github.com/repos/JuliaLang/julia/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/julia/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/julia/events","assignees_url":"https://api.github.com/repos/JuliaLang/julia/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/julia/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/julia/tags","blobs_url":"https://api.github.com/repos/JuliaLang/julia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/julia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/julia/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/julia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/julia/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/julia/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/julia/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/julia/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/julia/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/julia/subscription","commits_url":"https://api.github.com/repos/JuliaLang/julia/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/julia/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/julia/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/julia/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/julia/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/julia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/julia/merges","archive_url":"https://api.github.com/repos/JuliaLang/julia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/julia/downloads","issues_url":"https://api.github.com/repos/JuliaLang/julia/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/julia/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/julia/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/julia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/julia/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/julia/releases{/id}","created_at":"2011-04-21T07:01:50Z","updated_at":"2015-07-19T15:09:24Z","pushed_at":"2015-07-19T20:27:07Z","git_url":"git://github.com/JuliaLang/julia.git","ssh_url":"git@github.com:JuliaLang/julia.git","clone_url":"https://github.com/JuliaLang/julia.git","svn_url":"https://github.com/JuliaLang/julia","homepage":"http://julialang.org/","size":202374,"stargazers_count":5773,"watchers_count":5773,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1237,"mirror_url":null,"open_issues_count":1330,"forks":1237,"open_issues":1330,"watchers":5773,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/12218"},"html":{"href":"https://github.com/JuliaLang/julia/pull/12218"},"issue":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/12218"},"comments":{"href":"https://api.github.com/repos/JuliaLang/julia/issues/12218/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/12218/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/julia/pulls/12218/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/julia/statuses/c1089ebfcc5101c77ecfc110e86931cc5bcdcd1c"}}}}