Contents

SparseCreateSubfactor(_:_:)

Returns an opaque object representing a sub-factor of a factorization in complex float.

Declaration

func SparseCreateSubfactor(_ subfactor: SparseSubfactor_t, _ Factor: SparseOpaqueFactorization_Complex_Float) -> SparseOpaqueSubfactor_Complex_Float

Parameters

  • subfactor:

    The sub-factor the new object should represent.

  • Factor:

    The factorization to extract the sub-factor from.

Return Value

Object representing the requested sub-factor. Must be cleaned up by a call to SparseCleanup once it is no longer required.

Discussion

Here the term “sub-factor” is used to mean one or more parts of the whole factorization. For example, just the Q factor from A=QRP. The returned object is a wrapper around the orignal factorization, and does not actually perform any extraction (sub-factors are stored in non-standard formats that exploit implicit structure for efficiency, and formation of the sub-factor explicitly can be expensive). It is intended to be used as an argument to SparseMultiply and SparseSolve functions only.

As Factor is contained in the returned object, its underlying reference count in incremented, and the returned object must hence be destroyed through a call to SparseCleanup to prevent a memory leak (however it is safe to call SparseCleanup on the original factorization whilst this object is still being used).

See Also

Subfactor Extraction