Skip to content
Joris Gillis edited this page Apr 4, 2023 · 2 revisions

Standard documentation for Function.jacobian:

 [INTERNAL] 

::

 jacobian(self) -> Function

Calculate all Jacobian blocks.

Generates a function that takes all non-differentiated inputs and outputs and calculates all Jacobian blocks. Inputs that are not needed by the routine are all-zero sparse matrices with the correct dimensions. Output blocks that are not calculated, e.g. if the corresponding input or output is marked non-differentiated are also all-zero sparse. The Jacobian blocks are sorted starting by all the blocks for the first output, then all the blocks for the second output and so on. E.g. f : (x, y) -> (r, s) results in the function jac_f : (x, y, out_r, out_s) -> (jac_r_x, jac_r_y, jac_s_x, jac_s_y)

This function is cached.

Extra doc: https://github.com/casadi/casadi/wiki/L_1w6

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/function.hpp#L508

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/function.cpp#L884-L890

Extra documentation

To edit, see writing tips.

Clone this wiki locally