f08fa computes all the eigenvalues and, optionally, all the eigenvectors of a real by symmetric matrix .
Syntax
C# |
---|
public static void f08fa( string jobz, string uplo, int n, double[,] a, double[] w, out int info ) |
Visual Basic |
---|
Public Shared Sub f08fa ( _ jobz As String, _ uplo As String, _ n As Integer, _ a As Double(,), _ w As Double(), _ <OutAttribute> ByRef info As Integer _ ) |
Visual C++ |
---|
public: static void f08fa( String^ jobz, String^ uplo, int n, array<double,2>^ a, array<double>^ w, [OutAttribute] int% info ) |
F# |
---|
static member f08fa : jobz : string * uplo : string * n : int * a : float[,] * w : float[] * 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 .
- 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.
- w
- Type: array<System..::..Double>[]()[][]An array of size [n]On exit: the eigenvalues in ascending order.
- 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, and then the algorithm is applied to the tridiagonal matrix to compute the eigenvalues and (optionally) the eigenvectors.
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
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) 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.
- If , the algorithm failed to converge; off-diagonal elements of an intermediate tridiagonal form did not converge to zero.
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 (F08FNF not in this release).
Example
This example finds all the eigenvalues and eigenvectors of the symmetric matrix
together with approximate error bounds for the computed eigenvalues and eigenvectors.
Example program (C#): f08fae.cs