public class BicubicInterpolator2
extends java.lang.Object
The function y(x1,x2) is specified by samples on a regular grid, which need not be uniform. The regular grid is specified by one-dimensional arrays of monotonically increasing coordinates x1 and x2, such that gridded x1 are identical for all gridded x2, and gridded x2 are identical for all gridded x1.
Extrapolation (that is, interpolation outside the specified grid of (x1,x2) coordinates), is performed using cubic polynomials for the nearest grid samples. Extrapolated values can be well outside the [min,max] range of interpolated values, and should typically be avoided.
Modifier and Type | Class and Description |
---|---|
static class |
BicubicInterpolator2.Method
Method used to compute first derivatives.
|
Constructor and Description |
---|
BicubicInterpolator2(BicubicInterpolator2.Method method1,
BicubicInterpolator2.Method method2,
float[] x1,
float[] x2,
float[][] y)
Constructs an interpolator for specified methods and values.
|
BicubicInterpolator2(BicubicInterpolator2.Method method1,
BicubicInterpolator2.Method method2,
int n1,
int n2,
float[] x1,
float[] x2,
float[][] y)
Constructs an interpolator for specified methods and values.
|
BicubicInterpolator2(float[] x1,
float[] x2,
float[][] y)
Constructs an interpolator for specified values y(x1,x2).
|
Modifier and Type | Method and Description |
---|---|
float[][] |
interpolate(float[] x1,
float[] x2)
Returns an array of interpolated values y.
|
void |
interpolate(float[] x1,
float[] x2,
float[][] y)
Computes an array of interpolated values y.
|
float |
interpolate(float x1,
float x2)
Returns interpolated value y.
|
float[][] |
interpolate(Sampling s1,
Sampling s2)
Returns an array of interpolated values y.
|
void |
interpolate(Sampling s1,
Sampling s2,
float[][] y)
Computes an array of interpolated values y.
|
float[][] |
interpolate00(float[] x1,
float[] x2)
Returns an array of interpolated values y.
|
void |
interpolate00(float[] x1,
float[] x2,
float[][] y)
Computes an array of interpolated values y.
|
float |
interpolate00(float x1,
float x2)
Returns interpolated value y.
|
float[][] |
interpolate00(Sampling s1,
Sampling s2)
Returns an array of interpolated values y.
|
void |
interpolate00(Sampling s1,
Sampling s2,
float[][] y)
Computes an array of interpolated values y.
|
float |
interpolate01(float x1,
float x2)
Returns interpolated partial derivative dy/d2.
|
float |
interpolate10(float x1,
float x2)
Returns interpolated partial derivative dy/d1.
|
public BicubicInterpolator2(float[] x1, float[] x2, float[][] y)
x1
- array[n1] of x1 coordinates; monotonically increasing.x2
- array[n2] of x2 coordinates; monotonically increasing.y
- array[n2][n1] of sampled values y(x1,x2).public BicubicInterpolator2(BicubicInterpolator2.Method method1, BicubicInterpolator2.Method method2, float[] x1, float[] x2, float[][] y)
method1
- method used to compute dy/d1.method2
- method used to compute dy/d2.x1
- array[n1] of x1 coordinates; monotonically increasing.x2
- array[n2] of x2 coordinates; monotonically increasing.y
- array[n2][n1] of sampled values y(x1,x2).public BicubicInterpolator2(BicubicInterpolator2.Method method1, BicubicInterpolator2.Method method2, int n1, int n2, float[] x1, float[] x2, float[][] y)
method1
- method used to compute dy/d1.method2
- method used to compute dy/d2.n1
- number of x1 coordinates.n2
- number of x2 coordinates.x1
- array[n1] of x1 coordinates; monotonically increasing.x2
- array[n2] of x2 coordinates; monotonically increasing.y
- array[n2][n1] of sampled values y(x1,x2).public float interpolate(float x1, float x2)
interpolate00(float,float)
.x1
- coordinate x1.x2
- coordinate x2.public float interpolate00(float x1, float x2)
x1
- coordinate x1.x2
- coordinate x2.public float interpolate10(float x1, float x2)
x1
- coordinate x1.x2
- coordinate x2.public float interpolate01(float x1, float x2)
x1
- coordinate x1.x2
- coordinate x2.public float[][] interpolate(Sampling s1, Sampling s2)
interpolate00(Sampling,Sampling)
.s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.public float[][] interpolate00(Sampling s1, Sampling s2)
s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.public void interpolate(Sampling s1, Sampling s2, float[][] y)
interpolate00(Sampling,Sampling,float[][])
.s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.y
- output array of interpolated y(x1,x2).public void interpolate00(Sampling s1, Sampling s2, float[][] y)
s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.y
- output array of interpolated y(x1,x2).public float[][] interpolate(float[] x1, float[] x2)
interpolate00(float[],float[])
.x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.public float[][] interpolate00(float[] x1, float[] x2)
x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.public void interpolate(float[] x1, float[] x2, float[][] y)
interpolate00(float[],float[],float[][])
.x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.y
- output array[n2][n1] of interpolated y(x1,x2).public void interpolate00(float[] x1, float[] x2, float[][] y)
x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.y
- output array[n2][n1] of interpolated y(x1,x2).