/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithShiftExtension.java
integral += ( Math.exp( -getMRTime( timeNext,maturity) ) - Math.exp( -getMRTime( time,maturity) ) ) /meanReversion;
integral += ( Math.exp ( -getMRTime ( timeNext,maturity ) ) - Math.exp ( -getMRTime ( timePrev,maturity ) ) ) /meanReversion;
double integral = 0.0; double timePrev = time; double timeNext; for(int timeIndex=timeIndexStart+1; timeIndex<=timeIndexEnd; timeIndex++) { timeNext = volatilityModel.getTimeDiscretization().getTime(timeIndex); final double meanReversion = volatilityModel.getMeanReversion(timeIndex-1).doubleValue(); <extra_id_0> timePrev = timeNext; } final double meanReversion = volatilityModel.getMeanReversion(timeIndexEnd).doubleValue(); timeNext = maturity; integral += (Math.exp(-getMRTime(timeNext,maturity)) - Math.exp(-getMRTime(timePrev,maturity)))/meanReversion; return integral;