Compute the sign and the logarithm of the absolute value of the determinant.
More...
|
| pure subroutine | la_sslogdet (a, sign, logabsdet, overwrite_a, err) |
| |
| pure subroutine | la_dslogdet (a, sign, logabsdet, overwrite_a, err) |
| |
| pure subroutine | la_cslogdet (a, sign, logabsdet, overwrite_a, err) |
| |
| pure subroutine | la_zslogdet (a, sign, logabsdet, overwrite_a, err) |
| |
Compute the sign and the logarithm of the absolute value of the determinant.
This subroutine computes \( \det(A) = sign \cdot e^{logabsdet} \) for a real or complex square matrix \( A \), from its LU factorization. The logarithm does not overflow or underflow where the determinant itself would.
- Parameters
-
| [in,out] | a | The input square matrix of size \( [n, n] \). If overwrite_a is true, it is overwritten by its LU factorization. |
| [out] | sign | The sign of the determinant, of the same type and kind as \( A \): \( \pm 1 \) for a real matrix, a complex number of unit modulus for a complex one, and 0 for a singular matrix. |
| [out] | logabsdet | The natural logarithm of \( |\det(A)| \), a real of the kind of \( A \); \( -\infty \) for a singular matrix. |
| [in] | overwrite_a | (Optional) If .true., A may be overwritten and destroyed. Default is .false.. |
| [out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the subroutine will stop execution. |
- Note
- The subroutine is
pure. A singular matrix is not an error: it returns sign = 0 and logabsdet \( = -\infty \).
◆ la_cslogdet()
| pure subroutine la_determinant::slogdet::la_cslogdet |
( |
complex(sp), dimension(:,:), intent(inout), target | a, |
|
|
complex(sp), intent(out) | sign, |
|
|
real(sp), intent(out) | logabsdet, |
|
|
logical(lk), intent(in), optional | overwrite_a, |
|
|
type(la_state), intent(out), optional | err ) |
- Parameters
-
| [in,out] | a | Input matrix a[n,n] |
| [out] | sign | Sign of the determinant: +1 or -1, a complex number of unit modulus, or 0 if a is singular |
| [out] | logabsdet | Natural logarithm of |det(a)|; -inf if a is singular |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
◆ la_dslogdet()
| pure subroutine la_determinant::slogdet::la_dslogdet |
( |
real(dp), dimension(:,:), intent(inout), target | a, |
|
|
real(dp), intent(out) | sign, |
|
|
real(dp), intent(out) | logabsdet, |
|
|
logical(lk), intent(in), optional | overwrite_a, |
|
|
type(la_state), intent(out), optional | err ) |
- Parameters
-
| [in,out] | a | Input matrix a[n,n] |
| [out] | sign | Sign of the determinant: +1 or -1, a complex number of unit modulus, or 0 if a is singular |
| [out] | logabsdet | Natural logarithm of |det(a)|; -inf if a is singular |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
◆ la_sslogdet()
| pure subroutine la_determinant::slogdet::la_sslogdet |
( |
real(sp), dimension(:,:), intent(inout), target | a, |
|
|
real(sp), intent(out) | sign, |
|
|
real(sp), intent(out) | logabsdet, |
|
|
logical(lk), intent(in), optional | overwrite_a, |
|
|
type(la_state), intent(out), optional | err ) |
- Parameters
-
| [in,out] | a | Input matrix a[n,n] |
| [out] | sign | Sign of the determinant: +1 or -1, a complex number of unit modulus, or 0 if a is singular |
| [out] | logabsdet | Natural logarithm of |det(a)|; -inf if a is singular |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
◆ la_zslogdet()
| pure subroutine la_determinant::slogdet::la_zslogdet |
( |
complex(dp), dimension(:,:), intent(inout), target | a, |
|
|
complex(dp), intent(out) | sign, |
|
|
real(dp), intent(out) | logabsdet, |
|
|
logical(lk), intent(in), optional | overwrite_a, |
|
|
type(la_state), intent(out), optional | err ) |
- Parameters
-
| [in,out] | a | Input matrix a[n,n] |
| [out] | sign | Sign of the determinant: +1 or -1, a complex number of unit modulus, or 0 if a is singular |
| [out] | logabsdet | Natural logarithm of |det(a)|; -inf if a is singular |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
The documentation for this interface was generated from the following file: