public class TrilinearInterpolator3
extends java.lang.Object
The function y(x1,x2,x3) 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, x2 and x3, such that gridded x1 are identical for all gridded x2 and x3, gridded x2 are identical for all gridded x1 and x2, and gridded x3 are identical for all gridded x1 and x2.
Extrapolation (that is, interpolation outside the specified grid of (x1,x2,x3) coordinates), is performed using linear polynomials for the nearest grid samples. Extrapolated values can be well outside the [min,max] range of interpolated values, and should typically be avoided.
Constructor and Description |
---|
TrilinearInterpolator3(float[] x1,
float[] x2,
float[] x3,
float[][][] y)
Constructs an interpolator for specified values y(x1,x2).
|
TrilinearInterpolator3(int n1,
int n2,
int n3,
float[] x1,
float[] x2,
float[] x3,
float[][][] y)
Constructs an interpolator for specified values.
|
Modifier and Type | Method and Description |
---|---|
float[][][] |
interpolate(float[] x1,
float[] x2,
float[] x3)
Returns an array of interpolated values y.
|
void |
interpolate(float[] x1,
float[] x2,
float[] x3,
float[][][] y)
Computes an array of interpolated values y.
|
float |
interpolate(float x1,
float x2,
float x3)
Returns interpolated value y.
|
float[][][] |
interpolate(Sampling s1,
Sampling s2,
Sampling s3)
Returns an array of interpolated values y.
|
void |
interpolate(Sampling s1,
Sampling s2,
Sampling s3,
float[][][] y)
Computes an array of interpolated values y.
|
float[][][] |
interpolate000(float[] x1,
float[] x2,
float[] x3)
Returns an array of interpolated values y.
|
void |
interpolate000(float[] x1,
float[] x2,
float[] x3,
float[][][] y)
Computes an array of interpolated values y.
|
float |
interpolate000(float x1,
float x2,
float x3)
Returns interpolated value y.
|
float[][][] |
interpolate000(Sampling s1,
Sampling s2,
Sampling s3)
Returns an array of interpolated values y.
|
void |
interpolate000(Sampling s1,
Sampling s2,
Sampling s3,
float[][][] y)
Computes an array of interpolated values y.
|
float |
interpolate001(float x1,
float x2,
float x3)
Returns interpolated partial derivative dy/d3.
|
float |
interpolate010(float x1,
float x2,
float x3)
Returns interpolated partial derivative dy/d2.
|
float |
interpolate100(float x1,
float x2,
float x3)
Returns interpolated partial derivative dy/d1.
|
public TrilinearInterpolator3(float[] x1, float[] x2, float[] x3, float[][][] y)
x1
- array[n1] of x1 coordinates; monotonically increasing.x2
- array[n2] of x2 coordinates; monotonically increasing.x3
- array[n3] of x3 coordinates; monotonically increasing.y
- array[n3][n2][n1] of sampled values y(x1,x2,x3).public TrilinearInterpolator3(int n1, int n2, int n3, float[] x1, float[] x2, float[] x3, float[][][] y)
n1
- number of x1 coordinates.n2
- number of x2 coordinates.n3
- number of x3 coordinates.x1
- array[n1] of x1 coordinates; monotonically increasing.x2
- array[n2] of x2 coordinates; monotonically increasing.x3
- array[n3] of x3 coordinates; monotonically increasing.y
- array[n3][n2][n1] of sampled values y(x1,x2,x3).public float interpolate(float x1, float x2, float x3)
interpolate000(float,float,float)
.x1
- coordinate x1.x2
- coordinate x2.x3
- coordinate x3.public float interpolate000(float x1, float x2, float x3)
x1
- coordinate x1.x2
- coordinate x2.x3
- coordinate x3.public float interpolate100(float x1, float x2, float x3)
x1
- coordinate x1.x2
- coordinate x2.x3
- coordinate x3.public float interpolate010(float x1, float x2, float x3)
x1
- coordinate x1.x2
- coordinate x2.x3
- coordinate x3.public float interpolate001(float x1, float x2, float x3)
x1
- coordinate x1.x2
- coordinate x2.x3
- coordinate x3.public float[][][] interpolate(Sampling s1, Sampling s2, Sampling s3)
interpolate000(Sampling,Sampling,Sampling)
.s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.s3
- sampling of coordinate x3.public float[][][] interpolate000(Sampling s1, Sampling s2, Sampling s3)
s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.s3
- sampling of coordinate x3.public void interpolate(Sampling s1, Sampling s2, Sampling s3, float[][][] y)
interpolate000(Sampling,Sampling,Sampling,float[][][])
.s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.s3
- sampling of coordinate x3.y
- output array of interpolated y(x1,x2,x3).public void interpolate000(Sampling s1, Sampling s2, Sampling s3, float[][][] y)
s1
- sampling of coordinate x1.s2
- sampling of coordinate x2.s3
- sampling of coordinate x3.y
- output array of interpolated y(x1,x2,x3).public float[][][] interpolate(float[] x1, float[] x2, float[] x3)
interpolate000(float[],float[],float[])
.x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.x3
- array[n3] of coordinates x3.public float[][][] interpolate000(float[] x1, float[] x2, float[] x3)
x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.x3
- array[n3] of coordinates x3.public void interpolate(float[] x1, float[] x2, float[] x3, float[][][] y)
interpolate000(float[],float[],float[],float[][][])
.x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.x3
- array[n3] of coordinates x3.y
- output array[n3][n2][n1] of interpolated y(x1,x2,x3).public void interpolate000(float[] x1, float[] x2, float[] x3, float[][][] y)
x1
- array[n1] of coordinates x1.x2
- array[n2] of coordinates x2.x3
- array[n3] of coordinates x3.y
- output array[n3][n2][n1] of interpolated y(x1,x2,x3).