/src/main/java/net/finmath/montecarlo/interestrate/models/funding/FundingCapacityWithMemory.java
previousProvidedLevel = providedLevel;previousFundingLevel = fundingLevel;
previousFundingLevel = fundingLevel;
.div(survivalProbability)); integratedSurvivalProbability = integratedSurvivalProbability.add( fundingIntervalRight.cap(fundingLevel) .sub(fundingIntervalLeft.floor(previousFundingLevel)) .floor(0.0) .mult(survivalProbability)); <extra_id_0> previousProvidedLevel = providedLevel; } final RandomVariable oneOverFundingAmount = fundingIntervalRight.sub(fundingIntervalLeft).invert().cap(Double.MAX_VALUE); integratedSurvivalProbability = integratedSurvivalProbability.mult(oneOverFundingAmount); integratedDefaultCompensation = integratedDefaultCompensation.mult(oneOverFundingAmount); return new DefaultFactors(integratedSurvivalProbability, integratedDefaultCompensation);