|
NAG[f02aac] NAG[nag_real_symm_eigenvalues] - All eigenvalues of real symmetric matrix
|
|
Calling Sequence
f02aac(a, r, 'n'=n, 'tda'=tda, 'fail'=fail)
nag_real_symm_eigenvalues(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
On exit: the elements of below the diagonal are overwritten, and the rest of the array is unchanged.
|
|
|
r - Vector(1..n, datatype=float[8]);
|
|
|
On exit: the eigenvalues in ascending order.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, r and the second dimension of the arrays a, rthe array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'tda'=tda - integer; (optional)
|
|
|
On entry: the second dimension of the array a as declared in the function from which nag_real_symm_eigenvalues (f02aac) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_symm_eigenvalues (f02aac) calculates all the eigenvalues of a real symmetric matrix.
|
|
Description
|
|
nag_real_symm_eigenvalues (f02aac) reduces the real symmetric matrix to a real symmetric tridiagonal matrix using Householder's method. The eigenvalues of the tridiagonal matrix are then determined using the algorithm.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_INT_ARG_LT"
On entry, n must not be less than 1: .
"NE_TOO_MANY_ITERATIONS"
More than iterations are required to isolate all the eigenvalues.
|
|
Accuracy
|
|
The accuracy of the eigenvalues depends on the sensitivity of the matrix to rounding errors produced in tridiagonalisation. For a detailed error analysis see pages 222 and 235 of Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_symm_eigenvalues (f02aac) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 4:
tda := 4:
a := Matrix([[0.5, 0, 2.3, -2.6], [0, 0.5, -1.4, -0.7], [2.3, -1.4, 0.5, 0], [-2.6, -0.7, 0, 0.5]], datatype=float[8], order='C_order'):
r := Vector(4, datatype=float[8]):
NAG:-f02aac(a, r, 'n' = n, 'tda' = tda):
|
|
|