sparse_permute_rows_float(_:_:)
Permutes the rows of the single-precision sparse matrix A based on the provided permutation array.
Declaration
func sparse_permute_rows_float(_ A: sparse_matrix_float!, _ perm: UnsafePointer<sparse_index>!) -> sparse_statusParameters
- A:
The sparse matrix, A.
- perm:
The permutation array. Holds number of rows in A values indicating the permutation of the matrix. The indices in
permare expected to be 0 based (first element of pointer isptr[0]). The indices in perm 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_SUCCESS is returned.
Discussion
Permute the rows of the sparse matrix A based on the provided permutation array. For each row in A, swap rows as:
tmp[:] = A[i,:];
A[i,:] = A[perm[i],:];
A[perm[i],:] = tmp[:];See Also
Matrix-Vector Operations
sparse_matrix_vector_product_dense_double(_:_:_:_:_:_:_:)sparse_matrix_vector_product_dense_float(_:_:_:_:_:_:_:)sparse_vector_triangular_solve_dense_double(_:_:_:_:_:)sparse_vector_triangular_solve_dense_float(_:_:_:_:_:)sparse_outer_product_dense_double(_:_:_:_:_:_:_:_:_:)sparse_outer_product_dense_float(_:_:_:_:_:_:_:_:_:)sparse_permute_rows_double(_:_:)sparse_permute_cols_double(_:_:)sparse_permute_cols_float(_:_:)sparse_elementwise_norm_double(_:_:)sparse_elementwise_norm_float(_:_:)sparse_operator_norm_double(_:_:)sparse_operator_norm_float(_:_:)sparse_matrix_trace_double(_:_:)sparse_matrix_trace_float(_:_:)