You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/specs/stdlib_linalg.md
+38-13
Original file line number
Diff line number
Diff line change
@@ -1091,20 +1091,30 @@ Stable
1091
1091
1092
1092
### Description
1093
1093
1094
-
This subroutine computes the solution to the eigenproblem \( A \cdot \bar{v} - \lambda \cdot \bar{v} \), where \( A \) is a square, full-rank, `real` or `complex` matrix.
1094
+
This subroutine computes the solution to the eigenproblem \( A \cdot \bar{v} - \lambda \cdot \bar{v} \),
1095
+
where \( A \) is a square, full-rank, `real` or `complex` matrix, or to the generalized eigenproblem \( A \cdot \bar{v} - \lambda \cdot B \cdot \bar{v} \),
1096
+
where \( B \) is a square matrix with the same type, kind and size as \( A \).
1095
1097
1096
1098
Result array `lambda` returns the eigenvalues of \( A \). The user can request eigenvectors to be returned: if provided, on output `left` will contain the left eigenvectors, `right` the right eigenvectors of \( A \).
1097
1099
Both `left` and `right` are rank-2 arrays, where eigenvectors are stored as columns.
1098
-
The solver is based on LAPACK's `*GEEV` backends.
1100
+
The solver is based on LAPACK's `*GEEV`(standard eigenproblem) and `*GGEV` (generalized eigenproblem) backends.
`a` : `real` or `complex` square array containing the coefficient matrix. If `overwrite_a=.false.`, it is an `intent(in)` argument. Otherwise, it is an `intent(inout)` argument and is destroyed by the call.
1107
1115
1116
+
`b`: `real` or `complex` square array containing the second coefficient matrix. If `overwrite_b=.false.`, it is an `intent(in)` argument. Otherwise, it is an `intent(inout)` argument and is destroyed by the call.
1117
+
1108
1118
`lambda`: Shall be a `complex` or `real` rank-1 array of the same kind as `a`, containing the eigenvalues, or their `real` component only. It is an `intent(out)` argument.
1109
1119
1110
1120
`right` (optional): Shall be a `complex` rank-2 array of the same size and kind as `a`, containing the right eigenvectors of `a`. It is an `intent(out)` argument.
@@ -1113,6 +1123,8 @@ The solver is based on LAPACK's `*GEEV` backends.
1113
1123
1114
1124
`overwrite_a` (optional): Shall be an input logical flag. if `.true.`, input matrix `a` will be used as temporary storage and overwritten. This avoids internal data allocation. This is an `intent(in)` argument.
1115
1125
1126
+
`overwrite_b` (optional): Shall be an input logical flag. If `.true.`, input matrix `b` will be used as temporary storage and overwritten. This avoids internal data allocation. This is an `intent(in)` argument.
1127
+
1116
1128
`err` (optional): Shall be a `type(linalg_state_type)` value. This is an `intent(out)` argument.
1117
1129
1118
1130
### Return value
@@ -1185,28 +1197,41 @@ Stable
1185
1197
1186
1198
### Description
1187
1199
1188
-
This function returns the eigenvalues to matrix \( A \): a square, full-rank, `real` or `complex` matrix.
1189
-
The eigenvalues are solutions to the eigenproblem \( A \cdot \bar{v} - \lambda \cdot \bar{v} \).
1200
+
This function computes the eigenvalues for either a standard or generalized eigenproblem:
1190
1201
1191
-
Result array `lambda` is `complex`, and returns the eigenvalues of \( A \).
1192
-
The solver is based on LAPACK's `*GEEV` backends.
1202
+
-**Standard eigenproblem**: \( A \cdot \bar{v} - \lambda \cdot \bar{v} \), where \( A \) is a square, full-rank `real` or `complex` matrix.
1203
+
-**Generalized eigenproblem**: \( A \cdot \bar{v} - \lambda \cdot B \cdot \bar{v} \), where \( B \) is a square matrix with the same type and kind as \( A \).
1204
+
1205
+
The eigenvalues are stored in the result array `lambda`, which is `complex` (even for real input matrices).
1206
+
The solver uses LAPACK's `*GEEV` and `*GGEV` backends for the standard and generalized problems, respectively.
0 commit comments