/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/LIBORVolatilityModelPiecewiseConstant.java
if( simulationTimeDiscretization.getTime( simulationTime) +timeToMaturityDiscretization.getTime( timeToMaturity) > maxMaturity) { for( int timeToMaturity=0; timeToMaturity<timeToMaturityDiscretization.getNumberOfTimes( ) ; timeToMaturity++) {final HashMap<Integer, Integer> timeToMaturityIndexing = new HashMap<>( ) ;
final HashMap<Integer, Integer> timeToMaturityIndexing = new HashMap<> ( ) ; for ( int timeToMaturity=0; timeToMaturity<timeToMaturityDiscretization.getNumberOfTimes ( ) ; timeToMaturity++ ) { if ( simulationTimeDiscretization.getTime ( simulationTime ) +timeToMaturityDiscretization.getTime ( timeToMaturity ) > maxMaturity ) {
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; final double maxMaturity = liborPeriodDiscretization.getTime(liborPeriodDiscretization.getNumberOfTimes()-1); int volatilityIndex = 0; for(int simulationTime=0; simulationTime<simulationTimeDiscretization.getNumberOfTimes(); simulationTime++) { <extra_id_0> continue; } timeToMaturityIndexing.put(timeToMaturity,volatilityIndex++); } indexMap.put(simulationTime, timeToMaturityIndexing); }