Skip to content

Commit 659215c

Browse files
authored
Merge pull request #243 from JuliaMath/mateuszbaran-monotonic-interpolations
basic implementation of monotonic interpolation methods
2 parents 67049ef + 8526363 commit 659215c

File tree

9 files changed

+535
-2
lines changed

9 files changed

+535
-2
lines changed

src/Interpolations.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export
2828
# see the following files for further exports:
2929
# b-splines/b-splines.jl
3030
# extrapolation/extrapolation.jl
31+
# monotonic/monotonic.jl
3132
# scaling/scaling.jl
3233

3334
using LinearAlgebra, SparseArrays
@@ -388,6 +389,7 @@ end
388389
include("nointerp/nointerp.jl")
389390
include("b-splines/b-splines.jl")
390391
include("gridded/gridded.jl")
392+
include("monotonic/monotonic.jl")
391393
include("extrapolation/extrapolation.jl")
392394
include("scaling/scaling.jl")
393395
include("utils.jl")

src/io.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ function Base.showarg(io::IO, A::ScaledInterpolation{T}, toplevel) where {T}
4444
end
4545
end
4646

47+
function Base.showarg(io::IO, A::MonotonicInterpolation{T, TCoeffs, Tel, Type, K}, toplevel) where {T, TCoeffs, Tel, Type, K}
48+
print(io, "interpolate(")
49+
_showknots(io, A.knots)
50+
print(io, ", ")
51+
Base.showarg(io, A.A, false)
52+
print(io, ", ")
53+
show(io, A.it)
54+
if toplevel
55+
print(io, ") with element type ",T)
56+
else
57+
print(io, ')')
58+
end
59+
end
60+
4761
function Base.showarg(io::IO, A::Extrapolation{T,N,TI,IT,ET}, toplevel) where {T,N,TI,IT,ET}
4862
print(io, "extrapolate(")
4963
Base.showarg(io, A.itp, false)

0 commit comments

Comments
 (0)