<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/sparse-matrix-factor-functions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Sparse Matrix Factor Functions"
}
-->

# Sparse Matrix Factor Functions

Compute the factorization of a matrix.

## Topics

### Matrix factorization functions

[`func SparseFactor(SparseFactorization_t, SparseMatrix_Double) -> SparseOpaqueFactorization_Double`](/documentation/Accelerate/SparseFactor(_:_:)-8gl6j)

Returns the specified factorization of a sparse matrix of double-precision values.

[`func SparseFactor(SparseFactorization_t, SparseMatrix_Float) -> SparseOpaqueFactorization_Float`](/documentation/Accelerate/SparseFactor(_:_:)-38shj)

Returns the specified factorization of a sparse matrix of single-precision values.

[`func SparseFactor(SparseFactorization_t, SparseMatrix_Double, SparseSymbolicFactorOptions, SparseNumericFactorOptions) -> SparseOpaqueFactorization_Double`](/documentation/Accelerate/SparseFactor(_:_:_:_:)-88xmk)

Returns the specified factorization of a sparse matrix of double-precision values using the specified options.

[`func SparseFactor(SparseFactorization_t, SparseMatrix_Float, SparseSymbolicFactorOptions, SparseNumericFactorOptions) -> SparseOpaqueFactorization_Float`](/documentation/Accelerate/SparseFactor(_:_:_:_:)-8apyz)

Returns the specified factorization of a sparse matrix of single-precision values using the specified options.

### Complex matrix factorization functions

[`func SparseFactor(SparseFactorization_t, SparseMatrix_Complex_Double) -> SparseOpaqueFactorization_Complex_Double`](/documentation/Accelerate/SparseFactor(_:_:)-1avkp)

Returns the specified factorization of a sparse matrix of complex double
values.

[`func SparseFactor(SparseFactorization_t, SparseMatrixStructureComplex) -> SparseOpaqueSymbolicFactorization`](/documentation/Accelerate/SparseFactor(_:_:)-55tzk)

Returns a symbolic factorization of the requested type for a
complex matrix with the given structure.

[`func SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Complex_Double) -> SparseOpaqueFactorization_Complex_Double`](/documentation/Accelerate/SparseFactor(_:_:)-5zzpu)

Returns the factorization of a sparse matrix of complex double values
corresponding to the supplied symbolic factorization.

[`func SparseFactor(SparseFactorization_t, SparseMatrix_Complex_Float) -> SparseOpaqueFactorization_Complex_Float`](/documentation/Accelerate/SparseFactor(_:_:)-73n38)

Returns the specified factorization of a sparse matrix of complex float
values.

### Factorization inertia functions

[`func SparseGetInertia(SparseOpaqueFactorization_Float, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>) -> Int32`](/documentation/Accelerate/SparseGetInertia(_:_:_:_:)-6r90r)

Returns the inertia of a single-precision *LDLᵀ* factorization.

[`func SparseGetInertia(SparseOpaqueFactorization_Double, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>) -> Int32`](/documentation/Accelerate/SparseGetInertia(_:_:_:_:)-2ykzq)

Returns the inertia of a double-precision *LDLᵀ* factorization.

[`func SparseGetInertia(SparseOpaqueFactorization_Complex_Double, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>) -> Int32`](/documentation/Accelerate/SparseGetInertia(_:_:_:_:)-2gc7f)

Returns the inertia of an LDLT factorization in complex double.

[`func SparseGetInertia(SparseOpaqueFactorization_Complex_Float, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>, UnsafeMutablePointer<Int32>) -> Int32`](/documentation/Accelerate/SparseGetInertia(_:_:_:_:)-6ca5h)

Returns the inertia of an LDLT factorization in complex float.

[`struct SparseUpdate_t`](/documentation/Accelerate/SparseUpdate_t)

Low-rank update algorithm selector

[`var SparseUpdatePartialRefactor: SparseUpdate_t`](/documentation/Accelerate/SparseUpdatePartialRefactor)

Low-rank update algorithm selector

### Factorization update functions

[`func SparseUpdateFactor(SparseUpdate_t, UnsafeMutablePointer<SparseOpaqueFactorization_Complex_Float>, Int32, UnsafePointer<Int32>, SparseMatrix_Complex_Float)`](/documentation/Accelerate/SparseUpdateFactor(_:_:_:_:_:)-1n2be)

Apply a low-rank update to an existing factorization of a matrix of complex float values.

[`func SparseUpdateFactor(SparseUpdate_t, UnsafeMutablePointer<SparseOpaqueFactorization_Complex_Double>, Int32, UnsafePointer<Int32>, SparseMatrix_Complex_Double)`](/documentation/Accelerate/SparseUpdateFactor(_:_:_:_:_:)-9h956)

Apply a low-rank update to an existing factorization of a matrix of complex double values.

[`func SparseUpdateFactor(SparseUpdate_t, UnsafeMutablePointer<SparseOpaqueFactorization_Float>, Int32, UnsafePointer<Int32>, SparseMatrix_Float)`](/documentation/Accelerate/SparseUpdateFactor(_:_:_:_:_:)-9qg54)

Apply a low-rank update to an existing factorization of a matrix of float values.

[`func SparseUpdateFactor(SparseUpdate_t, UnsafeMutablePointer<SparseOpaqueFactorization_Double>, Int32, UnsafePointer<Int32>, SparseMatrix_Double)`](/documentation/Accelerate/SparseUpdateFactor(_:_:_:_:_:)-wrqg)

Apply a low-rank update to an existing factorization of a matrix of double values.

### Structures that specify factorization type and factorization options

[`struct SparseFactorization_t`](/documentation/Accelerate/SparseFactorization_t)

Constants that define the factorization type.

[`struct SparseSymbolicFactorOptions`](/documentation/Accelerate/SparseSymbolicFactorOptions)

A structure that contains options that affect the symbolic stage of a sparse factorization.

[`struct SparseNumericFactorOptions`](/documentation/Accelerate/SparseNumericFactorOptions)

A structure that contains options that affect the numerical stage of a sparse factorization.



---

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)