{"action":"created","issue":{"url":"https://api.github.com/repos/tlycken/Interpolations.jl/issues/99","labels_url":"https://api.github.com/repos/tlycken/Interpolations.jl/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/tlycken/Interpolations.jl/issues/99/comments","events_url":"https://api.github.com/repos/tlycken/Interpolations.jl/issues/99/events","html_url":"https://github.com/tlycken/Interpolations.jl/pull/99","id":126316103,"number":99,"title":"RFC: gradient for cubic b-splines, and hessian for all b-splines","user":{"login":"tlycken","id":1550920,"avatar_url":"https://avatars.githubusercontent.com/u/1550920?v=3","gravatar_id":"","url":"https://api.github.com/users/tlycken","html_url":"https://github.com/tlycken","followers_url":"https://api.github.com/users/tlycken/followers","following_url":"https://api.github.com/users/tlycken/following{/other_user}","gists_url":"https://api.github.com/users/tlycken/gists{/gist_id}","starred_url":"https://api.github.com/users/tlycken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlycken/subscriptions","organizations_url":"https://api.github.com/users/tlycken/orgs","repos_url":"https://api.github.com/users/tlycken/repos","events_url":"https://api.github.com/users/tlycken/events{/privacy}","received_events_url":"https://api.github.com/users/tlycken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-01-13T01:06:41Z","updated_at":"2016-01-21T15:21:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tlycken/Interpolations.jl/pulls/99","html_url":"https://github.com/tlycken/Interpolations.jl/pull/99","diff_url":"https://github.com/tlycken/Interpolations.jl/pull/99.diff","patch_url":"https://github.com/tlycken/Interpolations.jl/pull/99.patch"},"body":"This is a WIP implementation for #94.\r\n\r\nI still have to add tests, and the gradients aren't well-behaved for all boundary conditions. Not sure if the problem is with the gradients or (more likely) with the implementations of the boundary conditions in the cubic prefiltering functions.\r\n\r\n```\r\nusing Interpolations, Gadfly\r\nf0(x) = (x.^3 + 3*x.^2 - 15*x - 8) ./ 4\r\ng0(x) = (3*x.^2 + 6*x - 15) ./ 4\r\nf(x) = f0(x-9)\r\ng(x) = g0(x-9)\r\n\r\nix, xs = 1:15, linspace(1,15,100)\r\nitp = interpolate(f(ix), BSpline(Cubic(Line())), OnGrid())\r\n\r\nplot(\r\n    layer(x=ix, y=f(ix), Geom.point),\r\n    layer(x=ix, y=g(ix), Geom.point),\r\n    layer(x=xs, y=[itpc[x] for x in xs], Geom.line),\r\n    layer(x=xs, y=[gradient(itpc, x)[1] for x in xs], Geom.line),\r\n)\r\n```\r\n![plot1](https://cloud.githubusercontent.com/assets/1550920/12281859/ead629bc-b999-11e5-88be-ff451ae7d317.png)\r\n```\r\nitpc = interpolate(f(ix), BSpline(Cubic(Flat())), OnGrid());\r\nplot(\r\n    layer(x=ix, y=f(ix), Geom.point),\r\n    layer(x=ix, y=g(ix), Geom.point),\r\n    layer(x=xs, y=[itpc[x] for x in xs], Geom.line),\r\n    layer(x=xs, y=[gradient(itpc, x)[1] for x in xs], Geom.line),\r\n)\r\n```\r\n![plot2](https://cloud.githubusercontent.com/assets/1550920/12281886/28f7c21e-b99a-11e5-94b8-a113e80a8b00.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tlycken/Interpolations.jl/issues/comments/173604218","html_url":"https://github.com/tlycken/Interpolations.jl/pull/99#issuecomment-173604218","issue_url":"https://api.github.com/repos/tlycken/Interpolations.jl/issues/99","id":173604218,"user":{"login":"spencerlyon2","id":1001948,"avatar_url":"https://avatars.githubusercontent.com/u/1001948?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerlyon2","html_url":"https://github.com/spencerlyon2","followers_url":"https://api.github.com/users/spencerlyon2/followers","following_url":"https://api.github.com/users/spencerlyon2/following{/other_user}","gists_url":"https://api.github.com/users/spencerlyon2/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerlyon2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerlyon2/subscriptions","organizations_url":"https://api.github.com/users/spencerlyon2/orgs","repos_url":"https://api.github.com/users/spencerlyon2/repos","events_url":"https://api.github.com/users/spencerlyon2/events{/privacy}","received_events_url":"https://api.github.com/users/spencerlyon2/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T15:21:57Z","updated_at":"2016-01-21T15:21:57Z","body":"Hey @tlycken sorry for the delay.\r\n\r\nCan you remind me which parts of this PR will introduce untested code?\r\n\r\nOtherwise I think your proposal sounds great"}}