-
Notifications
You must be signed in to change notification settings - Fork 27
Generalise Clenshaw #112
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
Generalise Clenshaw #112
Conversation
src/libfasttransforms.jl
Outdated
@assert length(c) == length(A) == length(B) == length(C)-1 | ||
@assert length(x) == length(phi0) == length(f) | ||
N = length(c) | ||
if length(A) < N || length(B) < N || length(C) < N |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikaelSlevinsky Do you agree that length(C) < N
is fine? Before it seemed like it required an extra coefficient for no reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because of the DLMF notation for C. You don't need C[0] to get p1 because p_{-1} == 0, but Clenshaw needs C[n] but only A[n-1] and B[n-1] (using C array indexing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could get away with pointing to the right place, but I thought an extra entry to match notation would be reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that makes sense to require allocating an extra entry that is never used. I guess we can do pointer(c)-sizeof(T)
to work around this?
I don't see the coverage |
This is ready for review. OrthogonalPolynomialsQuasi.jl now successfully uses this version of |
Note it's possible to special case Chebyshev T as well: I decided not to move that here as it would mean adding a dependency on LazyArrays.jl, which is still a very in-progress package. |
No idea why coverage isn't working. |
Wait!! I just said it was ready for review, not merge! |
I wanted to look at the coverage first |
But it passed the review! |
Looking at the templates, I think the codecov upload action has changed https://github.com/invenia/PkgTemplates.jl/pull/181/files |
OK good to get it fixed: I've become almost religious about making sure the diff is covered, it just avoids headaches down the line. |
I guess I'll simultaneously up the package version to 0.10 since this adds more "features"? |
Wait, adding some more stuff right now in a new PR. |
No, new features is not a new minor version, only new, breaking features. So only v0.10 if we, say, export |
No description provided.