VolatilitySurfaceInterpolator { public BlackVolatilitySurfaceMoneynessFcnBackedByGrid getVolatilitySurface(final SmileSurfaceDataBundle marketData) { ArgumentChecker.notNull(marketData, "market data"); final Function1D<Double, Double>[] smileFunctions = getIndependentSmileFits(marketData); return combineIndependentSmileFits(smileFunctions, marketData); } VolatilitySurfaceInterpolator();  VolatilitySurfaceInterpolator(final GeneralSmileInterpolator smileInterpolator);  VolatilitySurfaceInterpolator(final Interpolator1D timeInterpolator);  VolatilitySurfaceInterpolator(final GeneralSmileInterpolator smileInterpolator, final Interpolator1D timeInterpolator);  VolatilitySurfaceInterpolator(final boolean useIntegratedVariance, final boolean useLogTime, final boolean useLogVariance);  VolatilitySurfaceInterpolator(final GeneralSmileInterpolator smileInterpolator, final boolean useLogTime, final boolean useIntegratedVariance,
      final boolean useLogValue);  VolatilitySurfaceInterpolator(final Interpolator1D timeInterpolator, final boolean useLogTime, final boolean useIntegratedVariance, final boolean useLogValue);  VolatilitySurfaceInterpolator(final GeneralSmileInterpolator smileInterpolator, final Interpolator1D timeInterpolator, final boolean useLogTime,
      final boolean useIntegratedVariance, final boolean useLogValue); Function1D<Double, Double>[] getIndependentSmileFits(final SmileSurfaceDataBundle marketData); BlackVolatilitySurfaceMoneynessFcnBackedByGrid getVolatilitySurface(final SmileSurfaceDataBundle marketData); BlackVolatilitySurfaceMoneynessFcnBackedByGrid combineIndependentSmileFits(final Function1D<Double, Double>[] smileFunctions,
      final SmileSurfaceDataBundle marketData); BlackVolatilitySurfaceMoneynessFcnBackedByGrid getBumpedVolatilitySurface(final SmileSurfaceDataBundle marketData, final int expiryIndex, final int strikeIndex,
      final double amount); boolean useLogTime(); boolean useIntegratedVariance(); boolean useLogValue(); Interpolator1D getTimeInterpolator(); GeneralSmileInterpolator getSmileInterpolator(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullData3() { SURFACE_INTERPOLATOR.getVolatilitySurface(null); }
@Test public void testFlatSurface() { final BlackVolatilitySurfaceMoneyness blackVol = SURFACE_INTERPOLATOR.getVolatilitySurface(FLAT_MARKET_DATA); final double tStart = Math.log(0.01); final double tEnd = Math.log(10.0); final double xL = 0.3; final double xH = 3.5; for (int i = 0; i < 20; i++) { final double t = Math.exp(tStart + (tEnd - tStart) * i / 19.); for (int j = 0; j < 20; j++) { final double x = xL + (xH - xL) * j / 19.; final double vol = blackVol.getVolatilityForMoneyness(t, x); assertEquals("time: " + t + " moneyness: " + x, FLAT_VOL, vol, 1e-7); } } }