|
NAG[f02bjc] NAG[nag_real_general_eigensystem] - All eigenvalues and optionally eigenvectors of real generalized eigenproblem, by algorithm
|
|
Calling Sequence
f02bjc(a, b, tol, alfa, beta, wantv, iter, 'n'=n, 'tda'=tda, 'tdb'=tdb, 'v'=v, 'tdv'=tdv, 'fail'=fail)
nag_real_general_eigensystem(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
On exit: the array is overwritten.
|
|
|
b - Matrix(1..n, 1..tdb, datatype=float[8], order=C_order);
|
|
|
On exit: the array is overwritten.
|
|
|
tol - float;
|
|
|
On entry: the tolerance used to determine negligible elements.
|
|
An element will be considered negligible if it is less than tol times the norm of its matrix.
|
|
machine precision is used in place of tol.
|
|
A value of tol greater than machine precision may result in faster execution but less accurate results.
|
|
|
alfa - Vector(1..n, datatype=complex[8]);
|
|
|
On exit: , for .
|
|
|
beta - Vector(1..n, datatype=float[8]);
|
|
|
On exit: , for .
|
|
|
wantv - boolean;
|
|
|
On entry: wantv must be set to true if the eigenvectors are required. If wantv is set to false then the array v is not referenced.
|
|
|
iter - Vector(1..n, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, b, alfa, beta, v, iter and the second dimension of the arrays a, b, alfa, beta, v, iterthe 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_general_eigensystem (f02bjc) 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_general_eigensystem (f02bjc) is called.
|
|
Constraint: . .
|
|
|
'v'=v - Matrix(1..n, 1..tdv, datatype=float[8], order=C_order); (optional)
|
|
|
On exit: if , then
|
|
if the th eigenvalue is real, the th column of v contains its eigenvector;
|
|
Each eigenvector is normalized so that the component of largest modulus is real and the sum of squares of the moduli equal one.
|
|
If , v is not referenced and may be set to the null pointer, i.e., (double *)0.
|
|
|
'tdv'=tdv - integer; (optional)
|
|
|
On entry: the second dimension of the array v as declared in the function from which nag_real_general_eigensystem (f02bjc) is called.
|
|
Constraint: if , . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Further Comments
|
|
The time taken by nag_real_general_eigensystem (f02bjc) is approximately proportional to and also depends on the value chosen for argument tol.
|
|
|
Examples
|
|
>
|
n := 4:
tda := 4:
tdb := 4:
tol := 1.111307226797642e-16:
wantv := true:
tdv := 4:
a := Matrix([[3.9, 12.5, -34.5, -0.5], [4.3, 21.5, -47.5, 7.5], [4.3, 21.5, -43.5, 3.5], [4.4, 26, -46, 6]], datatype=float[8], order='C_order'):
b := Matrix([[1, 2, -3, 1], [1, 3, -5, 4], [1, 3, -4, 3], [1, 3, -4, 4]], datatype=float[8], order='C_order'):
alfa := Vector(4, datatype=complex[8]):
beta := Vector(4, datatype=float[8]):
v := Matrix(4, 4, datatype=float[8], order='C_order'):
iter := Vector(4, datatype=integer[kernelopts('wordsize')/8]):
NAG:-f02bjc(a, b, tol, alfa, beta, wantv, iter, 'n' = n, 'tda' = tda, 'tdb' = tdb, 'v' = v, 'tdv' = tdv):
|
|
|
See Also
|
|
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256
Ward R C (1975) The combination shift algorithm SIAM J. Numer. Anal. 12 835–853
Wilkinson J H (1979) Kronecker's canonical form and the algorithm Linear Algebra Appl. 28 285–303
f02 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|