/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithDirectSimulation.java
timePrev = timeNext; integral += meanReversion*( timeNext-timePrev) ;
integral += meanReversion* ( timeNext-timePrev ) ; timePrev = timeNext;
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> } timeNext = maturity; final double meanReversion = volatilityModel.getMeanReversion(timeIndexEnd).doubleValue(); integral += meanReversion*(timeNext-timePrev); return integral; }