<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/SparseSymbolicFactorOptions/order",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@SA@SparseSymbolicFactorOptions@FI@order"
  },
  "title" : "order"
}
-->

# order

The user-supplied array for ordering.

```
var order: UnsafeMutablePointer<Int32>?
```

## Discussion

This property may be either `null` or a pointer to a permutation that reduces fill in the matrix that you’re factoring. The factor function encodes each element, `i`, as the `order[i]`-th position.

For example, to order columns as `0, 4, 2, 1, 3`, specify this property as `[0, 3, 2, 4, 1]`. That is, the ordering that you specify is the inverse of the column ordering. The following code shows that `order[invp[i]]` equals `i` for all values of `i`:

```swift
let order = [0, 3, 2, 4, 1]
let invp =  [0, 4, 2, 1, 3]

// Prints "[0, 1, 2, 3, 4]".
print((0 ..< 5).map {
    order[invp[$0]]
})
```

If [`orderMethod`](/documentation/Accelerate/SparseSymbolicFactorOptions/orderMethod) is [`SparseOrderUser`](/documentation/Accelerate/SparseOrderUser), and this pointer is `null`, the factor function uses the original matrix ordering.

If [`orderMethod`](/documentation/Accelerate/SparseSymbolicFactorOptions/orderMethod) is [`SparseOrderUser`](/documentation/Accelerate/SparseOrderUser), and this pointer is nonnull, the factor function uses the user-provided permutation to order the matrix before factorization. The system may heuristically reinterpret the order to increase performance. Such reorderings don’t significantly increase fill in the factors *L*.

If [`orderMethod`](/documentation/Accelerate/SparseSymbolicFactorOptions/orderMethod) isn’t [`SparseOrderUser`](/documentation/Accelerate/SparseOrderUser), the factor function computes its own fill-reducing ordering.

If this pointer is nonnull, the factor function returns the computed permutation in the array. Pivoted factorizations may alter the actual permutation during the numerical factorization step.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)