为了提高运行速度,我希望在写函数的时候,声明每个变量的类型。其中一个变量为插值函数。
using Interpolation
typeof(LinearInterpolation([1.,2,3],[1.,2,3]))
我通过如上方式,查看LinearInterpolation
返回的类型。结果非常复杂,我看不懂:
Interpolations.Extrapolation{Float64, 1, Interpolations.GriddedInterpolation{Float64, 1, Float64, Gridded{Linear{Throw{OnGrid}}}, Tuple{Vector{Float64}}}, Gridded{Linear{Throw{OnGrid}}}, Throw{Nothing}}
那么,我到底如何声明这是插值函数呢?