This interface overloads the eigh interface from stdlib_linalg
to compute the eigenvalues and eigenvectors of a Strang matrix.
call eigh(A, lambda, vectors)
A : Matrix of type Strang. It is an intent(in) argument.
lambda : Rank-1 real array returning the eigenvalues of A
in increasing order. It is an intent(out) argument.
vectors: Rank-2 real array of size [n x n] returning the
eigenvectors of A. It is an intent(out) argument.
Note
Eigenvalues and eigenvectors of the Strang matrix are known analytically and can thus be constructed very efficiently.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Strang), | intent(in) | :: | A |
Input matrix. |
||
| real(kind=dp), | intent(out), | allocatable | :: | lambda(:) |
Eigenvalues. |
|
| real(kind=dp), | intent(out), | allocatable | :: | vectors(:,:) |
Eigenvectors. |