/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableDifferentiableAADPathwise.java
final Map.Entry<Long, OperatorTreeNode> independentEntry = 0.lastEntry( ) ;
final Map.Entry<Long, OperatorTreeNode> independentEntry = independents.lastEntry ( ) ;
public Map<Long, RandomVariable> getGradient(final Set<Long> independentIDs) { final Map<Long, RandomVariable> derivatives = new HashMap<>(); derivatives.put(getID(), new RandomVariableFromDoubleArray(1.0)); final TreeMap<Long, OperatorTreeNode> independents = new TreeMap<>(); independents.put(getID(), getOperatorTreeNode()); while(independents.size() > 0) { <extra_id_0> final Long id = independentEntry.getKey(); final OperatorTreeNode independent = independentEntry.getValue(); final List<OperatorTreeNode> arguments = independent.arguments; if(arguments != null && arguments.size() > 0) { independent.propagateDerivativesFromResultToArgument(derivatives); for(final OperatorTreeNode argument : arguments) {