You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which destroys the input `A` but also does not need to allocate as much memory.
137
137
138
-
### Scaled BSplines
138
+
### Scaled BSplines
139
139
140
140
BSplines assume your data is uniformly spaced on the grid `1:N`, or its multidimensional equivalent. If you have data of the form `[f(x) for x in A]`, you need to tell Interpolations about the grid `A`. If `A` is not uniformly spaced, you must use gridded interpolation described below. However, if `A` is a collection of ranges or linspaces, you can use scaled BSplines. This is more efficient because the gridded algorithm does not exploit the uniform spacing. Scaled BSplines can also be used with any spline degree available for BSplines, while gridded interpolation does not currently support quadratic or cubic splines.
141
141
@@ -173,7 +173,7 @@ A = rand(20)
173
173
A_x =collect(1.0:2.0:40.0)
174
174
knots = (A_x,)
175
175
itp =interpolate(knots, A, Gridded(Linear()))
176
-
itp[2.0]
176
+
itp[2.0]
177
177
```
178
178
179
179
The spacing between adjacent samples need not be constant, you can use the syntax
@@ -279,6 +279,38 @@ they ran more than 20 seconds (far longer than any other test). Both
279
279
performed much better in 2d, interestingly. You can see that
280
280
Interpolations wins in every case, sometimes by a very large margin.
281
281
282
+
## Transitioning from Grid.jl
283
+
284
+
Instead of using
285
+
```julia
286
+
yi =InterpGrid(y, BCreflect, InterpQuadratic)
287
+
```
288
+
you should use
289
+
```julia
290
+
yi =interpolate(y, BSpline(Quadratic(Reflect())), OnCell())
Work is very much in progress, but and help is always welcome. If you want to help out but don't know where to start, take a look at issue [#5 - our feature wishlist](https://github.com/JuliaMath/Interpolations.jl/issues/5) =) There is also some [developer documentation](doc/devdocs.md) that may help you understand how things work internally.
0 commit comments