Skip to content

Commit

Permalink
Merge branch 'stable_quadratic_spline' of https://github.com/SouthEnd…
Browse files Browse the repository at this point in the history
…Music/DataInterpolations.jl into stable_quadratic_spline
  • Loading branch information
SouthEndMusic committed Nov 12, 2024
2 parents 26467e1 + 2cca631 commit f4c03b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parameter_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ struct QuadraticSplineParameterCache{pType}
β::pType
end

function QuadraticSplineParameterCache(u, t, k, c, N, cache_parameters)
function QuadraticSplineParameterCache(u, t, k, c, sc, cache_parameters)
if cache_parameters
parameters = quadratic_spline_parameters.(
Ref(u), Ref(t), Ref(k), Ref(c), Ref(N), 1:(length(t) - 1))
Ref(u), Ref(t), Ref(k), Ref(c), Ref(sc), 1:(length(t) - 1))
α, β = collect.(eachrow(stack(collect.(parameters))))
QuadraticSplineParameterCache(α, β)
else
# Compute parameters once to infer types
α, β = quadratic_spline_parameters(u, t, k, c, N, 1)
α, β = quadratic_spline_parameters(u, t, k, c, sc, 1)
QuadraticSplineParameterCache(typeof(α)[], typeof(β)[])
end
end
Expand Down

0 comments on commit f4c03b8

Please sign in to comment.