-
Notifications
You must be signed in to change notification settings - Fork 358
L_1cj
Joris Gillis edited this page Apr 4, 2023
·
2 revisions
Create a switch.
::
conditional(DM ind, [DM] x, DM x_default, bool short_circuit) -> DM conditional(SX ind, [SX] x, SX x_default, bool short_circuit) -> SX conditional(MX ind, [MX] x, MX x_default, bool short_circuit) -> MX
If the condition
ind: evaluates to the integer k, where 0<=k<f.size(), then x[k] will be
returned, otherwise
x_default: will be returned.
Extra doc: https://github.com/casadi/casadi/wiki/L_1cj
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/generic_matrix.hpp#L647
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/generic_matrix.hpp#L647-L650
To edit, see writing tips.