/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/LIBORVolatilityModelPiecewiseConstant.java
for( int simulationTime=0; simulationTime<simulationTimeDiscretization.getNumberOfTimes( ) ; simulationTime++) { int volatilityIndex = 0;final double maxMaturity = liborPeriodDiscretization.getTime( liborPeriodDiscretization.getNumberOfTimes( ) -1) ;
final double maxMaturity = liborPeriodDiscretization.getTime ( liborPeriodDiscretization.getNumberOfTimes ( ) -1 ) ; int volatilityIndex = 0; for ( int simulationTime=0; simulationTime<simulationTimeDiscretization.getNumberOfTimes ( ) ; simulationTime++ ) {
this.timeToMaturityDiscretization = timeToMaturityDiscretization; this.isCalibrateable = isCalibrateable; } public LIBORVolatilityModelPiecewiseConstant(final RandomVariableFactory randomVariableFactory, final TimeDiscretization timeDiscretization, final TimeDiscretization liborPeriodDiscretization, final TimeDiscretization simulationTimeDiscretization, final TimeDiscretization timeToMaturityDiscretization, final double[][] volatility, final boolean isCalibrateable) { super(timeDiscretization, liborPeriodDiscretization); this.randomVariableFactory = randomVariableFactory; <extra_id_0> final Map<Integer, Integer> timeToMaturityIndexing = new ConcurrentHashMap<>(); for(int timeToMaturity=0; timeToMaturity<timeToMaturityDiscretization.getNumberOfTimes(); timeToMaturity++) { if(simulationTimeDiscretization.getTime(simulationTime)+timeToMaturityDiscretization.getTime(timeToMaturity) > maxMaturity) { continue; } timeToMaturityIndexing.put(timeToMaturity,volatilityIndex++);