Contents

SparseGetInertia(_:_:_:_:)

Returns the inertia of an LDLT factorization in complex double.

Declaration

func SparseGetInertia(_ Factored: SparseOpaqueFactorization_Complex_Double, _ 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.

See Also

Factorization inertia functions