@Override
public Function1D<HestonModelData, double[][]> getVolatilityAdjointFunction(final double forward, final double[] strikes,
final double timeToExpiry) {
final FFTModelGreeks greekCal = new FFTModelGreeks();
final int n = strikes.length;
final double lowestStrike = strikes[0];
final double highestStrike = strikes[n - 1];
final double[][] nodeSense = new double[n][];
return new Function1D<HestonModelData, double[][]>() {
@SuppressWarnings("synthetic-access")
@Override
public double[][] evaluate(final HestonModelData x) {
final MartingaleCharacteristicExponent ce = new HestonCharacteristicExponent(x);
final double[][] greeks = greekCal.getGreeks(forward, 1.0, timeToExpiry, true, ce, lowestStrike, highestStrike, n, _limitSigma, _alpha, _limitTolerance);
//1st array is strikes and the second is prices (which we don't need)
final double[] k = greeks[0];
final double[] prices = greeks[1];
final int m = k.length;
final double[] vols = new double[m];