/src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardt.java
valueFutures.add( valueFuture) ;
valueFutures.add ( parameterIndex, valueFuture ) ;
} return derivative; } }; if(executor != null) { final Future<RandomVariable[]> valueFuture = executor.submit(worker); <extra_id_0> } else { final FutureTask<RandomVariable[]> valueFutureTask = new FutureTask<>(worker); valueFutureTask.run(); valueFutures.add(parameterIndex, valueFutureTask); }