|
NAG[f08gcc] NAG[nag_dspevd] - All eigenvalues and optionally all eigenvectors of real symmetric matrix, packed storage (divide-and-conquer)
|
|
Calling Sequence
f08gcc(job, uplo, ap, w, z, 'n'=n, 'fail'=fail)
nag_dspevd(. . .)
Parameters
|
job - String;
|
|
|
On entry: indicates whether eigenvectors are computed.
|
|
Only eigenvalues are computed.
|
|
Eigenvalues and eigenvectors are computed.
|
|
Constraint: "Nag_DoNothing" or "Nag_EigVecs". .
|
|
|
uplo - String;
|
|
|
On entry: indicates whether the upper or lower triangular part of is stored.
|
|
The upper triangular part of is stored.
|
|
The lower triangular part of is stored.
|
|
Constraint: "Nag_Upper" or "Nag_Lower". .
|
|
|
ap - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array ap must be at least .
|
|
On entry: the symmetric matrix , packed by rows or columns. The storage of elements depends on the storage order and uplo arguments as follows:
|
|
On exit: is overwritten by the values generated during the reduction to tridiagonal form. The elements of the diagonal and the off-diagonal of the tridiagonal matrix overwrite the corresponding elements of .
|
|
|
w - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array w must be at least .
|
|
On exit: the eigenvalues of the matrix in ascending order.
|
|
|
z - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
If , z is not referenced.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array ap.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dspevd (f08gcc) computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric matrix held in packed storage. If the eigenvectors are requested, then it uses a divide-and-conquer algorithm to compute eigenvalues and eigenvectors. However, if only eigenvalues are required, then it uses the Pal–Walker–Kahan variant of the or algorithm.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_CONVERGENCE"
The algorithm failed to converge, elements of an intermediate tridiagonal form did not converge to zero.
"NE_INT"
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
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.
|
|
|
Examples
|
|
>
|
job := "Nag_EigVecs":
uplo := "Nag_Lower":
n := 4:
ap := Vector([1, 2, 2, 3, 3, 3, 4, 4, 4, 4], datatype=float[8], order='C_order'):
w := Vector(4, datatype=float[8]):
z := Matrix(4, 4, datatype=float[8], order='C_order'):
NAG:-f08gcc(job, uplo, ap, w, z, 'n' = n):
|
|
|
See Also
|
|
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
f08 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|