public class RadialInterpolator2
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RadialInterpolator2.Biharmonic
Sandwell's biharmonic basis function g(r) = r*r*(log(r)-1).
|
static class |
RadialInterpolator2.WesselBercovici
The Wessel-Bercovici basis function g(r) for splines with tension.
|
Constructor and Description |
---|
RadialInterpolator2(edu.mines.jtk.interp.RadialInterpolator2.Basis basis,
float[] f,
float[] x1,
float[] x2)
Constructs a gridder with specified known (scattered) samples.
|
Modifier and Type | Method and Description |
---|---|
float[] |
getWeights()
Gets the weights that scale the basis for each known sample.
|
float |
interpolate(float x1,
float x2)
Returns a value interpolated at the specified point.
|
float[][] |
interpolate(Sampling s1,
Sampling s2)
Returns an array of interpolated values sampled on a grid.
|
void |
setBasis(edu.mines.jtk.interp.RadialInterpolator2.Basis basis)
Sets the radial basis function used by this interpolator.
|
void |
setMetricTensor(double m11,
double m12,
double m22)
Sets the metric tensor used to compute distances.
|
void |
setPolyTrend(int order)
Sets the order of the polynomial trend to be fit to sample values.
|
void |
setSamples(float[] f,
float[] x1,
float[] x2)
Sets the known (scattered) samples to be interpolated.
|
public RadialInterpolator2(edu.mines.jtk.interp.RadialInterpolator2.Basis basis, float[] f, float[] x1, float[] x2)
basis
- the radial basis function.f
- array of known sample values f(x1,x2).x1
- array of known sample x1 coordinates.x2
- array of known sample x2 coordinates.public void setBasis(edu.mines.jtk.interp.RadialInterpolator2.Basis basis)
basis
- the radial basis function.public void setSamples(float[] f, float[] x1, float[] x2)
f
- array of sample values f(x1,x2).x1
- array of sample x1 coordinates.x2
- array of sample x2 coordinates.public void setMetricTensor(double m11, double m12, double m22)
Distance squared from the origin to a point (x1,x2) is x1*m11*x1 + 2*x1*m12*x2 + x2*m22*x2. The determinant m11*m22-m12*m12 of the metric tensor must be non-negative.
m11
- the metric tensor element (1,1).m12
- the metric tensor element (1,2).m22
- the metric tensor element (2,2).public void setPolyTrend(int order)
order
- the order of the polynomial fit; must be -1, 0, 1, or 2.public float interpolate(float x1, float x2)
x1
- the x1 coordinate of the point.x2
- the x2 coordinate of the point.public float[][] interpolate(Sampling s1, Sampling s2)
s1
- the sampling of n1 x1 coordinates.s2
- the sampling of n2 x2 coordinates.public float[] getWeights()