---
title: "SparseGetInertia(_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/sparsegetinertia(_:_:_:_:)-2ykzq"
---

# SparseGetInertia(_:_:_:_:)

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

## Declaration

```swift
func SparseGetInertia(_ Factored: SparseOpaqueFactorization_Double, _ num_positive: UnsafeMutablePointer<Int32>, _ num_zero: UnsafeMutablePointer<Int32>, _ num_negative: UnsafeMutablePointer<Int32>) -> Int32
```

## Parameters

- `Factored`: The doc://com.apple.accelerate/documentation/Accelerate/SparseFactorizationLDLTTPP factorization.
- `num_positive`: On return, the number of positive pivots the sparse factorization functions take during the factorization of Factored.
- `num_zero`: On return, the number of zero pivots the sparse factorization functions take during the factorization of Factored.
- `num_negative`: On return, the number of negative pivots the sparse factorization functions take during the factorization of Factored.

## Return Value

Return Value 0 on success; otherwise, a nonzero value on error.

## Discussion

Discussion This function returns the number of negative, zero, and positive pivots that the sparse factorization functions, SparseFactor(_:_:) and SparseFactor(_:_:_:_:), take during an LDLᵀ factorization. In some cases — for example, when the original matrix’s eigenvalues are close to zero — the computed numerical inertia may not be an accurate reflection of the true inertia. In such cases, the computed numerical inertia is dependent on the zeroTolerance and pivotTolerance values of the SparseNumericFactorOptions structure. important: This function supports only SparseFactorizationLDLTTPP factorizations.

## See Also

### Factorization inertia functions

- [SparseGetInertia(_:_:_:_:)](accelerate/sparsegetinertia(_:_:_:_:)-6r90r.md)
- [SparseGetInertia(_:_:_:_:)](accelerate/sparsegetinertia(_:_:_:_:)-2gc7f.md)
- [SparseGetInertia(_:_:_:_:)](accelerate/sparsegetinertia(_:_:_:_:)-6ca5h.md)
- [SparseUpdate_t](accelerate/sparseupdate_t.md)
- [SparseUpdatePartialRefactor](accelerate/sparseupdatepartialrefactor.md)
