|
NAG[f02adc] NAG[nag_real_symm_general_eigenvalues] - All eigenvalues of generalized real symmetric-definite eigenproblem
|
|
Calling Sequence
f02adc(a, b, r, 'n'=n, 'tda'=tda, 'tdb'=tdb, 'fail'=fail)
nag_real_symm_general_eigenvalues(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
On exit: the lower triangle of the array is overwritten. The rest of the array is unchanged.
|
|
|
b - Matrix(1..n, 1..tdb, datatype=float[8], order=C_order);
|
|
|
On exit: the elements below the diagonal are overwritten. 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, b, r and the second dimension of the arrays a, b, rthe arrays a, b.
|
|
Constraint: . .
|
|
|
'tda'=tda - integer; (optional)
|
|
|
On entry: the second dimension of the array a as declared in the function from which nag_real_symm_general_eigenvalues (f02adc) is called.
|
|
Constraint: . .
|
|
|
'tdb'=tdb - integer; (optional)
|
|
|
On entry: the second dimension of the array b as declared in the function from which nag_real_symm_general_eigenvalues (f02adc) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_symm_general_eigenvalues (f02adc) calculates all the eigenvalues of , where is a real symmetric matrix and is a real symmetric positive-definite matrix.
|
|
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_NOT_POS_DEF"
The matrix is not positive-definite, possibly due to rounding errors.
"NE_TOO_MANY_ITERATIONS"
More than iterations are required to isolate all the eigenvalues.
|
|
Accuracy
|
|
In general this function is very accurate. However, if is ill-conditioned with respect to inversion, the eigenvalues could be inaccurately determined. For a detailed error analysis see pages 310, 222 and 235 Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_symm_general_eigenvalues (f02adc) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 4:
tda := 4:
tdb := 4:
a := Matrix([[0.5, 1.5, 6.6, 4.8], [1.5, 6.5, 16.2, 8.6], [6.6, 16.2, 37.6, 9.800000000000001], [4.8, 8.6, 9.800000000000001, -17.1]], datatype=float[8], order='C_order'):
b := Matrix([[1, 3, 4, 1], [3, 13, 16, 11], [4, 16, 24, 18], [1, 11, 18, 27]], datatype=float[8], order='C_order'):
r := Vector(4, datatype=float[8]):
NAG:-f02adc(a, b, r, 'n' = n, 'tda' = tda, 'tdb' = tdb):
|
|
|