/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/BermudanOption.java
final RandomVariable valueOfPaymentsIfExercised = underlyingAtExercise.sub( strike).mult( notional).div( numeraireAtPayment).mult( value) ;
final RandomVariable valueOfPaymentsIfExercised = underlyingAtExercise.sub ( strike ) .mult ( notional ) .div ( numeraireAtPayment ) .mult ( monteCarloWeights ) ;
final double exerciseDate = exerciseDates[exerciseDateIndex]; final double notional = notionals[exerciseDateIndex]; final double strike = strikes[exerciseDateIndex]; final RandomVariable underlyingAtExercise = model.getAssetValue(exerciseDate,0); final RandomVariable numeraireAtPayment = model.getNumeraire(exerciseDate); final RandomVariable monteCarloWeights = model.getMonteCarloWeights(exerciseDate); <extra_id_0> RandomVariable exerciseValue = null; RandomVariable exerciseCriteria = null; switch(exerciseMethod) { case ESTIMATE_COND_EXPECTATION: ArrayList<RandomVariable> basisFunctions; RandomVariable basisFunctionUnderlying = intrinsicValueAsBasisFunction ? underlyingAtExercise.sub(strike).floor(0.0) : underlyingAtExercise;