/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/TermStructureTenorTimeScalingPicewiseConstant.java
timeIntegratedEnd = ( timesIntegrated[timeEndIndexLo+1]-timesIntegrated[timeEndIndexLo]) /timeDiscretization.getTimeStep( timeStartIndexLo) *( periodEnd-timeDiscretization.getTime( timeEndIndexLo) ) ;
timeIntegratedEnd = ( timesIntegrated[timeEndIndexLo+1]-timesIntegrated[timeEndIndexLo] ) /timeDiscretization.getTimeStep ( timeEndIndexLo ) * ( periodEnd-timeDiscretization.getTime ( timeEndIndexLo ) ) ;
final int timeEndIndex = timeDiscretization.getTimeIndex(periodEnd); if(timeEndIndex >= 0) { timeIntegratedEnd = timesIntegrated[timeEndIndex]; } else { final int timeEndIndexLo = -timeEndIndex-2; <extra_id_0> } } final double timeScaled = timeIntegratedEnd - timeIntegratedStart; return timeScaled; } @Override