-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
refactor: methods for higher dim arrays #348
base: master
Are you sure you want to change the base?
Conversation
sathvikbhagavan
commented
Oct 17, 2024
•
edited
Loading
edited
- QuadraticInterpolation
- LagrangeInterpolation
- AkimaInterpolation
- ConstantInterpolation
- QuadraticSpline
- CubicHermiteSpline
- QuinticHermiteSpline
- Derivatives
- Integrals
- Show methods for higher dim arrays
- Add tests for all
This adds methods for BSplines: #349 |
Cool, I will add the rest. |
ed9b61d
to
bae3edc
Compare
There is one more issue that needs to be added to the checklist. The show methods fail when in |
Yes, I am aware about that. Added it to the checklist. |
3234494
to
d6a0824
Compare
Do we need to write different dispatches for BSplineInterpolation(u::AbstractVector{<:AbstractVector}, args...; kw...) = BSplineInterpolation(reduce(hcat, u), args...; kw...)
# Same for BSplineApprox |
|
But in existing methods we do it anyways. For example in the method for
And the complexity of this reduce(hcat) is the same as reduce(hcat, u) .Similarly for BSplines: we do a matrix division right here:
which will need a reduce(hcat) over all vector of vectors. Meanwhile, all of this happens during the construction of the interpolation function. So we donot loose on performance while actually interpolating. |
Doing it once for construction is fine. But note that only works for the linear algebra. If you do that, you will change the type of the output, so something like a ComponentArray will loose its type and structure. |