1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
{ ******************************************************************
Eigenvalues of a general square matrix
****************************************************************** }
unit ueigval;
interface
uses
utypes, ubalance, uelmhes, uhqr;
procedure EigenVals(A : PMatrix;
Lb, Ub : Integer;
Lambda : PCompVector);
implementation
procedure EigenVals(A : PMatrix;
Lb, Ub : Integer;
Lambda : PCompVector);
var
I_low, I_igh : Integer;
Scale : PVector;
I_int : PIntVector;
begin
DimVector(Scale, Ub);
DimIntVector(I_Int, Ub);
Balance(A, Lb, Ub, I_low, I_igh, Scale);
ElmHes(A, Lb, Ub, I_low, I_igh, I_int);
Hqr(A, Lb, Ub, I_low, I_igh, Lambda);
DelVector(Scale, Ub);
DelIntVector(I_Int, Ub);
end;
end.
|