Permutes the columns of the double-precision sparse matrix A based on the provided permutation array.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Accelerate
Declaration
sparse _status sparse_permute_cols_double(sparse _matrix _double A, const sparse _index *restrict perm);
Parameters
A
The sparse matrix, A.
perm
The permutation array. Holds number of columns in A values indicating the permutation of the matrix. The indices in
perm
are expected to be 0 based (first element of pointer isptr[0]
). The indices inperm
are expected to be within bounds of the matrix. Undefined behavior if not met.
Return Value
On successful return, A
has been permuted and SPARSE
is returned.
Discussion
Permute the columns of the sparse matrix A based on the provided permutation array. For each column in A, swap columns as:
tmp[:] = A[:,j];
A[:,j] = A[:,perm[j]];
A[:,perm[j]] = tmp[:];