Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Associated Legendre Polynomials #101

Closed
raminammour opened this issue Mar 30, 2020 · 4 comments
Closed

Associated Legendre Polynomials #101

raminammour opened this issue Mar 30, 2020 · 4 comments

Comments

@raminammour
Copy link

Hello,

I was evaluating some spherical harmonics implementations and found the implementation here to be competitive with GSL for example (which is great!). Looking at the function sphevaluate it is easy to see that hidden inside would be an implementation of the associated Legendre polynomials.

The codes does a few extra flops (division/multiplication by pi, cos/sin) and the usual obscure normalization factors :)

It would be great the associated Legendre polynomial can be pulled out, and exported from this package. Maybe even contributed to some other julia package (SpecialFunctions?). It would be a very competitive pure julia implementation.

Any help is appreciated, and thanks for a nice package,

Cheers!

@raminammour
Copy link
Author

Sorry about the noise, just found: JuliaMath/SpecialFunctions.jl#136

@dlfivefifty
Copy link
Member

That PR looks like it’s going nowhere. If you wanted to pull this out and make a new PR that might fair better.

@raminammour
Copy link
Author

Sorry, I meant this one JuliaMath/SpecialFunctions.jl#175, which looks more promising :)

@MikaelSlevinsky
Copy link
Member

The Clenshaw--Smith recurrence relation (evaluating expansions with bases satisfying three-term recurrence relations) is a perfect candidate for vectorization since it costs O(mn) flops but only requires O(m+n) storage to evaluate an m-term expansion at n points. One day, I may add such generic code in the C library this wraps using Intel SIMD so that they're ccallable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants