STRUMPACK icon indicating copy to clipboard operation
STRUMPACK copied to clipboard

HSSMatrix HSSMatrix log determinant

Open AlexGKim opened this issue 1 year ago • 2 comments

I would like the log determinant of an HSSMatrix / HSSMatrixMPI.

AlexGKim avatar Jun 16 '23 18:06 AlexGKim

This gives you access to the ULV factors for an HSSMatrixMPI: https://github.com/pghysels/STRUMPACK/commit/94f8f3a02cb8da0490b54e6a967213a019b7436f

I'll need to think about how to compute the determinant.
In the original ULV factorization, U and V were orthogonal, then you can get the determinant from the L factor. But our implementation of ULV here is based on this work: https://epubs.siam.org/doi/abs/10.1137/12087116X And the HSS matrix has special structure which is exploited in the ULV factorization.

pghysels avatar Jun 22 '23 05:06 pghysels

@pghysels . In my specific application the matrix is a covariance matrix, so A = A^T. This should simplify the determinant calculation, as that only depends on the determinants of the leaves and the symmetric matrices formed by X X^T of the off-diagonals at each node. I have not understood the algorithm not implementation enough to figure out how to do that from the factorization though.

The XIa reference works as an example a positive definite matrix, so the solution does seem to come from getting the diagonals of L_ii and recursively getting the determinant of the script(U) term in Eq. 3.12.

I am working with very large matrices, for which there is currently no HSSMatrixMPI<>.ULV().

AlexGKim avatar Jun 26 '23 23:06 AlexGKim