class ParameterizedSurface extends ParameterizedFunction<DoublesPair, DoubleMatrix1D, Double> {

  public Function1D<DoublesPair, DoubleMatrix1D> getZParameterSensitivity(final DoubleMatrix1D params) {

    return new Function1D<DoublesPair, DoubleMatrix1D>() {

      @Override
      public DoubleMatrix1D evaluate(final DoublesPair xy) {
        final Function1D<DoubleMatrix1D, Double> f = asFunctionOfParameters(xy);

        final Function1D<DoubleMatrix1D, DoubleMatrix1D> g = FIRST_ORDER_DIFF.differentiate(f);
        return g.evaluate(params);
      }
    };
  }

}