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

Standard documentation for if_else:

 Ternary if_else: x ? y : z.

::

 if_else(DM cond, DM if_true, DM if_false, bool short_circuit) -> DM
 if_else(SX cond, SX if_true, SX if_false, bool short_circuit) -> SX
 if_else(MX cond, MX if_true, MX if_false, bool short_circuit) -> MX

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

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sx_elem.hpp#L265

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sx_elem.hpp#L265-L267

Extra documentation

To edit, see writing tips.

Clone this wiki locally