{"action":"opened","number":1823,"pull_request":{"url":"https://api.github.com/repos/chebfun/chebfun/pulls/1823","id":67038343,"html_url":"https://github.com/chebfun/chebfun/pull/1823","diff_url":"https://github.com/chebfun/chebfun/pull/1823.diff","patch_url":"https://github.com/chebfun/chebfun/pull/1823.patch","issue_url":"https://api.github.com/repos/chebfun/chebfun/issues/1823","number":1823,"state":"open","locked":false,"title":"Feature poly transforms","user":{"login":"ajt60gaibb","id":1814063,"avatar_url":"https://avatars.githubusercontent.com/u/1814063?v=3","gravatar_id":"","url":"https://api.github.com/users/ajt60gaibb","html_url":"https://github.com/ajt60gaibb","followers_url":"https://api.github.com/users/ajt60gaibb/followers","following_url":"https://api.github.com/users/ajt60gaibb/following{/other_user}","gists_url":"https://api.github.com/users/ajt60gaibb/gists{/gist_id}","starred_url":"https://api.github.com/users/ajt60gaibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajt60gaibb/subscriptions","organizations_url":"https://api.github.com/users/ajt60gaibb/orgs","repos_url":"https://api.github.com/users/ajt60gaibb/repos","events_url":"https://api.github.com/users/ajt60gaibb/events{/privacy}","received_events_url":"https://api.github.com/users/ajt60gaibb/received_events","type":"User","site_admin":false},"body":"This pull request contains: \r\n\r\n1) A new algorithm for `cheb2leg` and `leg2cheb`, \r\n2) Fast algorithms for `cheb2jac` and `cheb2jac` (currently only a direct approach is implemented in development), and \r\n3) A fast algorithm for `jac2jac` (currently only possible via `cheb2jac(jac2cheb(v,a,b),g,d)`, which is unstable).  \r\n\r\nIt based on a paper by myself, Marcus Webb (@marcusdavidwebb) and Sheehan Olver (@dlfivefifty): `Fast polynomials transforms based on Toeplitz and Hankel matrices`, to be submitted soon. \r\n\r\n1) `cheb2leg` and `leg2cheb`: \r\nThe new algorithm is slightly (2 or 3 times) faster: \r\n```\r\n% git branch development: \r\nv = randn(10000, 1); \r\ntic, w = leg2cheb( v ); toc \r\ntic, w = cheb2leg( v ); toc \r\nElapsed time is 0.124428 seconds.\r\nElapsed time is 0.169971 seconds.\r\n```\r\n```\r\n% git branch feature-poly-transforms: \r\nv = randn(10000, 1); \r\ntic, w = leg2cheb( v ); toc \r\ntic, w = cheb2leg( v ); toc \r\nElapsed time is 0.053217 seconds.\r\nElapsed time is 0.088737 seconds.\r\n```\r\nand\r\n```\r\n% git branch development: \r\nv = randn(100000, 1); \r\ntic, w = leg2cheb( v ); toc \r\ntic, w = cheb2leg( v ); toc \r\nElapsed time is 1.123032 seconds.\r\nElapsed time is 2.782115 seconds.\r\n```\r\n```\r\n% git branch feature-poly-transforms: \r\nv = randn(100000, 1); \r\ntic, w = leg2cheb( v ); toc \r\ntic, w = cheb2leg( v ); toc \r\nElapsed time is 0.413516 seconds.\r\nElapsed time is 1.074678 seconds.\r\n```\r\nThe new algorithm is more accurate for inputs that do not have decay (because the fast algorithm does not rely on value space). \r\n\r\n2) `cheb2jac` and `cheb2jac`: \r\nThe implementation is currently based on the direct approach.  In this pull request, the algorithm uses the direct approach for `N<=512` and a fast algorithm otherwise. (Timings to be improved below.)\r\n```\r\nv = randn(100000, 1); \r\ntic, w = jac2cheb( v, .1, .4 ); toc \r\ntic, w = cheb2jac( v, pi/3, sqrt(2)/2 ); toc \r\nElapsed time is 4.157954 seconds.\r\nElapsed time is 2.779676 seconds.\r\n```\r\n(I have not done a comparison with Mikael's `jac2cheb` and `cheb2jac` algorithm here because his algorithm is not implemented in Chebfun.)\r\n\r\n3) `jac2jac`: \r\nThis is a fast algorithm for converting between different Jacobi expansions and is a new proposed command. (Timings to be improved below.)\r\n```\r\nv = randn(100000, 1); \r\ntic, w = jac2jac( v, pi/3, sqrt(2)/2, 1.1, -.2 ); toc\r\nElapsed time is 4.182586 seconds.\r\n```\r\n\r\nWhile testing it was impressive how many commands are using Legendre technology. I hope this pull request continues that trend. ","created_at":"2016-04-19T15:23:44Z","updated_at":"2016-04-19T15:23:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chebfun/chebfun/pulls/1823/commits","review_comments_url":"https://api.github.com/repos/chebfun/chebfun/pulls/1823/comments","review_comment_url":"https://api.github.com/repos/chebfun/chebfun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chebfun/chebfun/issues/1823/comments","statuses_url":"https://api.github.com/repos/chebfun/chebfun/statuses/1741e2fa0253f0f03c17f3c39bea7254a87170ed","head":{"label":"chebfun:feature-poly-transforms","ref":"feature-poly-transforms","sha":"1741e2fa0253f0f03c17f3c39bea7254a87170ed","user":{"login":"chebfun","id":3082993,"avatar_url":"https://avatars.githubusercontent.com/u/3082993?v=3","gravatar_id":"","url":"https://api.github.com/users/chebfun","html_url":"https://github.com/chebfun","followers_url":"https://api.github.com/users/chebfun/followers","following_url":"https://api.github.com/users/chebfun/following{/other_user}","gists_url":"https://api.github.com/users/chebfun/gists{/gist_id}","starred_url":"https://api.github.com/users/chebfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chebfun/subscriptions","organizations_url":"https://api.github.com/users/chebfun/orgs","repos_url":"https://api.github.com/users/chebfun/repos","events_url":"https://api.github.com/users/chebfun/events{/privacy}","received_events_url":"https://api.github.com/users/chebfun/received_events","type":"Organization","site_admin":false},"repo":{"id":7893220,"name":"chebfun","full_name":"chebfun/chebfun","owner":{"login":"chebfun","id":3082993,"avatar_url":"https://avatars.githubusercontent.com/u/3082993?v=3","gravatar_id":"","url":"https://api.github.com/users/chebfun","html_url":"https://github.com/chebfun","followers_url":"https://api.github.com/users/chebfun/followers","following_url":"https://api.github.com/users/chebfun/following{/other_user}","gists_url":"https://api.github.com/users/chebfun/gists{/gist_id}","starred_url":"https://api.github.com/users/chebfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chebfun/subscriptions","organizations_url":"https://api.github.com/users/chebfun/orgs","repos_url":"https://api.github.com/users/chebfun/repos","events_url":"https://api.github.com/users/chebfun/events{/privacy}","received_events_url":"https://api.github.com/users/chebfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chebfun/chebfun","description":"Chebfun:  numerical computing with functions.","fork":false,"url":"https://api.github.com/repos/chebfun/chebfun","forks_url":"https://api.github.com/repos/chebfun/chebfun/forks","keys_url":"https://api.github.com/repos/chebfun/chebfun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chebfun/chebfun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chebfun/chebfun/teams","hooks_url":"https://api.github.com/repos/chebfun/chebfun/hooks","issue_events_url":"https://api.github.com/repos/chebfun/chebfun/issues/events{/number}","events_url":"https://api.github.com/repos/chebfun/chebfun/events","assignees_url":"https://api.github.com/repos/chebfun/chebfun/assignees{/user}","branches_url":"https://api.github.com/repos/chebfun/chebfun/branches{/branch}","tags_url":"https://api.github.com/repos/chebfun/chebfun/tags","blobs_url":"https://api.github.com/repos/chebfun/chebfun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chebfun/chebfun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chebfun/chebfun/git/refs{/sha}","trees_url":"https://api.github.com/repos/chebfun/chebfun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chebfun/chebfun/statuses/{sha}","languages_url":"https://api.github.com/repos/chebfun/chebfun/languages","stargazers_url":"https://api.github.com/repos/chebfun/chebfun/stargazers","contributors_url":"https://api.github.com/repos/chebfun/chebfun/contributors","subscribers_url":"https://api.github.com/repos/chebfun/chebfun/subscribers","subscription_url":"https://api.github.com/repos/chebfun/chebfun/subscription","commits_url":"https://api.github.com/repos/chebfun/chebfun/commits{/sha}","git_commits_url":"https://api.github.com/repos/chebfun/chebfun/git/commits{/sha}","comments_url":"https://api.github.com/repos/chebfun/chebfun/comments{/number}","issue_comment_url":"https://api.github.com/repos/chebfun/chebfun/issues/comments{/number}","contents_url":"https://api.github.com/repos/chebfun/chebfun/contents/{+path}","compare_url":"https://api.github.com/repos/chebfun/chebfun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chebfun/chebfun/merges","archive_url":"https://api.github.com/repos/chebfun/chebfun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chebfun/chebfun/downloads","issues_url":"https://api.github.com/repos/chebfun/chebfun/issues{/number}","pulls_url":"https://api.github.com/repos/chebfun/chebfun/pulls{/number}","milestones_url":"https://api.github.com/repos/chebfun/chebfun/milestones{/number}","notifications_url":"https://api.github.com/repos/chebfun/chebfun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chebfun/chebfun/labels{/name}","releases_url":"https://api.github.com/repos/chebfun/chebfun/releases{/id}","deployments_url":"https://api.github.com/repos/chebfun/chebfun/deployments","created_at":"2013-01-29T13:59:55Z","updated_at":"2016-04-10T10:44:05Z","pushed_at":"2016-04-19T14:52:16Z","git_url":"git://github.com/chebfun/chebfun.git","ssh_url":"git@github.com:chebfun/chebfun.git","clone_url":"https://github.com/chebfun/chebfun.git","svn_url":"https://github.com/chebfun/chebfun","homepage":"http://www.chebfun.org/","size":21937,"stargazers_count":95,"watchers_count":95,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":195,"forks":21,"open_issues":195,"watchers":95,"default_branch":"development"}},"base":{"label":"chebfun:development","ref":"development","sha":"438aa659cffa10396f4356a77dfea62795d1d16a","user":{"login":"chebfun","id":3082993,"avatar_url":"https://avatars.githubusercontent.com/u/3082993?v=3","gravatar_id":"","url":"https://api.github.com/users/chebfun","html_url":"https://github.com/chebfun","followers_url":"https://api.github.com/users/chebfun/followers","following_url":"https://api.github.com/users/chebfun/following{/other_user}","gists_url":"https://api.github.com/users/chebfun/gists{/gist_id}","starred_url":"https://api.github.com/users/chebfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chebfun/subscriptions","organizations_url":"https://api.github.com/users/chebfun/orgs","repos_url":"https://api.github.com/users/chebfun/repos","events_url":"https://api.github.com/users/chebfun/events{/privacy}","received_events_url":"https://api.github.com/users/chebfun/received_events","type":"Organization","site_admin":false},"repo":{"id":7893220,"name":"chebfun","full_name":"chebfun/chebfun","owner":{"login":"chebfun","id":3082993,"avatar_url":"https://avatars.githubusercontent.com/u/3082993?v=3","gravatar_id":"","url":"https://api.github.com/users/chebfun","html_url":"https://github.com/chebfun","followers_url":"https://api.github.com/users/chebfun/followers","following_url":"https://api.github.com/users/chebfun/following{/other_user}","gists_url":"https://api.github.com/users/chebfun/gists{/gist_id}","starred_url":"https://api.github.com/users/chebfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chebfun/subscriptions","organizations_url":"https://api.github.com/users/chebfun/orgs","repos_url":"https://api.github.com/users/chebfun/repos","events_url":"https://api.github.com/users/chebfun/events{/privacy}","received_events_url":"https://api.github.com/users/chebfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chebfun/chebfun","description":"Chebfun:  numerical computing with functions.","fork":false,"url":"https://api.github.com/repos/chebfun/chebfun","forks_url":"https://api.github.com/repos/chebfun/chebfun/forks","keys_url":"https://api.github.com/repos/chebfun/chebfun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chebfun/chebfun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chebfun/chebfun/teams","hooks_url":"https://api.github.com/repos/chebfun/chebfun/hooks","issue_events_url":"https://api.github.com/repos/chebfun/chebfun/issues/events{/number}","events_url":"https://api.github.com/repos/chebfun/chebfun/events","assignees_url":"https://api.github.com/repos/chebfun/chebfun/assignees{/user}","branches_url":"https://api.github.com/repos/chebfun/chebfun/branches{/branch}","tags_url":"https://api.github.com/repos/chebfun/chebfun/tags","blobs_url":"https://api.github.com/repos/chebfun/chebfun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chebfun/chebfun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chebfun/chebfun/git/refs{/sha}","trees_url":"https://api.github.com/repos/chebfun/chebfun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chebfun/chebfun/statuses/{sha}","languages_url":"https://api.github.com/repos/chebfun/chebfun/languages","stargazers_url":"https://api.github.com/repos/chebfun/chebfun/stargazers","contributors_url":"https://api.github.com/repos/chebfun/chebfun/contributors","subscribers_url":"https://api.github.com/repos/chebfun/chebfun/subscribers","subscription_url":"https://api.github.com/repos/chebfun/chebfun/subscription","commits_url":"https://api.github.com/repos/chebfun/chebfun/commits{/sha}","git_commits_url":"https://api.github.com/repos/chebfun/chebfun/git/commits{/sha}","comments_url":"https://api.github.com/repos/chebfun/chebfun/comments{/number}","issue_comment_url":"https://api.github.com/repos/chebfun/chebfun/issues/comments{/number}","contents_url":"https://api.github.com/repos/chebfun/chebfun/contents/{+path}","compare_url":"https://api.github.com/repos/chebfun/chebfun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chebfun/chebfun/merges","archive_url":"https://api.github.com/repos/chebfun/chebfun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chebfun/chebfun/downloads","issues_url":"https://api.github.com/repos/chebfun/chebfun/issues{/number}","pulls_url":"https://api.github.com/repos/chebfun/chebfun/pulls{/number}","milestones_url":"https://api.github.com/repos/chebfun/chebfun/milestones{/number}","notifications_url":"https://api.github.com/repos/chebfun/chebfun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chebfun/chebfun/labels{/name}","releases_url":"https://api.github.com/repos/chebfun/chebfun/releases{/id}","deployments_url":"https://api.github.com/repos/chebfun/chebfun/deployments","created_at":"2013-01-29T13:59:55Z","updated_at":"2016-04-10T10:44:05Z","pushed_at":"2016-04-19T14:52:16Z","git_url":"git://github.com/chebfun/chebfun.git","ssh_url":"git@github.com:chebfun/chebfun.git","clone_url":"https://github.com/chebfun/chebfun.git","svn_url":"https://github.com/chebfun/chebfun","homepage":"http://www.chebfun.org/","size":21937,"stargazers_count":95,"watchers_count":95,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":195,"forks":21,"open_issues":195,"watchers":95,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/chebfun/chebfun/pulls/1823"},"html":{"href":"https://github.com/chebfun/chebfun/pull/1823"},"issue":{"href":"https://api.github.com/repos/chebfun/chebfun/issues/1823"},"comments":{"href":"https://api.github.com/repos/chebfun/chebfun/issues/1823/comments"},"review_comments":{"href":"https://api.github.com/repos/chebfun/chebfun/pulls/1823/comments"},"review_comment":{"href":"https://api.github.com/repos/chebfun/chebfun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chebfun/chebfun/pulls/1823/commits"},"statuses":{"href":"https://api.github.com/repos/chebfun/chebfun/statuses/1741e2fa0253f0f03c17f3c39bea7254a87170ed"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":685,"deletions":452,"changed_files":8}}