1d, 2d interpolation functions.
See more:
Note: Smile interpolators also extrapolate values outside range.
You provide data as sequence or double array.
You provide two sequences:
xs
- x axis coorditanes, strictly monotonic (increasing)ys
- function valuesSee [[kriging-spline-interpolator]]
This is grid based interpolation.
xs
- x axis coordinates, strictly monotonic (increasing)ys
- y axis coordinates, strictly monotonic (increasing)vs
- sequence of sequences of values (2d array) for all possible pairs. Array is column-wise: [ [first column] [second column] ...]
.See [[cubic-2d-interpolator]]
Examples below use following functions:
1d, 2d interpolation functions. See more: * [Apache Commons Math](http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/analysis/interpolation/package-summary.html) * [Smile Interpolation](http://haifengl.github.io/smile/api/java/smile/interpolation/package-summary.html * [SSJ B-Spline](http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1functionfit_1_1BSpline.html) Note: Smile interpolators also extrapolate values outside range. ### Input data You provide data as sequence or double array. #### 1d interpolation You provide two sequences: * `xs` - x axis coorditanes, strictly monotonic (increasing) * `ys` - function values See [[kriging-spline-interpolator]] #### 2d interpolation This is grid based interpolation. * `xs` - x axis coordinates, strictly monotonic (increasing) * `ys` - y axis coordinates, strictly monotonic (increasing) * `vs` - sequence of sequences of values (2d array) for all possible pairs. Array is column-wise: `[ [first column] [second column] ...]`. See [[cubic-2d-interpolator]] ### Examples Examples below use following functions: #### 1d ![1d](images/i/1d.png) #### 2d ![2d](images/i/2d.jpg)
(akima-spline xs ys)
Create cubic spline interpolator using Akima algorithm. Minimum number of points: 5
xs[n] < xs[n+1] for all n.
Source: Apache Commons Math.
Create cubic spline interpolator using Akima algorithm. Minimum number of points: 5 xs[n] < xs[n+1] for all n. Source: Apache Commons Math.
(b-spline xs ys)
(b-spline degree-or-knots xs ys)
B-spline for given points, default degree equals samples count - 1.
B-spline for given points, default degree equals samples count - 1. [more](http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1functionfit_1_1BSpline.html)
(b-spline-interp xs ys)
(b-spline-interp degree xs ys)
(b-spline-interp degree h xs ys)
B-spline interpolation.
See:
B-spline interpolation. See: * 2 or 3 arity - exact interpolation using b-spline, default degree = 3 ([more](http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1functionfit_1_1BSpline.html#a364fa9e72b7cdc0457140d79b2249530)) * 4 arity - approximated b-spline interpolation with precision parameter `h` ([more](http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1functionfit_1_1BSpline.html#a0892c41fc64e14a58e7f17208e05289a))
(bicubic xs ys vs)
Bicubic 2d.
Grid based.
Source: Apache Commons Math.
Bicubic 2d. Grid based. Source: Apache Commons Math.
(bicubic-smile xs ys vs)
Bicubic 2d.
Grid based.
Source: Smile.
Bicubic 2d. Grid based. Source: Smile.
(bilinear xs ys vs)
Bilinear 2d.
Grid based.
Source: Smile.
Bilinear 2d. Grid based. Source: Smile.
(cubic-2d xs ys vs)
Cubic spline 2d.
Grid based.
Source: Smile.
Cubic spline 2d. Grid based. Source: Smile.
(cubic-spline xs ys)
Cubic spline interpolation.
Source: Smile.
Cubic spline interpolation. Source: Smile.
(divided-difference xs ys)
Create Divided Difference Algorithm for interpolation.
Source: Apache Commons Math.
Create Divided Difference Algorithm for interpolation. Source: Apache Commons Math.
Map of 1d interpolation functions
Map of 1d interpolation functions
Map of 2d interpolation functions
Map of 2d interpolation functions
(kriging-spline xs ys)
Kriging interpolation.
Source: Smile.
Kriging interpolation. Source: Smile.
(linear xs ys)
Create Divided Difference Algorithm for inqterpolation.
Source: Apache Commons Math.
Create Divided Difference Algorithm for inqterpolation. Source: Apache Commons Math.
(linear-smile xs ys)
Linear interpolation from Smile library.
Source: Smile.
Linear interpolation from Smile library. Source: Smile.
(loess xs ys)
(loess bandwidth robustness-iters xs ys)
(loess bandwidth robustness-iters accuracy xs ys)
Local Regression Algorithm
Source: Apache Commons Math.
Local Regression Algorithm * bandwidth: 0.2-1.0 (optimal: 0.25-0.5, default: 0.4) * robustness-iters: 0-4 (optimal: 0, default: 2) * accuracy: double (default: 1e-12) Source: Apache Commons Math.
(microsphere-2d-projection elements
max-dark-friction
dark-threshold
background
exponent
shared-sphere?
no-interpolation-tolerance
xs
ys
vs)
Microsphere projection interpolator - 2d version
Grid based.
Source: Apache Commons Math.
Microsphere projection interpolator - 2d version Grid based. Source: Apache Commons Math.
(microsphere-projection elements
max-dark-friction
dark-threshold
background
exponent
shared-sphere?
no-interpolation-tolerance
xs
ys)
Microsphere projection interpolator - 1d version
Source: Apache Commons Math.
Microsphere projection interpolator - 1d version Source: Apache Commons Math.
(monotone xs ys)
Monotone interpolation
Monotone interpolation https://gist.github.com/lecho/7627739
(neville xs ys)
Neville algorithm
Source: Apache Commons Math.
Neville algorithm Source: Apache Commons Math.
(piecewise-bicubic xs ys vs)
Piecewise bicubic 2d.
Grid based.
Source: Apache Commons Math.
Piecewise bicubic 2d. Grid based. Source: Apache Commons Math.
(polynomial xs ys)
Polynomial interpolation.
Polynomial interpolation. [more](http://umontreal-simul.github.io/ssj/docs/master/classumontreal_1_1ssj_1_1functionfit_1_1PolInterp.html)
(rbf xs ys)
(rbf rbf-fn xs ys)
(rbf rbf-fn normalize? xs ys)
RBF (Radial Basis Function) interpolation.
Default kernel: :gaussian
Source: Smile
RBF (Radial Basis Function) interpolation. Default kernel: `:gaussian` Source: Smile
(shepard xs ys)
(shepard p xs ys)
Shepard interpolation.
Source: Smile.
Shepard interpolation. Source: Smile.
(spline xs ys)
Cubic spline interpolation
Source: Apache Commons Math.
Cubic spline interpolation Source: Apache Commons Math.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close