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

Partial derivatives for 2D splines #88

Merged
merged 3 commits into from
Mar 8, 2023

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Feb 1, 2022

A bunch of whitespace changes are introduced by the VScode plugin, sorry about these, but hopefully these will improve readability.

The main change introduced here is the ability to compute partial derivatives of 2D splines.

julia> x = Vector{Float64}(1:4); y = Vector{Float64}(1:5); z = (x.^2) * (y.^3)'
4×5 Matrix{Float64}:
  1.0    8.0   27.0    64.0   125.0
  4.0   32.0  108.0   256.0   500.0
  9.0   72.0  243.0   576.0  1125.0
 16.0  128.0  432.0  1024.0  2000.0

julia> s = Spline2D(x, y, z);

julia> derivative(s, 1, 1, nuy=1, nux=0) # 3x^2y^2
3.000000000000028

julia> derivative(s, 1, 1, nuy=0, nux=1) # 2xy^3
1.9999999999999887

julia> derivative(s, 1, 1, nuy=1, nux=1) # 6xy^2
6.000000000000547

I've also taken the liberty to refactor the tests by introducing testsets.

@jishnub
Copy link
Contributor Author

jishnub commented Apr 12, 2022

@kbarbary could you have a look at this?

@jishnub
Copy link
Contributor Author

jishnub commented May 4, 2022

Gentle bump cc @kaarthiksundar

@jishnub
Copy link
Contributor Author

jishnub commented Jun 17, 2022

@Moelf would you mind taking a look at this?

@Moelf
Copy link

Moelf commented Jun 17, 2022

looks fine to me but again I'm not super familiar with the code base

@jishnub
Copy link
Contributor Author

jishnub commented Mar 8, 2023

I've reverted the whitespace and testset changes to make this PR much easier to review. I wonder who would be the right person to approach for this?

@kaarthiksundar kaarthiksundar merged commit 7bc00ab into kbarbary:master Mar 8, 2023
@jishnub jishnub deleted the 2dderiv branch March 9, 2023 02:18
@jishnub jishnub restored the 2dderiv branch March 9, 2023 04:42
@kaarthiksundar
Copy link
Collaborator

@jishnub Tagged a new version. Sorry got busy last week.

@jishnub
Copy link
Contributor Author

jishnub commented Mar 17, 2023

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants