Expand description
Sparse matrix reordering algorithms.
Reordering reduces bandwidth (RCM) or fill-in (AMD) of sparse matrices, improving the performance of direct and iterative solvers.
§Algorithms
-
Reverse Cuthill-McKee (RCM): BFS from a peripheral node, reversed. Reduces matrix bandwidth, which improves cache locality for SpMV and reduces fill-in for banded preconditioners.
-
Approximate Minimum Degree (AMD): Greedy elimination choosing the node with minimum degree. Reduces fill-in for Cholesky/LU factorization.
§Usage
let perm = rcm_ordering(matrix)?;
let reordered = permute_csr(matrix, &perm)?;Functions§
- amd_
ordering - Compute the Approximate Minimum Degree (AMD) ordering of a sparse matrix.
- amd_
ordering_ host - Host-side AMD ordering computation.
- bandwidth
- Compute the bandwidth of a matrix given its CSR structure.
- inverse_
permutation - Compute the inverse permutation.
- permute_
csr - Apply a permutation to a CSR matrix:
P * A * P^T. - rcm_
ordering - Compute the Reverse Cuthill-McKee (RCM) ordering of a sparse matrix.
- rcm_
ordering_ host - Host-side RCM ordering computation.