Skip to content

Commit

Permalink
Merge pull request #243 from JuliaMath/mateuszbaran-monotonic-interpo…
Browse files Browse the repository at this point in the history
…lations

basic implementation of monotonic interpolation methods
  • Loading branch information
timholy authored Sep 29, 2018
2 parents 67049ef + 8526363 commit 659215c
Show file tree
Hide file tree
Showing 9 changed files with 535 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Interpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export
# see the following files for further exports:
# b-splines/b-splines.jl
# extrapolation/extrapolation.jl
# monotonic/monotonic.jl
# scaling/scaling.jl

using LinearAlgebra, SparseArrays
Expand Down Expand Up @@ -388,6 +389,7 @@ end
include("nointerp/nointerp.jl")
include("b-splines/b-splines.jl")
include("gridded/gridded.jl")
include("monotonic/monotonic.jl")
include("extrapolation/extrapolation.jl")
include("scaling/scaling.jl")
include("utils.jl")
Expand Down
14 changes: 14 additions & 0 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ function Base.showarg(io::IO, A::ScaledInterpolation{T}, toplevel) where {T}
end
end

function Base.showarg(io::IO, A::MonotonicInterpolation{T, TCoeffs, Tel, Type, K}, toplevel) where {T, TCoeffs, Tel, Type, K}
print(io, "interpolate(")
_showknots(io, A.knots)
print(io, ", ")
Base.showarg(io, A.A, false)
print(io, ", ")
show(io, A.it)
if toplevel
print(io, ") with element type ",T)
else
print(io, ')')
end
end

function Base.showarg(io::IO, A::Extrapolation{T,N,TI,IT,ET}, toplevel) where {T,N,TI,IT,ET}
print(io, "extrapolate(")
Base.showarg(io, A.itp, false)
Expand Down
Loading

0 comments on commit 659215c

Please sign in to comment.