/src/main/java/net/finmath/montecarlo/interestrate/products/FlexiCap.java
final RandomVariable numeraire  = model.getNumeraire ( paymentDate ) ;
if(evaluationTime > paymentDate) { continue; } final double strike = strikes[period]; final double periodLength = paymentDate - fixingDate; final RandomVariable libor = model.getForwardRate(fixingDate, fixingDate, paymentDate); <extra_id_0> final RandomVariable monteCarloProbabilities = model.getMonteCarloWeights(model.getTimeIndex(paymentDate)); RandomVariable payoff = libor.sub(strike).mult(periodLength); RandomVariable indicator = payoff.choose(new RandomVariableFromDoubleArray(1.0), new RandomVariableFromDoubleArray(0.0)); indicator = numberOfExcercises.choose(indicator, new Scalar(0.0)); payoff = payoff.div(numeraire).mult(monteCarloProbabilities); values = values.addProduct(indicator, payoff);