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

Add SmoothedConstantInterpolation #367

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

SouthEndMusic
Copy link
Member

@SouthEndMusic SouthEndMusic commented Nov 25, 2024

Fixes #364.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

using DataInterpolations
using Plots
using Random

N = 10
Random.seed!(8)
u = rand(N)
t = cumsum(rand(N))
A1 = ConstantInterpolation(u, t)

p = plot()
plot!(A1)

for d_max in 00.05:0.05:0.2
    A2 = SmoothedConstantInterpolation(u, t, cache_parameters = true; d_max)
    plot!(A2)
end

p

figure

@SouthEndMusic SouthEndMusic marked this pull request as draft November 25, 2024 15:27
@SouthEndMusic SouthEndMusic marked this pull request as ready for review November 26, 2024 11:43
@SouthEndMusic SouthEndMusic marked this pull request as draft November 26, 2024 11:44
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.

Smooth equivalent of ConstantInterpolation in terms of integral
1 participant