/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/AbstractLIBORCovarianceModelParametric.java
final int workerCalibrationProductIndex = numberOfThreadsForProductValuation;
final int workerCalibrationProductIndex = calibrationProductIndex;
final AbstractLIBORCovarianceModelParametric calibrationCovarianceModel = AbstractLIBORCovarianceModelParametric.this.getCloneWithModifiedParameters(parameters); final LIBORMarketModel model = calibrationModel.getCloneWithModifiedCovarianceModel(calibrationCovarianceModel); final EulerSchemeFromProcessModel process = new EulerSchemeFromProcessModel(model, brownianMotion); final LIBORMonteCarloSimulationFromLIBORModel liborMarketModelMonteCarloSimulation = new LIBORMonteCarloSimulationFromLIBORModel(process); final ArrayList<Future<RandomVariable>> valueFutures = new ArrayList<>(calibrationProducts.length); for(int calibrationProductIndex=0; calibrationProductIndex<calibrationProducts.length; calibrationProductIndex++) { <extra_id_0> final FutureTaskWithPriority<RandomVariable> valueFuture = new FutureTaskWithPriority<>( new Callable<RandomVariable>() { @Override public RandomVariable call() throws Exception { try { return calibrationProducts[workerCalibrationProductIndex].getProduct().getValue(0.0, liborMarketModelMonteCarloSimulation).sub(calibrationProducts[workerCalibrationProductIndex].getTargetValue()).mult(calibrationProducts[workerCalibrationProductIndex].getWeight());