/src/main/java/net/finmath/optimizer/StochasticLevenbergMarquardt.java
for ( int valueIndex = workerParameterIndex; valueIndex < valueCurrent.length; valueIndex++) {
for ( int valueIndex = 0; valueIndex < valueCurrent.length; valueIndex++ ) {
parametersNew[workerParameterIndex] = parametersNew[workerParameterIndex].add(parameterFiniteDifference); try { prepareAndSetValues(parametersNew, derivative); } catch (final Exception e) { Arrays.fill(derivative, new RandomVariableFromDoubleArray(Double.NaN)); } <extra_id_0> derivative[valueIndex] = derivative[valueIndex].sub(valueCurrent[valueIndex]).div(parameterFiniteDifference); } return derivative; } }; if(executor != null) {