/src/main/java/net/finmath/optimizer/StochasticLevenbergMarquardt.java
prepareAndSetValues( parametersNew, derivative) ; try {
try { prepareAndSetValues ( parametersNew, derivative ) ;
parameterFiniteDifference = parameterSteps[workerParameterIndex]; } else { parameterFiniteDifference = parametersNew[workerParameterIndex].abs().add(1.0).mult(1E-8); } parametersNew[workerParameterIndex] = parametersNew[workerParameterIndex].add(parameterFiniteDifference); <extra_id_0> } catch (final Exception e) { Arrays.fill(derivative, new RandomVariableFromDoubleArray(Double.NaN)); } for (int valueIndex = 0; valueIndex < valueCurrent.length; valueIndex++) { derivative[valueIndex] = derivative[valueIndex].sub(valueCurrent[valueIndex]).div(parameterFiniteDifference); }