Improved code snipped.
@@ -21,8 +21,12 @@ The method <code>getGradient</code> will return a map providing the
first order differentiation of the given random variable (<code>this</code>)
with respect to *all* its input <code>RandomVariableDifferentiableInterface</code>s (leave nodes). To get the differentiation with respect to a specific object use
- Map gradient = X.getGradient();
- RandomVariableInterface derivative = gradient.get(Y.getID());
+ /* Get the gradient of X with respect to all its leave nodes: /*
+ Map gradientOfX = X.getGradient();
+
+ /* Get the derivative of X with respect to Y: */
+ RandomVariableInterface derivative = gradientOfX.get(Y.getID());
+
