Skip to content

Commit 3234494

Browse files
refactor: integral for Akima
1 parent 1e1c615 commit 3234494

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/integrals.jl

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ function _integral(A::QuadraticInterpolation{<:AbstractVector{<:Number}},
6161
t₀ = A.t[idx]
6262
t₁ = A.t[idx + 1]
6363
t₂ = A.t[idx + 2]
64-
6564
t_sq = (t^2) / 3
6665
l₀, l₁, l₂ = get_parameters(A, idx)
6766
Iu₀ = l₀ * t * (t_sq - t * (t₁ + t₂) / 2 + t₁ * t₂)
@@ -91,8 +90,8 @@ function _integral(A::AkimaInterpolation{<:AbstractVector{<:Number}},
9190
idx::Number,
9291
t::Number)
9392
t1 = A.t[idx]
94-
A.u[idx] * (t - t1) + A.b[idx] * ((t - t1)^2 / 2) + A.c[idx] * ((t - t1)^3 / 3) +
95-
A.d[idx] * ((t - t1)^4 / 4)
93+
A.u[idx] * (t - t1) + A.p.b[idx] * ((t - t1)^2 / 2) + A.p.c[idx] * ((t - t1)^3 / 3) +
94+
A.p.d[idx] * ((t - t1)^4 / 4)
9695
end
9796

9897
_integral(A::LagrangeInterpolation, idx::Number, t::Number) = throw(IntegralNotFoundError())

0 commit comments

Comments
 (0)