Direct inversion

Triangular

Inverts a (possibly unit-diagonal) triangular matrix in-place. If diag is set to UNIT, then A is treated as having ones on its diagonal.

C++ API

void TriangularInverse(UpperOrLower uplo, UnitOrNonUnit diag, Matrix<F> &A)
void TriangularInverse(UpperOrLower uplo, UnitOrNonUnit diag, AbstractDistMatrix<F> &A)

C API

ElError ElTriangularInverse_s(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_s A)
ElError ElTriangularInverse_d(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_d A)
ElError ElTriangularInverse_c(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_c A)
ElError ElTriangularInverse_z(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_z A)
ElError ElTriangularInverseDist_s(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_s A)
ElError ElTriangularInverseDist_d(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_d A)
ElError ElTriangularInverseDist_c(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_c A)
ElError ElTriangularInverseDist_z(ElUpperOrLower uplo, ElUnitOrNonUnit diag, ElMatrix_z A)

General

This routine computes the in-place inverse of a general fully-populated (invertible) matrix \(A\) as

\[A^{-1} = U^{-1} L^{-1} P,\]

where \(PA=LU\) is the result of LU factorization with partial pivoting. The algorithm essentially factors \(A\), inverts \(U\) in place, solves against \(L\) one block column at a time, and then applies the row pivots in reverse order to the columns of the result.

C++ API

void Inverse(Matrix<F> &A)
void Inverse(AbstractDistMatrix<F> &A)

C API

ElError ElInverse_s(ElMatrix_s A)
ElError ElInverse_d(ElMatrix_d A)
ElError ElInverse_c(ElMatrix_c A)
ElError ElInverse_z(ElMatrix_z A)
ElError ElInverseDist_s(ElDistMatrix_s A)
ElError ElInverseDist_d(ElDistMatrix_d A)
ElError ElInverseDist_c(ElDistMatrix_c A)
ElError ElInverseDist_z(ElDistMatrix_z A)

Symmetric/Hermitian

C++ API

void SymmetricInverse(UpperOrLower uplo, Matrix<F> &A, bool conjugate = false, LDLPivotType pivotType = BUNCH_KAUFMAN_A)
void SymmetricInverse(UpperOrLower uplo, AbstractDistMatrix<F> &A, bool conjugate = false, LDLPivotType pivotType = BUNCH_KAUFMAN_A)

Invert a symmetric or Hermitian matrix using a pivoted LDL factorization.

void HermitianInverse(UpperOrLower uplo, Matrix<F> &A, bool conjugate = false, LDLPivotType pivotType = BUNCH_KAUFMAN_A)
void HermitianInverse(UpperOrLower uplo, AbstractDistMatrix<F> &A, bool conjugate = false, LDLPivotType pivotType = BUNCH_KAUFMAN_A)

Invert a Hermitian matrix using a pivoted LDL factorization.

C API

ElError ElSymmetricInverse_s(ElUpperOrLower uplo, ElMatrix_s A)
ElError ElSymmetricInverse_d(ElUpperOrLower uplo, ElMatrix_d A)
ElError ElSymmetricInverse_c(ElUpperOrLower uplo, ElMatrix_c A)
ElError ElSymmetricInverse_z(ElUpperOrLower uplo, ElMatrix_z A)
ElError ElSymmetricInverseDist_s(ElUpperOrLower uplo, ElDistMatrix_s A)
ElError ElSymmetricInverseDist_d(ElUpperOrLower uplo, ElDistMatrix_d A)
ElError ElSymmetricInverseDist_c(ElUpperOrLower uplo, ElDistMatrix_c A)
ElError ElSymmetricInverseDist_z(ElUpperOrLower uplo, ElDistMatrix_z A)

Invert a symmetric matrix using a pivoted LDLT factorization.

ElError ElHermitianInverse_c(ElUpperOrLower uplo, ElMatrix_c A)
ElError ElHermitianInverse_z(ElUpperOrLower uplo, ElMatrix_z A)
ElError ElHermitianInverseDist_c(ElUpperOrLower uplo, ElDistMatrix_c A)
ElError ElHermitianInverseDist_z(ElUpperOrLower uplo, ElDistMatrix_z A)

Invert a Hermitian matrix using a pivoted LDLH factorization.

HPD

This routine uses a custom algorithm for computing the inverse of a Hermitian positive-definite matrix \(A\) as

\[A^{-1} = (L L^H)^{-1} = L^{-H} L^{-1},\]

where \(L\) is the lower Cholesky factor of \(A\) (the upper Cholesky factor is computed in the case of upper-triangular storage). Rather than performing Cholesky factorization, triangular inversion, and then the Hermitian triangular outer product in sequence, this routine makes use of the single-sweep algorithm described in Bientinesi et al.’s “Families of algorithms related to the inversion of a symmetric positive definite matrix”, in particular, the variant 2 algorithm from Fig. 9.

If the matrix is found to not be HPD, then a NonHPDMatrixException is thrown.

C++ API

void HPDInverse(UpperOrLower uplo, Matrix<F> &A)
void HPDInverse(UpperOrLower uplo, AbstractDistMatrix<F> &A)

C API

ElError ElHPDInverse_s(ElUpperOrLower uplo, ElMatrix_s A)
ElError ElHPDInverse_d(ElUpperOrLower uplo, ElMatrix_d A)
ElError ElHPDInverse_c(ElUpperOrLower uplo, ElMatrix_c A)
ElError ElHPDInverse_z(ElUpperOrLower uplo, ElMatrix_z A)
ElError ElHPDInverseDist_s(ElUpperOrLower uplo, ElDistMatrix_s A)
ElError ElHPDInverseDist_d(ElUpperOrLower uplo, ElDistMatrix_d A)
ElError ElHPDInverseDist_c(ElUpperOrLower uplo, ElDistMatrix_c A)
ElError ElHPDInverseDist_z(ElUpperOrLower uplo, ElDistMatrix_z A)