/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableUniqueVariable.java
final RandomVariableUniqueVariable currentRandomVariable = ( RandomVariableUniqueVariable ) getListOfAllVariables ( ) .get ( functionIndex ) ;
return getListOfDependingTrueVariables().size(); } private RandomVariable getPartialDerivative(final int functionIndex, final int variableIndex) { if(!Arrays.asList(getParentIDs()).contains(variableIndex)) { return new RandomVariableFromDoubleArray(0.0); } <extra_id_0> final ArrayList<RandomVariable> currentParentRandomVariables = currentRandomVariable.getParentRandomVariables(); RandomVariable resultrandomvariable; switch(currentRandomVariable.getParentOperatorType()){ case SQUARED: resultrandomvariable = currentParentRandomVariables.get(0).mult(2.0); break;