-
Notifications
You must be signed in to change notification settings - Fork 364
L_da
Joris Gillis edited this page Sep 16, 2022
·
2 revisions
[INTERNAL] find(self, bool ind1) -> [int]
Get the location of all non-zero elements as they would appear in a Dense matrix.
A : DenseMatrix 4 x 3 B : SparseMatrix 4 x 3 , 5 structural non-zeros
k = A.find() A[k] will contain the elements of A that are non-zero in B
Inverse of nonzeros.
Extra doc: https://github.com/casadi/casadi/wiki/L_da
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L933
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L711-L715
To edit, see writing tips.