y[i][looppath] += x[j][looppath] * covCD[i][j];
}
}
}
final Double[][][] pD = pathGeneratorDiscount(pDI, y, h, h2, gamma);
final MonteCarloDiscountFactorDerivativeDataBundle mcdDB = new MonteCarloDiscountFactorDerivativeDataBundle(pD, impactAmount);
pvBlock[loopblock] = instrument.accept(MCDC, mcdDB) * nbPath2[loopblock];
pv += pvBlock[loopblock];
// Backward sweep (in block loop)
for (int loopjump = 0; loopjump < nbJump; loopjump++) {
for (int loopimp = 0; loopimp < impactAmount[loopjump].length; loopimp++) {
impactAmountBar[loopjump][loopimp] += mcdDB.getImpactAmountDerivative()[loopjump][loopimp] * nbPath2[loopblock] * pvBlockBar[loopblock];
}
}
final Double[][][] pDBar = new Double[nbPath2[loopblock]][nbJump][];
for (int looppath = 0; looppath < nbPath2[loopblock]; looppath++) {
for (int loopjump = 0; loopjump < nbJump; loopjump++) {
pDBar[looppath][loopjump] = new Double[impactAmount[loopjump].length];
for (int loopimp = 0; loopimp < impactAmount[loopjump].length; loopimp++) {
pDBar[looppath][loopjump][loopimp] = mcdDB.getPathDiscountingFactorDerivative()[looppath][loopjump][loopimp] * nbPath2[loopblock] * pvBlockBar[loopblock];
}
}
}
final double[][] pDIBarTemp = pathGeneratorDiscountAdjointIDF(pDI, y, h, h2, gamma, pDBar);
for (int loopjump = 0; loopjump < nbJump; loopjump++) {