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

Move the interpolating polynomials to a separate package #2

Open
pwl opened this issue May 8, 2014 · 6 comments
Open

Move the interpolating polynomials to a separate package #2

pwl opened this issue May 8, 2014 · 6 comments

Comments

@pwl
Copy link
Contributor

pwl commented May 8, 2014

Remove the definitions of InterpolateAt, InterpolateDerivativeAt etc. from DASSL.jl and move them to the InterPoly.jl package (or other suitable Julia package).

@pwl pwl added the enhancement label May 8, 2014
@ChrisRackauckas
Copy link
Member

I just looked in there: that's just a standard Legrangian interpolation, right? Is there really no Julia package which already does this that you can just call? How does Polynomials.jl fare for this?

If there is none, I agree this should be spawned off to another package. But it should be cleaned up a little: it should generate a polynomial type with an interpolation function on it, so that way getting more than one interpolated value is cheap (and only 1 interpolated value will be about the same cost).

@pwl
Copy link
Contributor Author

pwl commented Nov 7, 2016

Constructing a polynomial object every iteration would be costly and the Lagrange extrapolation can be done in place and simultaneously for the function and its derivative (currently they are computed separately, which means there is a room for improvement there). This method could be potentially used by other integrators but I think it is a little bit too small by itself to warrant a separate package. One option would be to have a general package with reusable code like that, which could be moved to a proper package once it matures, but having a helpers.jl package is not very elegant.

@ChrisRackauckas
Copy link
Member

Ahh, I looked through the code again. I misread it the first time as you were constructing the polynomial, instead of directly doing the interpolation at the point. It think that's a useful function, but agree that I don't know where you'd put it.

@pwl
Copy link
Contributor Author

pwl commented Nov 7, 2016

Well, what about a single place, like wiki or docs, where we would put an info on functions that could be moved out to a separate package? This way the next person who codes a similar algorithm would just move it to a separate package instead of copying it or re-implementing it.

@ChrisRackauckas
Copy link
Member

ChrisRackauckas commented Nov 7, 2016

I plan on having a separate devdocs for explaining the interfaces and utility functions (essentially, a summary of the conclusion when we get it). This could be added as a utility function (in DiffEqBase?) and documented there.

@pwl
Copy link
Contributor Author

pwl commented Nov 7, 2016

That's a good idea. (although if we all start adding random functions to DiffEqBase it might end up being too cluttered)

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

No branches or pull requests

2 participants