final List<Double> result = new ArrayList<>();
if (!(curve.getCurve() instanceof InterpolatedDoublesCurve)) {
throw new IllegalArgumentException("Can only handle interpolated curves at the moment");
}
final InterpolatedDoublesCurve interpolatedCurve = (InterpolatedDoublesCurve) curve.getCurve();
final Interpolator1D interpolator = interpolatedCurve.getInterpolator();
final Interpolator1DDataBundle data = interpolatedCurve.getDataBundle();
if (sensitivityList != null && sensitivityList.size() > 0) {
final double[][] sensitivityDD = new double[sensitivityList.size()][];
// Implementation note: Sensitivity of the interpolated discount factor to the node discount factor
final double[] df = new double[sensitivityList.size()];
int k = 0;
for (final DoublesPair timeAndS : sensitivityList) {
df[k] = interpolator.interpolate(data, timeAndS.first);
sensitivityDD[k++] = interpolator.getNodeSensitivitiesForValue(data, timeAndS.getFirst());
}
for (int j = 0; j < sensitivityDD[0].length; j++) {
double temp = 0.0;
k = 0;
for (final DoublesPair timeAndS : sensitivityList) {