|
5.1.123 qrds
Syntax:
qrds ( matrix_expression, number_expression,
number_expression, number_expression)
Type:
- list
Purpose:
- computes all eigenvalues with multiplicities of the given matrix
by performing the numeric QR double shift algorithm involving
Hessenberg form and householder transformations.
This method expects the ground field to be the complex numbers,
and all matrix entries to be real numbers, i.e., elements of this
ground field with the imaginary part equal to zero.
If the algorithm works, then it returns a list with two entries which
are again lists of the same size:
_[1][i] is the i-th mutually distinct eigenvalue that was found,
_[2][i] is the (int) multiplicity of _[1][i].
If the algorithm does not work (due to an ill-posed matrix), a list with
the single entry (int)0 is returned.
The first number argument is used for detection of deflation in the
actual QR double shift algorithm. The second number argument is used
for ending Heron's iteration whenever square roots are being computed.
And the third number argument is used to distinguish between distinct
eigenvalues: When the Euclidean distance between two computed eigenvalues
is less then this number, then they will be regarded equal, resulting in
a higher multiplicity of the corresponding eigenvalue. (A good choice
for all three number arguments is a small value like e.g. 10^(-100).)
Example:
| ring r=(complex,50),(dummy),dp;
matrix A[3][3]=-10,37,-5,-14,51,-10,-29,99,-18;
bigint b = bigint(10)^100; number t = 1/b;
list L=qrds(A,t,t,t); L;
==> [1]:
==> [1]:
==> (3+i*2)
==> [2]:
==> (3-i*2)
==> [3]:
==> 17
==> [2]:
==> [1]:
==> 1
==> [2]:
==> 1
==> [3]:
==> 1
|
|