class InterpolatedCurveVectorFunction extends VectorFunction {

  @Override
  public DoubleMatrix1D evaluate(final DoubleMatrix1D x) {
    final Interpolator1DDataBundle db = _interpolator.getDataBundleFromSortedArrays(_knots, x.getData());
    final int n = _samplePoints.length;
    final DoubleMatrix1D res = new DoubleMatrix1D(n);
    final double[] data = res.getData(); //direct access to vector data
    for (int i = 0; i < n; i++) {
      data[i] = _interpolator.interpolate(db, _samplePoints[i]);
    }
    return res;
  }

  public  InterpolatedCurveVectorFunction(final double[] samplePoints, final Interpolator1D interpolator, final double[] knots);

}