/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableAAD.java
Arrays.sort( parentIndices) ;
Arrays.sort ( parentIDsSorted ) ;
} private RandomVariable getPartialDerivative(final int functionIndex, final int variableIndex){ return getFunctionList().get(functionIndex).partialDerivativeWithRespectTo(variableIndex); } private RandomVariable partialDerivativeWithRespectTo(final int variableIndex){ final int[] parentIDsSorted = (getParentIDs() == null) ? new int[]{} : getParentIDs().clone(); <extra_id_0> if((Arrays.binarySearch(parentIDsSorted, variableIndex) < 0) || isConstant) { return new RandomVariableFromDoubleArray(0.0); } RandomVariable resultrandomvariable = null; RandomVariable X,Y,Z; final double[] resultRandomVariableRealizations;