/src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardt.java
valueFutures.add( valueFutureTask) ;
valueFutures.add ( parameterIndex, valueFutureTask ) ;
final Future<RandomVariable[]> valueFuture = executor.submit(worker); valueFutures.add(parameterIndex, valueFuture); } else { final FutureTask<RandomVariable[]> valueFutureTask = new FutureTask<>(worker); valueFutureTask.run(); <extra_id_0> } } for (int parameterIndex = 0; parameterIndex < parameterCurrent.length; parameterIndex++) { try { derivatives[parameterIndex] = valueFutures.get(parameterIndex).get(); }