{"action":"created","issue":{"url":"https://api.github.com/repos/Keno/Polynomials.jl/issues/33","labels_url":"https://api.github.com/repos/Keno/Polynomials.jl/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/Keno/Polynomials.jl/issues/33/comments","events_url":"https://api.github.com/repos/Keno/Polynomials.jl/issues/33/events","html_url":"https://github.com/Keno/Polynomials.jl/issues/33","id":124246233,"number":33,"title":"Implementing common polynomials","user":{"login":"mortenpi","id":147757,"avatar_url":"https://avatars.githubusercontent.com/u/147757?v=3","gravatar_id":"","url":"https://api.github.com/users/mortenpi","html_url":"https://github.com/mortenpi","followers_url":"https://api.github.com/users/mortenpi/followers","following_url":"https://api.github.com/users/mortenpi/following{/other_user}","gists_url":"https://api.github.com/users/mortenpi/gists{/gist_id}","starred_url":"https://api.github.com/users/mortenpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortenpi/subscriptions","organizations_url":"https://api.github.com/users/mortenpi/orgs","repos_url":"https://api.github.com/users/mortenpi/repos","events_url":"https://api.github.com/users/mortenpi/events{/privacy}","received_events_url":"https://api.github.com/users/mortenpi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-29T17:52:35Z","updated_at":"2016-01-03T16:39:26Z","closed_at":null,"body":"It would nice if it there would be an easy way to construct some of the standard polynomials (Hermite, Jacobi etc).\r\n\r\nThere isn't actually that much code available at the moment. The currently existing packages that I was able find:\r\n  - https://github.com/pjabardo/Jacobi.jl -- seems maintained but only provides Jacobi polynomials\r\n  - https://github.com/daviddelaat/Orthopolys.jl -- provides a few more, but is broken and not in the package index\r\n\r\nThe question is whether it should be a separate package or would it make sense to have the code here? I don't think it warrants a separate package and having to hunt through different packages to find the necessary function is a headache. It would be nice if you could just do something like\r\n```julia\r\nusing Polynomials\r\np = hermite(3)\r\n```\r\nIf seems reasonable to have them here then I would love to make some PRs at some point."},"comment":{"url":"https://api.github.com/repos/Keno/Polynomials.jl/issues/comments/168516704","html_url":"https://github.com/Keno/Polynomials.jl/issues/33#issuecomment-168516704","issue_url":"https://api.github.com/repos/Keno/Polynomials.jl/issues/33","id":168516704,"user":{"login":"mortenpi","id":147757,"avatar_url":"https://avatars.githubusercontent.com/u/147757?v=3","gravatar_id":"","url":"https://api.github.com/users/mortenpi","html_url":"https://github.com/mortenpi","followers_url":"https://api.github.com/users/mortenpi/followers","following_url":"https://api.github.com/users/mortenpi/following{/other_user}","gists_url":"https://api.github.com/users/mortenpi/gists{/gist_id}","starred_url":"https://api.github.com/users/mortenpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortenpi/subscriptions","organizations_url":"https://api.github.com/users/mortenpi/orgs","repos_url":"https://api.github.com/users/mortenpi/repos","events_url":"https://api.github.com/users/mortenpi/events{/privacy}","received_events_url":"https://api.github.com/users/mortenpi/received_events","type":"User","site_admin":false},"created_at":"2016-01-03T16:39:26Z","updated_at":"2016-01-03T16:39:26Z","body":"The short answer is no really, since what I would like to have is a simple way of constructing these polynomials. So, irrespective of how it would be implemented, it would be nice to have a method like `foo(N, args) -> Poly(...)` for each of the common polynomials available for the user. Also, I think the `Polynomials` package is exactly the right place for such functions, so that the user does not have to hunt for a method, but finds it in the obvious place.\r\n\r\nI took a quick look at the `FastGaussQuadrature` package and I see the following issues with recommending that:\r\n* You would have to be familiar with Gaussian quadrature to use it. I am vaguely but, it is not entirely obvious to me how you should construct the polynomials from the quadrature numbers.\r\n* You only get floating point coefficients that way and hence all kinds of rounding errors, whereas the true coefficients are integers.\r\n* Not entirely sure about this, but I would guess that it is more efficient to calculate the coefficients using a recurrence relation, instead of going through the Gaussian quadrature calculation (even if `FastGaussQuadrature` is very fast).\r\n \r\nOnly after posting this issue I saw #18, which is kind of what I would like to see. However, I don't think that the API there is very good. I would say that `hermite(N)` is more clear than `Orthogonal.H(N)`, for example.\r\n\r\nI would propose the following API:\r\n* Since there are several ones with the same name (physicists'/probabilists' Hermite,  1st and 2nd Chebyshev, etc), then perhaps the best convention for naming the would to just copy Matlab/Mathematica, so that the function names would be\r\n`hermiteH`, `chebyshevT`, `chebyshevU`, `gegenbauerC`, `jacobiP`, `laguerreL`, `legendreP`. However, if there is no ambiguity, then perhaps the last letter can be dropped, since it's ugly, e.g. to have just `jacobi`, `laguerre`, etc. And for the probabilists' Hermite I would suggest `hermiteHe`.\r\n* Each function would have the following signatures:\r\n  - `P(N::Integer) = Poly{Int}([...])`\r\n  - `P(N::Integer, x::Symbol) -> Poly{Int}([...], x)`\r\n\r\nIf a polynomial has arguments (e.g. Jacobi), then the signature would be `P(N, arg1, ..., x)`.\r\n\r\nI think I will start writing this up in code to make a PR, but any thoughts are welcome."}}