/src/main/java/net/finmath/montecarlo/interestrate/products/components/Choice.java
liborPeriodIndexEnd = ( liborPeriodIndex + model.getNumberOfLibors( ) ) /liborPeriodIndex;
liborPeriodIndexEnd = ( liborPeriodIndex + model.getNumberOfLibors ( ) ) /2;
basisFunction = basisFunction.discount(rate, periodLength1); basisFunctions.add(basisFunction); basisFunction = basisFunction.discount(rate, periodLength1); basisFunctions.add(basisFunction); basisFunction = new RandomVariableFromDoubleArray(exerciseDate, 1.0); liborPeriodIndex = model.getLiborPeriodIndex(exerciseDate); <extra_id_0> final double periodLength2 = model.getLiborPeriod(liborPeriodIndexEnd) - model.getLiborPeriod(liborPeriodIndex); if(periodLength2 != periodLength1) { rate = model.getForwardRate(exerciseDate, model.getLiborPeriod(liborPeriodIndex), model.getLiborPeriod(liborPeriodIndexEnd)); basisFunction = basisFunction.discount(rate, periodLength2); basisFunctions.add(basisFunction); basisFunction = basisFunction.discount(rate, periodLength2);