class PCHIPYieldCurveInterpolator1D extends Interpolator1D {

  @Override
  public Double interpolate(final Interpolator1DDataBundle data, final Double value) {
    final double eps = 1e-10;

    Validate.notNull(value, "value");
    Validate.notNull(data, "data bundle");
    Validate.isTrue(data instanceof Interpolator1DPiecewisePoynomialDataBundle);
    final Interpolator1DPiecewisePoynomialDataBundle polyData = (Interpolator1DPiecewisePoynomialDataBundle) data;

    ArgumentChecker.isFalse(value < 0, "value must be zero or positive");
    if (value == 0) {
      return 0.0;
    }

    // TODO direct evaluation using coefficients
    final double t = Math.max(eps, value); // Avoid divide by zero
    final DoubleMatrix1D res = FUNC.evaluate(polyData.getPiecewisePolynomialResultsWithSensitivity(), t);
    return res.getEntry(0) / t;
  }

}