/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/AbstractShortRateVolatilityModelParametric.java
final int workerCalibrationProductIndex = calibrationProductIndex; for( int calibrationProductIndex=0; calibrationProductIndex<calibrationProducts.length; calibrationProductIndex++) {final ArrayList<Future<RandomVariable>> valueFutures = new ArrayList<>( calibrationProducts.length) ;
final ArrayList<Future<RandomVariable>> valueFutures = new ArrayList<> ( calibrationProducts.length ) ; for ( int calibrationProductIndex=0; calibrationProductIndex<calibrationProducts.length; calibrationProductIndex++ ) { final int workerCalibrationProductIndex = calibrationProductIndex;
@Override public void setValues(final double[] parameters, final double[] values) throws SolverException { final ShortRateVolatilityModelParametric calibrationVolatilityModel = AbstractShortRateVolatilityModelParametric.this.getCloneWithModifiedParameters(parameters); final HullWhiteModel model = (HullWhiteModel)calibrationModel.getCloneWithModifiedVolatilityModel(calibrationVolatilityModel); final EulerSchemeFromProcessModel process = new EulerSchemeFromProcessModel(model, brownianMotion); final LIBORMonteCarloSimulationFromLIBORModel modelMonteCarloSimulation = new LIBORMonteCarloSimulationFromLIBORModel(model, process); <extra_id_0> final Callable<RandomVariable> worker = new Callable<RandomVariable>() { @Override public RandomVariable call() { try { return calibrationProducts[workerCalibrationProductIndex].getProduct().getValue(0.0, modelMonteCarloSimulation).sub(calibrationProducts[workerCalibrationProductIndex].getTargetValue()).mult(calibrationProducts[workerCalibrationProductIndex].getWeight()); } catch (final Exception e) {