class ProductPiecewisePolynomialInterpolator extends PiecewisePolynomialInterpolator {

  @Override
  public PiecewisePolynomialResult interpolate(double[] xValues, double[] yValues) {
    ArgumentChecker.notNull(xValues, "xValues");
    ArgumentChecker.notNull(yValues, "yValues");
    ArgumentChecker.isTrue(xValues.length == yValues.length, "xValues length = yValues length");
    PiecewisePolynomialResult result;
    if (_isClamped) {
      double[][] xyValuesAll = getDataTotal(xValues, yValues);
      result = _baseMethod.interpolate(xyValuesAll[0], xyValuesAll[1]);
    } else {
      double[] xyValues = getProduct(xValues, yValues);
      result = _baseMethod.interpolate(xValues, xyValues);
    }
    return extrapolateByLinearFunction(result, xValues);
  }

  public  ProductPiecewisePolynomialInterpolator(PiecewisePolynomialInterpolator baseMethod);
  public  ProductPiecewisePolynomialInterpolator(PiecewisePolynomialInterpolator baseMethod, double[] xValuesClamped,
      double[] yValuesClamped);

}