code: 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;
          for (int i = 0; i < n; i++) {
              vstar[i] = variogram.f(rdist(x, this.x[i]));
          }
          vstar[n] = 1.0;
  
          double y = 0.0;
          for (int i = 0; i <= n; i++) {
              y += yvi[i] * vstar[i];
          }
          return y;
      }
docs: Interpolate the function at given point.