f08fb computes selected eigenvalues and, optionally, eigenvectors of a real by symmetric matrix . Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
Syntax
C# |
---|
public static void f08fb( string jobz, string range, string uplo, int n, double[,] a, double vl, double vu, int il, int iu, double abstol, out int m, double[] w, double[,] z, int[] jfail, out int info ) |
Visual Basic |
---|
Public Shared Sub f08fb ( _ jobz As String, _ range As String, _ uplo As String, _ n As Integer, _ a As Double(,), _ vl As Double, _ vu As Double, _ il As Integer, _ iu As Integer, _ abstol As Double, _ <OutAttribute> ByRef m As Integer, _ w As Double(), _ z As Double(,), _ jfail As Integer(), _ <OutAttribute> ByRef info As Integer _ ) |
Visual C++ |
---|
public: static void f08fb( String^ jobz, String^ range, String^ uplo, int n, array<double,2>^ a, double vl, double vu, int il, int iu, double abstol, [OutAttribute] int% m, array<double>^ w, array<double,2>^ z, array<int>^ jfail, [OutAttribute] int% info ) |
F# |
---|
static member f08fb : jobz : string * range : string * uplo : string * n : int * a : float[,] * vl : float * vu : float * il : int * iu : int * abstol : float * m : int byref * w : float[] * z : float[,] * jfail : int[] * info : int byref -> unit |
Parameters
- jobz
- Type: System..::..StringOn entry: indicates whether eigenvectors are computed.
- Only eigenvalues are computed.
- Eigenvalues and eigenvectors are computed.
Constraint: or .
- range
- Type: System..::..StringOn entry: if , all eigenvalues will be found.If , all eigenvalues in the half-open interval will be found.Constraint: , or .
- uplo
- Type: System..::..StringOn entry: if , the upper triangular part of is stored.If , the lower triangular part of is stored.Constraint: or .
- n
- Type: System..::..Int32On entry: , the order of the matrix .Constraint: .
- a
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, dim2]Note: dim1 must satisfy the constraint:Note: the second dimension of the array a must be at least .On entry: the by symmetric matrix .
- If , the upper triangular part of must be stored and the elements of the array below the diagonal are not referenced.
- If , the lower triangular part of must be stored and the elements of the array above the diagonal are not referenced.
On exit: the lower triangle (if ) or the upper triangle (if ) of a, including the diagonal, is overwritten.
- vl
- Type: System..::..DoubleOn entry: if , the lower and upper bounds of the interval to be searched for eigenvalues.Constraint: if , .
- vu
- Type: System..::..DoubleOn entry: if , the lower and upper bounds of the interval to be searched for eigenvalues.Constraint: if , .
- il
- Type: System..::..Int32On entry: if , the indices (in ascending order) of the smallest and largest eigenvalues to be returned.Constraints:
- if and , and ;
- if and , .
- iu
- Type: System..::..Int32On entry: if , the indices (in ascending order) of the smallest and largest eigenvalues to be returned.Constraints:
- if and , and ;
- if and , .
- abstol
- Type: System..::..DoubleOn entry: the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval of width less than or equal towhere is the machine precision. If abstol is less than or equal to zero, then will be used in its place, where is the tridiagonal matrix obtained by reducing to tridiagonal form. Eigenvalues will be computed most accurately when abstol is set to twice the underflow threshold , not zero. If this method returns with , indicating that some eigenvectors did not converge, try setting abstol to . See Demmel and Kahan (1990).
- m
- Type: System..::..Int32%On exit: the total number of eigenvalues found. .If , .If , .
- w
- Type: array<System..::..Double>[]()[][]An array of size [dim1]Note: the dimension of the array w must be at least .On exit: the first m elements contain the selected eigenvalues in ascending order.
- z
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, dim2]Note: dim1 must satisfy the constraint:
- if , ;
- otherwise .
Note: the second dimension of the array z must be at least if , and at least otherwise.On exit: if , then- if , the first m columns of contain the orthonormal eigenvectors of the matrix corresponding to the selected eigenvalues, with the th column of holding the eigenvector associated with ;
- if an eigenvector fails to converge (), then that column of contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in jfail.
If , z is not referenced.
- jfail
- Type: array<System..::..Int32>[]()[][]An array of size [dim1]Note: the dimension of the array jfail must be at least .
- info
- Type: System..::..Int32%On exit: unless the method detects an error (see [Error Indicators and Warnings]).
Description
The symmetric matrix is first reduced to tridiagonal form, using orthogonal similarity transformations. The required eigenvalues and eigenvectors are then computed from the tridiagonal matrix; the method used depends upon whether all, or selected, eigenvalues and eigenvectors are required.
References
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia http://www.netlib.org/lapack/lug
Demmel J W and Kahan W (1990) Accurate singular values of bidiagonal matrices SIAM J. Sci. Statist. Comput. 11 873–912
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Error Indicators and Warnings
Some error messages may refer to parameters that are dropped from this interface
(LDA, LDZ) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.
- If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
Accuracy
The computed eigenvalues and eigenvectors are exact for a nearby matrix , where
and is the machine precision. See Section 4.7 of Anderson et al. (1999) for further details.
Parallelism and Performance
None.
Further Comments
The total number of floating-point operations is proportional to .
The complex analogue of this method is f08fp.
Example
This example finds the eigenvalues in the half-open interval , and the corresponding eigenvectors, of the symmetric matrix
Example program (C#): f08fbe.cs