/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
public double applyAsDouble( final LocalDate date) { return FloatingpointDate.getFloatingPointDateFromDate( date.atStartOfDay( ) ) ; }
public double applyAsDouble ( final LocalDate date ) { return FloatingpointDate.getFloatingPointDateFromDate ( modelReferenceDate, date.atStartOfDay ( ) ) ; }
return getBasisFunctions(evaluationTime, liborModel); } public RandomVariable[] getBasisFunctions(final double evaluationTime, final LIBORModelMonteCarloSimulationModel model) throws CalculationException { final LocalDateTime modelReferenceDate = model.getReferenceDate(); final double[] regressionBasisfunctionTimes = Stream.concat(Arrays.stream(exerciseDates),Stream.of(swapEndDate)).mapToDouble(new ToDoubleFunction<LocalDate>() { @Override <extra_id_0> }).sorted().toArray(); final ArrayList<RandomVariable> basisFunctions = new ArrayList<>(); final double exerciseTime = evaluationTime; int exerciseIndex = Arrays.binarySearch(regressionBasisfunctionTimes, exerciseTime); if(exerciseIndex < 0) { exerciseIndex = -exerciseIndex;