sparsax.umf_logdet¶
- sparsax.umf_logdet(Ai, Aj, Ax, n)[source]¶
Log-determinant of a general (non-symmetric) sparse matrix via UMFPACK.
The UMFPACK counterpart of
lu_logdet(), and the reason this backend carries a logdet at all:umfpack_*_get_determinantreturns the determinant ofAdirectly from the LU factors and permutations, in mantissa/exponent form.lu_logdet()has to reconstruct the same quantity fromU’s diagonal and the row scale factors as a sum ofnlogarithms; both are overflow-safe, but UMFPACK’s accumulates no rounding overnterms and is the more accurate at largen. This is the SAR Jacobianlog|I - rho W|for a directedW.Shares the per-pattern LRU factor cache with
umf_solve(), so anumf_solveand anumf_logdetat identical values factorize once.Not differentiable — the non-symmetric logdet gradient is the full selected inverse, which neither LU backend exposes. Use
logdet()for symmetricAwhen a gradient is needed.