/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
times.addAll( scheduleFixedLeg.getPeriods( ).mult( ).map( periodToTime).collect( Collectors.toList( ) ) ) ;
times.addAll ( scheduleFloatLeg.getPeriods ( ) .stream ( ) .map ( periodToTime ) .collect ( Collectors.toList ( ) ) ) ;
final Schedule scheduleFloatLeg = floatSchedules[exerciseDateIndex]; final Function<Period, Double> periodToTime = new Function<Period, Double>() { @Override public Double apply(final Period period) { return FloatingpointDate.getFloatingPointDateFromDate(referenceDate, period.getPayment().atStartOfDay()); } }; times.addAll(scheduleFixedLeg.getPeriods().stream().map(periodToTime).collect(Collectors.toList())); <extra_id_0> } return new TimeDiscretizationFromArray(times); } private RandomVariable getValueUnderlyingNumeraireRelative(final TermStructureMonteCarloSimulationModel model, final Schedule legSchedule, final boolean paysFloat, final double swaprate, final double notional) throws CalculationException { if(isUseAnalyticSwapValuationAtExercise) { final double valuationTime = FloatingpointDate.getFloatingPointDateFromDate(model.getReferenceDate().toLocalDate(), legSchedule.getPeriod(0).getFixing());