/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
int exerciseIndex = Arrays.binarySearch( regressionBasisfunctionTimes) ;
int exerciseIndex = Arrays.binarySearch ( regressionBasisfunctionTimes, exerciseTime ) ;
@Override public double applyAsDouble(final LocalDate date) { return FloatingpointDate.getFloatingPointDateFromDate(modelReferenceDate, date.atStartOfDay()); } }).sorted().toArray(); final ArrayList<RandomVariable> basisFunctions = new ArrayList<>(); final double swapMaturity = FloatingpointDate.getFloatingPointDateFromDate(referenceDate, swapEndDate.atStartOfDay()); final double exerciseTime = evaluationTime; <extra_id_0> if(exerciseIndex < 0) { exerciseIndex = -exerciseIndex; } if(exerciseIndex >= exerciseDates.length) { exerciseIndex = exerciseDates.length-1; }