// 3. relying on xxxImpl methods inline Volatility SwaptionVolatilityStructure::volatility(const Date& optionDate, const Period& swapTenor, Rate strike, bool extrapolate) const { checkSwapTenor(swapTenor, extrapolate); checkRange(optionDate, extrapolate); checkStrike(strike, extrapolate); return volatilityImpl(optionDate, swapTenor, strike); }
inline Volatility SwaptionVolatilityStructure::volatility(Time optionTime, const Period& swapTenor, Rate strike, bool extrapolate) const { checkSwapTenor(swapTenor, extrapolate); checkRange(optionTime, extrapolate); checkStrike(strike, extrapolate); Time length = swapLength(swapTenor); return volatilityImpl(optionTime, length, strike); }
inline Volatility SwaptionVolatilityStructure::volatility(const Date& optionDate, Time swapLength, Rate strike, bool extrapolate) const { checkSwapTenor(swapLength, extrapolate); checkRange(optionDate, extrapolate); checkStrike(strike, extrapolate); Time optionTime = timeFromReference(optionDate); return volatilityImpl(optionTime, swapLength, strike); }