Skip to content

Commit 1c1a33f

Browse files
committed
document eig
1 parent bcdfa31 commit 1c1a33f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

doc/specs/stdlib_linalg.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,20 +987,30 @@ Stable
987987

988988
### Description
989989

990-
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.
990+
This subroutine computes the solution to the eigenproblem \( A \cdot \bar{v} - \lambda \cdot \bar{v} \),
991+
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} \),
992+
where \( B \) is a square matrix with the same type and kind as \( A \).
991993

992994
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 \).
993995
Both `left` and `right` are rank-2 arrays, where eigenvectors are stored as columns.
994-
The solver is based on LAPACK's `*GEEV` backends.
996+
The solver is based on LAPACK's `*GEEV` and `*GGEV` backends.
995997

996998
### Syntax
997999

1000+
For the standard eigenproblem:
1001+
9981002
`call ` [[stdlib_linalg(module):eig(interface)]] `(a, lambda [, right] [,left] [,overwrite_a] [,err])`
9991003

1004+
For the generalized eigenproblem:
1005+
1006+
`call ` [[stdlib_linalg(module):eig(interface)]] `(a, b, lambda [, right] [, left] [, overwrite_a] [, overwrite_b] [, err])
1007+
10001008
### Arguments
10011009

10021010
`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.
10031011

1012+
`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.
1013+
10041014
`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.
10051015

10061016
`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.
@@ -1009,6 +1019,8 @@ The solver is based on LAPACK's `*GEEV` backends.
10091019

10101020
`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.
10111021

1022+
`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.
1023+
10121024
`err` (optional): Shall be a `type(linalg_state_type)` value. This is an `intent(out)` argument.
10131025

10141026
### Return value

0 commit comments

Comments
 (0)