@Test public void testInterpolate2D() { System.out.println("interpolate 2d"); double[] x1 = {0, 1}; double[] x2 = {0, 1}; double[] y = {0, 1}; KrigingInterpolation2D instance = new KrigingInterpolation2D(x1, x2, y); assertEquals(0, instance.interpolate(0, 0), 1E-7); assertEquals(1, instance.interpolate(1, 1), 1E-7); assertEquals(0.5, instance.interpolate(0.5, 0.5), 1E-7); }
public double interpolate(double... x) { if (x.length != this.x[0].length) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, this.x[0].length)); } int n = this.x.length; double y = yvi[n]; for (int i = 0; i < n; i++) { y += yvi[i] * variogram.f(rdist(x, this.x[i])); } return y; }
KrigingInterpolation { public double interpolate(double... x) { if (x.length != this.x[0].length) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, this.x[0].length)); } int n = this.x.length; double y = yvi[n]; for (int i = 0; i < n; i++) { y += yvi[i] * variogram.f(rdist(x, this.x[i])); } return y; } }
KrigingInterpolation { public double interpolate(double... x) { if (x.length != this.x[0].length) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, this.x[0].length)); } int n = this.x.length; double y = yvi[n]; for (int i = 0; i < n; i++) { y += yvi[i] * variogram.f(rdist(x, this.x[i])); } return y; } KrigingInterpolation(double[][] x, double[] y);  KrigingInterpolation(double[][] x, double[] y, Variogram variogram, double[] error); }
KrigingInterpolation { public double interpolate(double... x) { if (x.length != this.x[0].length) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, this.x[0].length)); } int n = this.x.length; double y = yvi[n]; for (int i = 0; i < n; i++) { y += yvi[i] * variogram.f(rdist(x, this.x[i])); } return y; } KrigingInterpolation(double[][] x, double[] y);  KrigingInterpolation(double[][] x, double[] y, Variogram variogram, double[] error); double interpolate(double... x); @Override String toString(); }
KrigingInterpolation { public double interpolate(double... x) { if (x.length != this.x[0].length) { throw new IllegalArgumentException(String.format("Invalid input vector size: %d, expected: %d", x.length, this.x[0].length)); } int n = this.x.length; double y = yvi[n]; for (int i = 0; i < n; i++) { y += yvi[i] * variogram.f(rdist(x, this.x[i])); } return y; } KrigingInterpolation(double[][] x, double[] y);  KrigingInterpolation(double[][] x, double[] y, Variogram variogram, double[] error); double interpolate(double... x); @Override String toString();  }