|
NAG[f08jcc] NAG[nag_dstevd] - All eigenvalues and optionally all eigenvectors of real symmetric tridiagonal matrix (divide-and-conquer)
|
|
Calling Sequence
f08jcc(job, d, e, z, 'n'=n, 'fail'=fail)
nag_dstevd(. . .)
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". .
|
|
|
d - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array d must be at least .
|
|
On entry: the diagonal elements of the tridiagonal matrix .
|
|
On exit: the eigenvalues of the matrix in ascending order.
|
|
|
e - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array e must be at least .
|
|
On exit: the array is overwritten with intermediate results.
|
|
|
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 d.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dstevd (f08jcc) computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix. 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.
If is an exact eigenvalue and is the corresponding computed value, then
where is a modestly increasing function of .
If is the corresponding exact eigenvector, and is the corresponding computed eigenvector, then the angle between them is bounded as follows:
Thus the accuracy of a computed eigenvector depends on the gap between its eigenvalue and all the other eigenvalues.
|
|
Further Comments
|
|
There is no complex analogue of this function.
|
|
|
Examples
|
|
>
|
job := "Nag_EigVecs":
n := 4:
d := Vector([1, 4, 9, 16], datatype=float[8]):
e := Vector([1, 2, 3, 7.660404805384633e-312], datatype=float[8]):
z := Matrix(4, 4, datatype=float[8]):
NAG:-f08jcc(job, d, e, z, 'n' = n):
|
|
|