\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
cpp_fun_jacobian#
View page sourceJacobian of an AD Function#
Syntax#
J = f.jacobian ( x )
f#
This is either a d_fun or a_fun function object. Upon return, the zero order taylor_coefficients in f correspond to the value of x . The other Taylor coefficients in f are unspecified.
f(x)#
We use the notation \(f: \B{R}^n \rightarrow \B{R}^m\) for the function corresponding to f . Note that n is the size of ax and m is the size of ay in to the constructor for f .
x#
If f is a d_fun or a_fun ,
this argument has prototype
const vec_double& xconst vec_a_double& xand its size must be n . It specifies the argument value at we are computing the Jacobian \(f'(x)\).
J#
If f is a d_fun or a_fun ,
the result has prototype
vec_double Jvec_a_double Jrespectively and its size is m * n .
For i between zero and m -1
and j between zero and n -1 ,
\[J [ i * n + j ] = \frac{ \partial f_i }{ \partial x_j } (x)\]