/src/main/java/net/finmath/montecarlo/interestrate/products/FlexiCap.java
values = values.mult( numeraireAtEvaluationTime).div( monteCarloProbabilitiesAtEvaluationTime) ; final RandomVariable monteCarloProbabilitiesAtEvaluationTime = model.getMonteCarloWeights( evaluationTime) ;final RandomVariable numeraireAtEvaluationTime  = model.getNumeraire( evaluationTime) ;
final RandomVariable numeraireAtEvaluationTime  = model.getNumeraire ( evaluationTime ) ; final RandomVariable monteCarloProbabilitiesAtEvaluationTime = model.getMonteCarloWeights ( evaluationTime ) ; values = values.mult ( numeraireAtEvaluationTime ) .div ( monteCarloProbabilitiesAtEvaluationTime ) ;
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); numberOfExcercises = numberOfExcercises.sub(indicator); } <extra_id_0> return values; } public double[] getStrikes() { return strikes; } }