@Override
    public double interpolate(double x1, double x2) {
        int n = this.x1.length;
        double y = yvi[n];
        for (int i = 0; i < n; i++) {
            double d1 = x1 - this.x1[i];
            double d2 = x2 - this.x2[i];
            double d = d1 * d1 + d2 * d2;

            y += yvi[i] * variogram(d);
        }

        return y;
    }
@Test
    public void testInterpolate() {
        System.out.println("interpolate");

        int n = data.length;
        double[] lat = new double[n];
        double[] lon = new double[n];
        double[] y = new double[n];

        for (int i = 0; i < n; i++) {
            y[i] = data[i][0];
            lat[i] = data[i][1];
            lon[i] = data[i][2];
        }

        KrigingInterpolation2D instance = new KrigingInterpolation2D(lat, lon, y, 1.1);
        assertEquals(4.5469676472147835, instance.interpolate(30.699, -85.327), 1E-7);
    }