getFittedPointsProperties(cubeName, currency.getCode(), fittingMethod));
final Object fittedDataPointsObject = inputs.getValue(fittedPointsRequirement);
if (fittedDataPointsObject == null) {
throw new OpenGammaRuntimeException("Could not get fitted points for cube");
}
final FittedSmileDataPoints fittedDataPoints = (FittedSmileDataPoints) fittedDataPointsObject;
final Map<DoublesPair, DoubleMatrix2D> inverseJacobians = sabrFittedSurfaces.getInverseJacobians();
final DoubleLabelledMatrix2D alphaSensitivity = (DoubleLabelledMatrix2D) alphaSensitivityObject;
final DoubleLabelledMatrix2D nuSensitivity = (DoubleLabelledMatrix2D) nuSensitivityObject;
final DoubleLabelledMatrix2D rhoSensitivity = (DoubleLabelledMatrix2D) rhoSensitivityObject;
final double expiry = alphaSensitivity.getXKeys()[0];
final double maturity = alphaSensitivity.getYKeys()[0];
final double alpha = alphaSensitivity.getValues()[0][0];
final double nu = nuSensitivity.getValues()[0][0];
final double rho = rhoSensitivity.getValues()[0][0];
final InterpolatedDoublesSurface alphaSurface = data.getSABRParameter().getAlphaSurface();
final Map<Double, Interpolator1DDataBundle> alphaDataBundle = (Map<Double, Interpolator1DDataBundle>) alphaSurface.getInterpolatorData();
final InterpolatedDoublesSurface nuSurface = data.getSABRParameter().getNuSurface();
final Map<Double, Interpolator1DDataBundle> nuDataBundle = (Map<Double, Interpolator1DDataBundle>) nuSurface.getInterpolatorData();
final InterpolatedDoublesSurface rhoSurface = data.getSABRParameter().getRhoSurface();
final Map<Double, Interpolator1DDataBundle> rhoDataBundle = (Map<Double, Interpolator1DDataBundle>) rhoSurface.getInterpolatorData();
final DoublesPair expiryMaturity = DoublesPair.of(expiry, maturity);
final String xInterpolatorName = desiredValue.getConstraint(InterpolatedDataProperties.X_INTERPOLATOR_NAME);
final String xLeftExtrapolatorName = desiredValue.getConstraint(InterpolatedDataProperties.LEFT_X_EXTRAPOLATOR_NAME);
final String xRightExtrapolatorName = desiredValue.getConstraint(InterpolatedDataProperties.RIGHT_X_EXTRAPOLATOR_NAME);
final String yInterpolatorName = desiredValue.getConstraint(InterpolatedDataProperties.Y_INTERPOLATOR_NAME);
final String yLeftExtrapolatorName = desiredValue.getConstraint(InterpolatedDataProperties.LEFT_Y_EXTRAPOLATOR_NAME);
final String yRightExtrapolatorName = desiredValue.getConstraint(InterpolatedDataProperties.RIGHT_Y_EXTRAPOLATOR_NAME);
final Interpolator1D xInterpolator = CombinedInterpolatorExtrapolatorFactory.getInterpolator(xInterpolatorName, xLeftExtrapolatorName, xRightExtrapolatorName);
final Interpolator1D yInterpolator = CombinedInterpolatorExtrapolatorFactory.getInterpolator(yInterpolatorName, yLeftExtrapolatorName, yRightExtrapolatorName);
final GridInterpolator2D nodeSensitivityCalculator = new GridInterpolator2D(xInterpolator, yInterpolator);
final Map<Double, DoubleMatrix2D> result = SABRVegaCalculationUtils.getVegaCube(alpha, rho, nu, alphaDataBundle, rhoDataBundle, nuDataBundle, inverseJacobians, expiryMaturity,
nodeSensitivityCalculator);
final DoubleLabelledMatrix3D labelledMatrix = VegaMatrixUtils.getVegaSwaptionCubeQuoteMatrix(fittedDataPoints.getFittedPoints(), result);
final ValueProperties properties = getResultProperties(createValueProperties().get(), currency.getCode(), desiredValue);
final ValueSpecification spec = new ValueSpecification(getValueRequirement(), target.toSpecification(), properties);
return Collections.singleton(new ComputedValue(spec, labelledMatrix));
}