LogDetDiv¶
The log-det divergence of a pair of \(n \times n\) Hermitian positive-definite matrices \(A\) and \(B\) is
\[D_{ld}(A,B) = \mbox{tr}(A B^{-1}) -\log(\mbox{det}(A B^{-1})) - n,\]
which can be greatly simplified using the Cholesky factors of \(A\) and \(B\). In particular, if we set \(Z = L_B^{-1} L_A\), where \(A=L_A L_A^H\) and \(B=L_B L_B^H\) are Cholesky factorizations, then
\[D_{ld}(A,B) = \| Z \|_F^2 - 2 \log(\mbox{det}(Z)) - n.\]
C++ API¶
-
Base<F>
LogDetDiv
(UpperOrLower uplo, const Matrix<F> &A, const Matrix<F> &B)¶
-
Base<F>
LogDetDiv
(UpperOrLower uplo, const ElementalMatrix<F> &A, const ElementalMatrix<F> &B)¶
C API¶
-
ElError
ElLogDetDiv_s
(ElUpperOrLower uplo, ElConstMatrix_s A, ElConstMatrix_s B)¶
-
ElError
ElLogDetDiv_d
(ElUpperOrLower uplo, ElConstMatrix_d A, ElConstMatrix_d B)¶
-
ElError
ElLogDetDiv_c
(ElUpperOrLower uplo, ElConstMatrix_c A, ElConstMatrix_c B)¶
-
ElError
ElLogDetDiv_z
(ElUpperOrLower uplo, ElConstMatrix_z A, ElConstMatrix_z B)¶
-
ElError
ElLogDetDivDist_s
(ElUpperOrLower uplo, ElConstDistMatrix_s A, ElConstDistMatrix_s B)¶
-
ElError
ElLogDetDivDist_d
(ElUpperOrLower uplo, ElConstDistMatrix_d A, ElConstDistMatrix_d B)¶
-
ElError
ElLogDetDivDist_c
(ElUpperOrLower uplo, ElConstDistMatrix_c A, ElConstDistMatrix_c B)¶
-
ElError
ElLogDetDivDist_z
(ElUpperOrLower uplo, ElConstDistMatrix_z A, ElConstDistMatrix_z B)¶