|
NAG[f02aec] NAG[nag_real_symm_general_eigensystem] - All eigenvalues and eigenvectors of generalized real symmetric-definite eigenproblem
|
|
Calling Sequence
f02aec(a, b, r, v, 'n'=n, 'tda'=tda, 'tdb'=tdb, 'tdv'=tdv, 'fail'=fail)
nag_real_symm_general_eigensystem(. . .)
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. See also Section [Further Comments]
|
|
|
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.
|
|
|
v - Matrix(1..n, 1..tdv, datatype=float[8], order=C_order);
|
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, b, r, v and the second dimension of the arrays a, b, r, vthe arrays a, b, v.
|
|
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_eigensystem (f02aec) 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_eigensystem (f02aec) is called.
|
|
Constraint: . .
|
|
|
'tdv'=tdv - integer; (optional)
|
|
|
On entry: the second dimension of the array v as declared in the function from which nag_real_symm_general_eigensystem (f02aec) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_symm_general_eigensystem (f02aec) calculates all the eigenvalues and eigenvectors 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 eigenvectors could be inaccurately determined. For a detailed error analysis see pages 310, 222 and 235 of Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_symm_general_eigensystem (f02aec) is approximately proportional to .
The function may be called with the same actual array supplied for arguments a and v, in which case the eigenvectors will overwrite the original matrix .
|
|
|
Examples
|
|
>
|
n := 4:
tda := 4:
tdb := 4:
tdv := 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]):
v := Matrix(4, 4, datatype=float[8], order='C_order'):
NAG:-f02aec(a, b, r, v, 'n' = n, 'tda' = tda, 'tdb' = tdb, 'tdv' = tdv):
|
|
|