Options that define which ordering algorithm to use.


struct SparseOrder_t


The column and row ordering used when eliminating variables in a sparse factorization has a significant influence on the size of the resulting factors and the amount of work required to calculate them. Minimizing the size or work required is an NP-complete problem, so only heuristics are implemented 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 normally 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), or you will perform many repeated factorizations. If you are uncertain, try both and see which gives better performance for your usage.

AMD and METIS provide good orderings for symmetric matrices. They can be used for QR factorizations, but this involves forming AA explicitly, which is expensive. Column AMD (COLAMD), on the other hand, finds an ordering for AA while only working with A. For this reason, COLAMD cannot be used for symmetric factorizations.



var SparseOrderUser: SparseOrder_t

User-supplied ordering, or identity if order is null.

var SparseOrderMetis: SparseOrder_t

METIS Nested Dissection ordering.

var SparseOrderCOLAMD: SparseOrder_t

Column AMD ordering for AᵀA.


See Also

Inspecting Symbolic Factor Options

var control: SparseControl_t

Flags controlling the computation.

struct SparseControl_t

Options that control the computation.

var reportError: ((UnsafePointer<Int8>) -> Void)?

Function to use to report parameter errors.

var orderMethod: SparseOrder_t

Ordering algorithm to use.

var order: UnsafeMutablePointer<Int32>?

User-supplied array for ordering.

var malloc: (Int) -> UnsafeMutableRawPointer?

Function to use to allocate any storage needed.

var free: (UnsafeMutableRawPointer?) -> Void

Function to use to free allocated storage.

var ignoreRowsAndColumns: UnsafeMutablePointer<Int32>?

An array containing row and column indices to ignore.