Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow interpolating AbstractVector{<:AbstractVector} #67

Closed
goretkin opened this issue Jul 1, 2020 · 3 comments
Closed

Allow interpolating AbstractVector{<:AbstractVector} #67

goretkin opened this issue Jul 1, 2020 · 3 comments

Comments

@goretkin
Copy link

goretkin commented Jul 1, 2020

if function (A::LinearInterpolation{<:AbstractVector{<:Number}})(t::Number) were generalized beyond <:Number to perhaps <:AbstractVector then

  1. You could support e.g. Vector{SVector}
  2. function (A::LinearInterpolation{<:AbstractMatrix{<:Number}})(t::Number) could be written in terms of a reinterpret/reshape and the previous definition. The package would have to come to depend on StaticArrays.jl, as far as I can tell, however.

And so on for the interpolation methods that only require vector space operations on the data.

@baggepinnen
Copy link
Contributor

baggepinnen commented Oct 13, 2020

It would be great to have some way of interpolating vector-valued time series, e.g.,

CubicInterpolation(u, t, dims=1)

if u is a matrix with time in the first dimension. For example like this

u_i   = CubicSpline.(eachslice(u; dims), Ref(t))
τ     = t -> [u(t) for u in u_i]

@baggepinnen
Copy link
Contributor

The Vector{SVector} case works after #78.

@andreasnoack
Copy link
Contributor

Fixed by #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants