Stan Math Library
4.9.0
Automatic Differentiation
|
Propagate chain rule to calculate gradients starting from the specified variable.
Resizes the input vector to be the correct size.
The grad() function does not itself recover any memory. use recover_memory()
or recover_memory_nested()
to recover memory.
[in] | v | Value of function being differentiated |
[in] | x | Variables being differentiated with respect to |
[out] | g | Gradient, d/dx v, evaluated at x. |