-
Notifications
You must be signed in to change notification settings - Fork 391
L_ch
Get the nonzero index for a set of elements. get_nz(self) -> [int] get_nz(self, int rr, int cc) -> int get_nz(self, [int] rr, [int] cc) -> [int]
The index vector is used both for input and outputs and must be sorted by increasing nonzero index, i.e. column-wise. Elements not found in the sparsity pattern are set to -1.
Extra doc: https://github.com/casadi/casadi/wiki/L_ch
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L516
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L721-L723
.......
::
get_nz(self)
Get the nonzero index for a set of elements.
The index vector is used both for input and outputs and must be sorted by increasing nonzero index, i.e. column-wise. Elements not found in the sparsity pattern are set to -1.
Extra doc: https://github.com/casadi/casadi/wiki/L_ch
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L516
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L721-L723
.............
.......
::
get_nz(self, int rr, int cc)
Get the index of an existing non-zero element.
return -1 if the element does not exist
Extra doc: https://github.com/casadi/casadi/wiki/L_cf
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L496
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L247-L249
.............
.......
::
get_nz(self, [int] rr, [int] cc)
Get a set of non-zero element.
return -1 if the element does not exist
Extra doc: https://github.com/casadi/casadi/wiki/L_cg
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L506
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L260-L263
.............
To edit, see writing tips.