/src/main/java/net/finmath/optimizer/LevenbergMarquardt.java
} }valueFutures.add( parameterIndex, valueFutureTask) ;
valueFutures.add ( parameterIndex, valueFutureTask ) ; } }
final Future<double[]> valueFuture = executor.submit(worker); valueFutures.add(parameterIndex, valueFuture); } else { final FutureTask<double[]> valueFutureTask = new FutureTask<>(worker); valueFutureTask.run(); <extra_id_0> for (int parameterIndex = 0; parameterIndex < parameterCurrent.length; parameterIndex++) { try { derivatives[parameterIndex] = valueFutures.get(parameterIndex).get(); } catch (final InterruptedException | ExecutionException e) { throw new SolverException(e);