/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModel.java
return getDiscountFactor(process, timeIndex);
if ( timeIndex >= 0 ) { return getDiscountFactor ( process, timeIndex ) ; }
} return modelParameters; } private RandomVariable getDiscountFactor(final MonteCarloProcess process, final double time) { final TimeDiscretization timeDiscretizationForCurves = isInterpolateDiscountFactorsOnLiborPeriodDiscretization ? liborPeriodDiscretization : process.getTimeDiscretization(); final int timeIndex = timeDiscretizationForCurves.getTimeIndex(time); <extra_id_0> else { final int timeIndexPrev = Math.min(-timeIndex-2, getLiborPeriodDiscretization().getNumberOfTimes()-2); final int timeIndexNext = timeIndexPrev+1; final double timePrev = timeDiscretizationForCurves.getTime(timeIndexPrev); final double timeNext = timeDiscretizationForCurves.getTime(timeIndexNext); final RandomVariable discountFactorPrev = getDiscountFactor(process, timeIndexPrev);