<!--
{
  "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/SparseGetInertia(_:_:_:_:)-6ca5h",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@SparseGetInertia#$@SA@SparseOpaqueFactorization_Complex_Float#*I#S1_#S1_#"
  },
  "title" : "SparseGetInertia(_:_:_:_:)"
}
-->

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

Returns the inertia of an LDLT factorization in complex float.

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

## Parameters

`Factored`

The factorization to be queried.

`num_positive`

Upon return `*num_positive` has been set to the number
of positive pivots.

`num_zero`

Upon return `*num_zero` has been set to the number
of zero pivots.

`num_negative`

Upon return `*num_negative` has been set to the number
of negative pivots.

## Return Value

0 on success, non-zero on error

## Discussion

For a given LDLT factorization, this function returns the number of
negative, zero and positive pivots taken during the factorization.
Note that in some cases, particularly when eigenvalues are close to
zero, the computed numerical inertia may not be an accurate reflection
of the true inertia of the system, and in particular can be highly dependent
on the zeroTolerance (and to a less degree the pivotTolerance) specified
in the factorization options.

This call is only supported for factorizations of type `SparseFactorizationLDLTTPP`.

---

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)