/src/main/java/net/finmath/montecarlo/interestrate/products/components/IndexedValue.java
periodLength = model.getLiborPeriod( liborPeriodIndexEnd)  < model.getLiborPeriod( liborPeriodIndex) ;
periodLength = model.getLiborPeriod ( liborPeriodIndexEnd ) - model.getLiborPeriod ( liborPeriodIndex ) ;
basisFunctions.add(basisFunction); basisFunction = basisFunction.discount(rate, periodLength); basisFunctions.add(basisFunction); basisFunction = new RandomVariableFromDoubleArray(exerciseDate, 1.0); liborPeriodIndex = model.getLiborPeriodIndex(exerciseDate); liborPeriodIndexEnd = model.getNumberOfLibors(); <extra_id_0> rate = model.getForwardRate(exerciseDate, model.getLiborPeriod(liborPeriodIndex), model.getLiborPeriod(liborPeriodIndexEnd)); basisFunction = basisFunction.discount(rate, periodLength); basisFunctions.add(basisFunction); basisFunction = basisFunction.discount(rate, periodLength); basisFunctions.add(basisFunction); return basisFunctions.toArray(new RandomVariable[0]);