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

Standard documentation for jtimes:

 Calculate the Jacobian and multiply by a vector from the right.

::

 jtimes(DM ex, DM arg, DM v, bool tr) -> DM
 jtimes(SX ex, SX arg, SX v, bool tr) -> SX
 jtimes(MX ex, MX arg, MX v, bool tr) -> MX

This is equivalent to mul(jacobian(ex, arg), v) or mul(jacobian(ex, arg).T, v) for tr set to false and true respectively. If contrast to these

expressions, it will use directional derivatives which is typically (but not necessarily) more efficient if the complete Jacobian is not needed and v has few rows.

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

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/generic_matrix.hpp#L832

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/generic_matrix.hpp#L832-L835

Extra documentation

To edit, see writing tips.

Clone this wiki locally