I need to permute the degrees of freedom of a system and apply this permutation to a few sparse matrices in CCS (or CRS) format. I could construct a permutation matrix and perform sparse matrix-matrix multiplies, but that seems like overkill. Are there standard algorithms for permuting sparse matrices? How do users of packages like METIS permute sparse matrices?
A function written in C to permute a CCS matrix is shown here:
The algorithm is fairly simple but there aren't many comments. If you want more details, take a look at Davis' book where the routine is presented.