Various matrix routines
Matrix determinant of an matrix (recursive formulation).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
size of |
||
| real(kind=wp), | intent(in), | dimension(n,n) | :: | a |
the matrix |
the determinant of a matrix
Compute the cofactors matrix (the transpose of the adjugate matrix).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
size of |
||
| real(kind=wp), | intent(in), | dimension(n,n) | :: | a |
the matrix |
the cofactors of a matrix
Compute the matrix trace (sum of the diagonal elements).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
size of the matrix |
||
| real(kind=wp), | intent(in), | dimension(n,n) | :: | mat |
the matrix |
the matrix trace
Print a matrix to the console.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in), | dimension(:,:) | :: | mat |
the matrix to print |
|
| integer, | intent(in), | optional | :: | unit |
unit number (assumed to be an open file). if not present, then the standard output is used. |