JuliaMath / Interpolations.jl

Fast, continuous interpolation of discrete datasets in Julia
http://juliamath.github.io/Interpolations.jl/
Other
523 stars 110 forks source link

Allow for BSpline type construction via chained pipes #536

Closed mkitti closed 9 months ago

mkitti commented 1 year ago

The objective of this pull request is to simplify the API. This is accomplished by 1) Providing default constructors. For example, BSpline(), Linear(), Cubic(), Quadratic() 2) Allow for chaining via pipes.

julia> BSpline(Cubic(Line(OnGrid())))
BSpline(Cubic(Line(OnGrid())))

julia> OnGrid |> Line |> Cubic |> BSpline
BSpline(Cubic(Line(OnGrid())))

julia> Line |> Cubic |> BSpline
BSpline(Cubic(Line()))

julia> Cubic |> BSpline
BSpline(Cubic(Line(OnGrid())))

julia> BSpline()
BSpline(Linear())
codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (f432a7b) 87.74% compared to head (8fc0764) 87.99%. Report is 24 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #536 +/- ## ========================================== + Coverage 87.74% 87.99% +0.24% ========================================== Files 28 28 Lines 1861 1899 +38 ========================================== + Hits 1633 1671 +38 Misses 228 228 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.