SparseOrder_t
Options that define which ordering algorithm to use.
Declaration
struct SparseOrder_tOverview
The column and row ordering you use when eliminating variables in a sparse factorization has a significant influence on the size of the resulting factors and the amount of work necessary to calculate them. Minimizing the size or the amount of work is an NP-complete problem, so the system only implements heuristics in this library.
Approximate minimum degree (AMD)-based orderings tend to be fast and provide good quality for small matrices. Conversely, nested dissection-based orderings, such as METIS, are usually considerably slower to compute, but provide better quality orderings for larger problems, and expose more parallelism during the factorization. Use AMD unless the problem is very large (millions of rows and columns) to avoid performing many repeated factorizations. If you’re uncertain, try both and see which gives better performance for your usage.
AMD and METIS provide good orderings for symmetric matrices. You can use them for QR factorizations, but that involves forming AᵀA explicitly, which is expensive. Alternatively, column AMD (COLAMD) finds an ordering for AᵀA while only working with A. For this reason, you can’t use COLAMD for symmetric factorizations.