<!--
{
  "availability" : [
    "iOS: 18.5.0 -",
    "iPadOS: 18.5.0 -",
    "macCatalyst: 18.5.0 -",
    "macOS: 15.5.0 -",
    "tvOS: 18.5.0 -",
    "visionOS: 2.5.0 -",
    "watchOS: 11.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/SparseFactor(_:_:_:_:_:)-7j0dm",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@SparseFactor#$@SA@SparseOpaqueSymbolicFactorization#$@SA@SparseMatrix_Complex_Double#$@SA@SparseNumericFactorOptions#*v#S3_#"
  },
  "title" : "SparseFactor(_:_:_:_:_:)"
}
-->

# SparseFactor(_:_:_:_:_:)

Returns the factorization of a sparse matrix of complex double values
corresponding to the supplied symbolic factorization, using the
specified options and without any internal memory allocations.

```
func SparseFactor(_ symbolicFactor: SparseOpaqueSymbolicFactorization, _ Matrix: SparseMatrix_Complex_Double, _ nfoptions: SparseNumericFactorOptions, _ factorStorage: UnsafeMutableRawPointer?, _ workspace: UnsafeMutableRawPointer?) -> SparseOpaqueFactorization_Complex_Double
```

## Parameters

`Matrix`

The matrix to factorize.

`nfoptions`

Numeric factor options, for example pivoting parameters.

`factorStorage`

A pointer to space used to store the factorization
of size at least `SymbolicFactor.factorSize_Double * 2` bytes. This storage
should not be altered by the user during the lifetime of the return
value. This memory must be 16-byte aligned (any allocation returned
by `malloc()` has this property).

`workspace`

A pointer to a workspace of size at least
`SymbolicFactor.workspaceSize_Double * 2` bytes. This workspace may be
reused or destroyed by the user as soon as the function returns.
This memory must be 16-byte aligned (any allocation returned
by `malloc()` has this property).

## Return Value

Factorization of Matrix.

## Discussion

Note that internal memory allocations may occur in the case of
pivoted factorizations that result in delayed pivots. If you require closer
control over memory allocations, supply a `sfoptions.malloc()` function that
implements the required behaviour, or use an alternative non-pivoted
factorization returns. Note that if `sfoptions.malloc()` returns NULL the
factorization will abort immediately.

---

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)