|
NAG[f08juc] NAG[nag_zpteqr] - All eigenvalues and eigenvectors of real symmetric positive-definite tridiagonal matrix, reduced from complex Hermitian positive-definite matrix
|
|
Calling Sequence
f08juc(compz, d, e, z, 'n'=n, 'fail'=fail)
nag_zpteqr(. . .)
Parameters
|
compz - String;
|
|
|
On entry: indicates whether the eigenvectors are to be computed.
|
|
Only the eigenvalues are computed (and the array z is not referenced).
|
|
The eigenvalues and eigenvectors of are computed (and the array z is initialized by the function).
|
|
Constraint: "Nag_NotZ", "Nag_UpdateZ" or "Nag_InitZ". .
|
|
|
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 in descending order, unless , in which case the array is overwritten.
|
|
|
e - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array e must be at least .
|
|
On entry: the off-diagonal elements of the tridiagonal matrix .
|
|
On exit: the array is overwritten.
|
|
|
z - Matrix(1..dim1, 1..dim2, datatype=complex[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.
|
|
On entry: if , z must contain the unitary matrix from the reduction to tridiagonal form.
|
|
If , z need not be set.
|
|
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_zpteqr (f08juc) computes all the eigenvalues and, optionally, all the eigenvectors of a complex Hermitian positive-definite matrix which has been reduced to tridiagonal form.
|
|
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 to compute the singular values of the Cholesky factor failed to converge; off-diagonalelements did not converge to zero.
The leading minor of order is not positive-definiteand the Cholesky factorization of could not becompleted. Hence itself is not positive-definite.
"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 eigenvalues and eigenvectors of are computed to high relative accuracy which means that if they vary widely in magnitude, then any small eigenvalues (and corresponding eigenvectors) will be computed more accurately than, for example, with the standard method. However, the reduction to tridiagonal form (prior to calling the function) may exclude the possibility of obtaining high relative accuracy in the small eigenvalues of the original matrix if its eigenvalues vary widely in magnitude.
To be more precise, let be the tridiagonal matrix defined by , where is diagonal with , and for all . If is an exact eigenvalue of and is the corresponding computed value, then
where is a modestly increasing function of , is the machine precision, and is the condition number of with respect to inversion defined by: .
If is the corresponding exact eigenvector of , and is the corresponding computed eigenvector, then the angle between them is bounded as follows:
where is the relative gap between and the other eigenvalues, defined by
|
|
|
Examples
|
|
>
|
compz := "Nag_UpdateZ":
n := 4:
d := Vector([6.02, 2.738844788384059, 5.173556804164482, 2.467598407451455], datatype=float[8]):
e := Vector([2.74238946905796, 1.835961995070032, 1.695211553772095], datatype=float[8]):
z := Matrix([[1 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , -0.1640904784230299 -0.09116137690168336*I , 0.04492226830902452 -0.1991468061366732*I , -0.7606249187911639 -0.5869720526411455*I ], [0 +0*I , -0.4740391598887533 -0.6344831832357161*I , -0.4067593168412005 +0.4544041694574636*I , 0.0219376925227668 +0.01733238795915075*I ], [0 +0*I , 0.5287359860297633 +0.240666035020444*I , -0.1787167294506699 +0.7446116967739245*I , -0.2225496702687938 -0.1631058324212738*I ]], datatype=complex[8]):
NAG:-f08juc(compz, d, e, z, 'n' = n):
|
|
|