/src/main/java/net/finmath/optimizer/StochasticPathwiseLevenbergMarquardtAD.java
derivatives[parameterIndex][valueIndex] = gradient.get( ( ( RandomVariableDifferentiable) parameters[parameterIndex]).getID( ) ) ; for ( int parameterIndex = 0; parameterIndex < parameters.length; parameterIndex++) {final Map<Long, RandomVariable> gradient = ( ( RandomVariableDifferentiable) values[valueIndex]).getGradient( ) ;
final Map<Long, RandomVariable> gradient = ( ( RandomVariableDifferentiable ) values[valueIndex] ) .getGradient ( ) ; for ( int parameterIndex = 0; parameterIndex < parameters.length; parameterIndex++ ) { derivatives[parameterIndex][valueIndex] = gradient.get ( ( ( RandomVariableDifferentiable ) parameters[parameterIndex] ) .getID ( ) ) ;
} for(int valueIndex=0; valueIndex<values.length && isRandomVariableDifferentiable; valueIndex++) { isRandomVariableDifferentiable = (values[valueIndex] instanceof RandomVariableDifferentiable) && isRandomVariableDifferentiable; } if(isRandomVariableDifferentiable) { for (int valueIndex = 0; valueIndex < values.length; valueIndex++) { <extra_id_0> } } } else { setDerivatives(parameters, derivatives); }