/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionWithBoundary.java
final RandomVariable monteCarloProbabilitiesEnd  = model.getMonteCarloWeights ( fromTimeNext ) ; final RandomVariable monteCarloProbabilitiesStart = model.getMonteCarloWeights ( fromTime ) ;
} public RandomVariable getBoundaryAdjustment(final double fromTime, final double toTime, final AssetModelMonteCarloSimulationModel model, final RandomVariable continuationValues) throws CalculationException { final RandomVariableFromDoubleArray values = new RandomVariableFromDoubleArray(0,0); final int fromTimeIndex = model.getTimeIndex(fromTime); final double fromTimeNext = model.getTime(fromTimeIndex+1); if(fromTimeNext < toTime) { <extra_id_0> final RandomVariable monteCarloProbabilitiesTransition = monteCarloProbabilitiesEnd.div(monteCarloProbabilitiesStart); final double riskFreeRate = ((MonteCarloBlackScholesModel)model).getModel().getRiskFreeRate().doubleValue(); final RandomVariable remainingBoundaryAdjustment = this.getBoundaryAdjustment(fromTimeNext, toTime, model, continuationValues); remainingBoundaryAdjustment.mult(monteCarloProbabilitiesTransition).mult(Math.exp(-riskFreeRate*(fromTimeNext-fromTime))); values.add(remainingBoundaryAdjustment); }