Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Jul 12, 2024
1 parent cfe1b06 commit bc72f3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/interpolation_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ end
"""
AkimaInterpolation(u, t; extrapolate = false, safetycopy = true)
It is a spline interpolation built from cubic polynomials. It forms a continuously differentiable function. For more details, refer: <https://en.wikipedia.org/wiki/Akima_spline>.
It is a spline interpolation built from cubic polynomials. It forms a continuously differentiable function. For more details, refer: [https://en.wikipedia.org/wiki/Akima_spline](https://en.wikipedia.org/wiki/Akima_spline).
Extrapolation extends the last cubic polynomial on each side.
## Arguments
Expand Down Expand Up @@ -420,7 +420,7 @@ end
"""
BSplineInterpolation(u, t, d, pVecType, knotVecType; extrapolate = false, safetycopy = true)
It is a curve defined by the linear combination of `n` basis functions of degree `d` where `n` is the number of data points. For more information, refer <https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve.html>.
It is a curve defined by the linear combination of `n` basis functions of degree `d` where `n` is the number of data points. For more information, refer [https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve.html](https://pages.mtu.edu/%7Eshene/COURSES/cs3621/NOTES/spline/B-spline/bspline-curve.html).
Extrapolation is a constant polynomial of the end points on each side.
## Arguments
Expand Down Expand Up @@ -550,7 +550,7 @@ end
BSplineApprox(u, t, d, h, pVecType, knotVecType; extrapolate = false, safetycopy = true)
It is a regression based B-spline. The argument choices are the same as the `BSplineInterpolation`, with the additional parameter `h < length(t)` which is the number of control points to use, with smaller `h` indicating more smoothing.
For more information, refer <http://www.cad.zju.edu.cn/home/zhx/GM/009/00-bsia.pdf>.
For more information, refer [http://www.cad.zju.edu.cn/home/zhx/GM/009/00-bsia.pdf](http://www.cad.zju.edu.cn/home/zhx/GM/009/00-bsia.pdf).
Extrapolation is a constant polynomial of the end points on each side.
## Arguments
Expand Down Expand Up @@ -745,7 +745,7 @@ end
PCHIPInterpolation(u, t; extrapolate = false, safetycopy = true)
It is a PCHIP Interpolation, which is a type of `CubicHermiteSpline` where
the derivative values `du` are derived from the input data in such a way that
the derivative values `du` are derived from the input data in such a way that
the interpolation never overshoots the data. See also [here](https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/moler/interp.pdf),
section 3.4.
Expand Down
4 changes: 2 additions & 2 deletions src/interpolation_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function du_PCHIP(u, t)
elseif k == lastindex(t)
s[end - 1], s[end]
else
s[k - 1], s[k]
s[k - 1], s[k]
end

if sₖ₋₁ == 0 && sₖ == 0
Expand All @@ -152,7 +152,7 @@ function du_PCHIP(u, t)
((2 * h[1] + h[2]) * δ[1] - h[1] * δ[2]) / (h[1] + h[2])
elseif k == lastindex(t)
((2 * h[end] + h[end - 1]) * δ[end] - h[end] * δ[end - 1]) /
(h[end] + h[end - 1])
(h[end] + h[end - 1])
else
w₁ = 2h[k] + h[k - 1]
w₂ = h[k] + 2h[k - 1]
Expand Down

0 comments on commit bc72f3b

Please sign in to comment.