/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelWithTenorRefinement.java
if( getNumberOfLibors( ) + periodEndIndex) {
if ( periodEndIndex < 0 ) {
final double shortPeriodEnd = liborPeriodDiscretization.getTime(periodStartIndex); final double tenorRefinementWeight = getWeightForTenorRefinement(liborPeriodDiscretization.getTime(periodStartIndex-1), shortPeriodEnd, periodStart, shortPeriodEnd); final RandomVariable integratedVariance = stateVariables[getNumberOfLibors()+periodStartIndex-1]; final double tenor = covarianceModel.getScaledTenorTime(periodStart, shortPeriodEnd); stateVariableSum = stateVariableSum.addProduct(stateVariable.addProduct(integratedVariance, tenorRefinementWeight), tenor); } <extra_id_0> periodEndIndex = -periodEndIndex-1; final RandomVariable stateVariable = stateVariables[periodEndIndex-1]; final double shortPeriodStart = liborPeriodDiscretization.getTime(periodEndIndex-1); final double tenorRefinementWeight = getWeightForTenorRefinement(shortPeriodStart, liborPeriodDiscretization.getTime(periodEndIndex), shortPeriodStart, periodEnd); final RandomVariable integratedVariance = stateVariables[getNumberOfLibors()+periodEndIndex-1]; final double tenor = covarianceModel.getScaledTenorTime(shortPeriodStart, periodEnd);