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