Contents

SparseGetInertia(_:_:_:_:)

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

Declaration

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

Parameters

  • Factored:

    The 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

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

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.

See Also

Factorization inertia functions