{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/27401","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/27401/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/27401/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/27401/events","html_url":"https://github.com/JuliaLang/julia/pull/27401","id":328826092,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjQ1OTg5","number":27401,"title":"WIP: Hilbert/Banach space structures","user":{"login":"ranocha","id":12693098,"node_id":"MDQ6VXNlcjEyNjkzMDk4","avatar_url":"https://avatars0.githubusercontent.com/u/12693098?v=4","gravatar_id":"","url":"https://api.github.com/users/ranocha","html_url":"https://github.com/ranocha","followers_url":"https://api.github.com/users/ranocha/followers","following_url":"https://api.github.com/users/ranocha/following{/other_user}","gists_url":"https://api.github.com/users/ranocha/gists{/gist_id}","starred_url":"https://api.github.com/users/ranocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranocha/subscriptions","organizations_url":"https://api.github.com/users/ranocha/orgs","repos_url":"https://api.github.com/users/ranocha/repos","events_url":"https://api.github.com/users/ranocha/events{/privacy}","received_events_url":"https://api.github.com/users/ranocha/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/JuliaLang/julia/milestones/4","html_url":"https://github.com/JuliaLang/julia/milestone/4","labels_url":"https://api.github.com/repos/JuliaLang/julia/milestones/4/labels","id":96266,"node_id":"MDk6TWlsZXN0b25lOTYyNjY=","number":4,"title":"0.7","description":"An intermediate release feature-equivalent to 1.0 but with deprecations.","creator":{"login":"StefanKarpinski","id":153596,"node_id":"MDQ6VXNlcjE1MzU5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/153596?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":507,"state":"open","created_at":"2012-03-15T04:57:43Z","updated_at":"2018-06-19T16:06:33Z","due_on":"2017-12-15T08:00:00Z","closed_at":null},"comments":59,"created_at":"2018-06-03T12:49:53Z","updated_at":"2018-06-19T17:20:01Z","closed_at":"2018-06-19T08:24:09Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/27401","html_url":"https://github.com/JuliaLang/julia/pull/27401","diff_url":"https://github.com/JuliaLang/julia/pull/27401.diff","patch_url":"https://github.com/JuliaLang/julia/pull/27401.patch"},"body":"This is based on the discussion in #25565 and is work in progress. It is my first pull request to julia. Thus, please be so kind to help me with improving this PR. Of course, it can also be used as a starting point for more experienced people.\r\n\r\nThe discussion in #25565 seems to have reached a consensus about the naming of `norm`, `vecnorm`, and a new `opnorm`. Basically, `norm` should replace the old `vecnorm`, since it is used in most cases to estimate some error or magnitude. Thus, avoiding the cost of the SVD for matrices seems to be good. Moreover, most users are probably not aware of `vecnorm` and just stick to `norm` since it is okay in some cases. The old behaviour of `norm(A::AbstractMatrix, p)`, i.e. the  computation of the operator/matrix norm, is encoded in `opnorm`. Jutho has mentioned that he started implementing some similar behaviour in #25093. However, I can not see any commits or changed files there, so this is started from scratch.\r\n\r\n~~Moreover, the behaviour of generic `norm` functions is changed. Before, it has been along the lines of~~\r\n```\r\nnorm(x, p) = sum(xi->norm(xi)^p, x)^(1/p).\r\n```\r\n~~Since it seems to be more natural (at least for me), I have changed it to~~\r\n```\r\nnorm(x, p) = sum(xi->norm(xi, p)^p, x)^(1/p).\r\n```\r\n~~Thus, given the same coefficients, calling `norm` on a vector, a matrix or a vector of vectors yields the same result, which seems to be consistent in some sense.~~\r\n```\r\njulia> v = [3, -2, 6]\r\n3-element Array{Int64,1}:\r\n  3\r\n -2\r\n  6\r\n\r\njulia> norm(hcat(v,v), 1) == norm(vcat(v,v), 1) == norm([v,v], 1)\r\ntrue\r\n\r\njulia> norm(hcat(v,v), 2) == norm(vcat(v,v), 2) == norm([v,v], 2)\r\ntrue\r\n\r\njulia> norm(hcat(v,v), Inf) == norm(vcat(v,v), Inf) == norm([v,v], Inf)\r\ntrue\r\n```\r\n\r\nIn order to keep `norm` and `dot` (or a new `inner`) consistent, I would also remove `vecdot` and make `dot` recursive, analogously to `norm`, to give a behaviour as `norm(x) = sqrt(dot(x,x))`. The discussion in #25565 about the naming of `dot` does not seem to have reached a complete consensus. If nobody objected strongly, I would implement the basis inner/dot/scalar product as `inner` and add `const dot = inner` as proposed by Stefan Karpinski.\r\n\r\nThis allows very generic code. One application I have in mind are multi-dimensional PDEs. For example, I would like to discretise a function in a cuboid as right-hand side for a Poisson problem. A straightforward way would be to use coefficients in an `b = Array{Float64,3}`. Then, I have to solve a linear system `A \\ b`, where `A` is a linear operator acting as negative Laplacian. If `dot` and `norm` work as described above, I could simply use IterativeSolvers.jl for this task, since `A` is symmetric and positive definite."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/398477838","html_url":"https://github.com/JuliaLang/julia/pull/27401#issuecomment-398477838","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/27401","id":398477838,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODQ3NzgzOA==","user":{"login":"ranocha","id":12693098,"node_id":"MDQ6VXNlcjEyNjkzMDk4","avatar_url":"https://avatars0.githubusercontent.com/u/12693098?v=4","gravatar_id":"","url":"https://api.github.com/users/ranocha","html_url":"https://github.com/ranocha","followers_url":"https://api.github.com/users/ranocha/followers","following_url":"https://api.github.com/users/ranocha/following{/other_user}","gists_url":"https://api.github.com/users/ranocha/gists{/gist_id}","starred_url":"https://api.github.com/users/ranocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranocha/subscriptions","organizations_url":"https://api.github.com/users/ranocha/orgs","repos_url":"https://api.github.com/users/ranocha/repos","events_url":"https://api.github.com/users/ranocha/events{/privacy}","received_events_url":"https://api.github.com/users/ranocha/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T17:20:01Z","updated_at":"2018-06-19T17:20:01Z","author_association":"CONTRIBUTOR","body":"Thanks!"}}
{"actor":{"display_login":"ranocha"}}