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