Registered Member
|
Hi there!
FullPivLU has a method that gives the determinant(), but FullPivHouseholderQR has methods that give absDeterminant() and logAbsDeterminant(). I'm confused as to why there is this API difference between the two decompositions. In particular, I'm using the LU decomposition and would like to get the logAbsDeterminant() as well as its sign/phase separately, as I am considering a big enough determinant that it is likely to overflow if I just use FullPivLU::determinant(). Is there a particular reason FullPivLU::logAbsDeterminant() is not defined as a method? Turns out, I can easily calculate the logAbsDeterminant just by looking at the diagonal of matrixLU(), so it is not a big deal that this is not supported directly in the API. However, when I go to try to access the sign of the determinant, this requires not only access to the diagonal of matrixLU(), but it also requires looking at a protected member variable, m_det_pq (which is either +1 or -1). In order to access this variable, I have subclassed FullPivLU and made a method that returns m_det_pq. But I find it suboptimal to access a protected member variable in my code. Is there a reason this value is not accessible from the public API? Cheers, Jim |
Moderator
|
No particular reason. Feel free to propose a patch.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]