Created attachment 331 [details] Support for the determinant with Sparse LU Currently, It should be straightforward to compute the determinant of a sparse matrix using the decomposition returned by the SparseLU module. An implementation is available in the attached patch. However, this determinant can easily overflow. Equilibrate the matrix before the factorization can fix the issue. This is useful as well to limit the amount of pivoting. So we should add this functionnality before pushing the support to compute the determinant.
(In reply to comment #0) > However, this determinant can easily overflow. Equilibrate the matrix before > the factorization can fix the issue. An alternative to avoid overflow would be to compute log(abs(determinate)) and sign(determinate). That is what, e.g., numpy offers (search for slogdet).
(In reply to comment #1) > An alternative to avoid overflow would be to compute log(abs(determinate)) and > sign(determinate). That is what, e.g., numpy offers (search for slogdet). This is also what HouseholderQR already offers.
(In reply to comment #2) > (In reply to comment #1) > > An alternative to avoid overflow would be to compute log(abs(determinate)) and > > sign(determinate). That is what, e.g., numpy offers (search for slogdet). > > This is also what HouseholderQR already offers. Thanks, So, we will provide the two versions together with sign(determinant), with a warning about risks of overflow/underflow when calling abs(determinant).
The feature is now available with this changeset https://bitbucket.org/eigen/eigen/commits/c3e84dfb5afb/ Changeset: c3e84dfb5afb User: dnuentsa Date: 2013-06-11 14:46:13 Summary: Fix bug 588 : Compute a determinant using SparseLU Affected #: 1 file
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/588.