TMtx.EigSymGen Method

Overload List

#SignatureDescription
1procedure EigSymGen(const B: TMtx; const D: TVec; const EigGenType: TEigGenType = etAzBz); overload;
2procedure EigSymGen(const B: TMtx; const D: TVec; const V: TMtx; const EigGenType: TEigGenType = etAzBz); overload;Computes all the eigenvalues, and optionally, the eigenvectors of a generalized symmetric-definite eigenproblem.
3procedure EigSymGen(const B: TMtx; const D: TVec; Minimum, Maximum: double; V: TMtx; var VInfo: TIntegerArray; Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;Computes generalized eigenvalues with reduction of the symmetric-definite generalized eigenvalues/eigenvectors problem to the normal eigenvalue case.
4procedure EigSymGen(const B: TMtx; const D: TVec; const Minimum, Maximum: double; const Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;
5procedure EigSymGen(const B: TMtx; const D: TVec; LowerRange, UpperRange: integer; V: TMtx; var VInfo: TIntegerArray; Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;Computes generalized eigenvalues with reduction of the symmetric-definite generalized eigenvalues/eigenvectors problem to the normal eigenvalue case.
6procedure EigSymGen(const B: TMtx; const D: TVec; const LowerRange, UpperRange: integer; const Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;

Overload 1: procedure EigSymGen(const B: TMtx; const D: TVec; const EigGenType: TEigGenType = etAzBz); overload;

#NameTypeDescription
1BTMtxsource TMtx
2DTVecsource TVec
3EigGenTypeTEigGenType

Result: stored in self (calling object)

Overload 2: procedure EigSymGen(const B: TMtx; const D: TVec; const V: TMtx; const EigGenType: TEigGenType = etAzBz); overload;

Computes all the eigenvalues, and optionally, the eigenvectors of a generalized symmetric-definite eigenproblem.

#NameTypeDescription
1BTMtxsource TMtx
2DTVecsource TVec
3VTMtxsource TMtx
4EigGenTypeTEigGenType

Result: stored in self (calling object)

Remarks:

It can find solution to either of the following problems:

A x=λ B x,A B x=λ x,orB A x=λ xA\,x = \lambda\,B\,x, \qquad A\,B\,x = \lambda\,x, \qquad \mathrm{or} \qquad B\,A\,x = \lambda\,x

Here A and B are assumed to be symmetric (Hermitian) and B is also positive definite. Eigenvector are stored within V in columns.

Examples
var  D: TVec;
    A,B,C: TMtx;
begin
    CreateIt(D);
    CreateIt(A,B,C);
    try
        D.SetIt(2  ,False,[0,2]); // vector, length 2, real
        A.SetIt(2,2,False,[1,2,
            2,4]);  // 2x2, real matrix
        // A must be symmetric
        B.SetIt(2,2,False,[1,1,
            1,2]);  // 2x2, real matrix
        // B must be symmetric and positive definite
        A.EigSymGen(B,D);   // Use A and B to find eigenvalues
    finally
        FreeIt(A,B,C);
        FreeIt(D);
    end;
end;
See Also: TMtx.Eig, TMtx.Eig, TMtx.Eig, TMtx.Eig

Overload 3: procedure EigSymGen(const B: TMtx; const D: TVec; Minimum, Maximum: double; V: TMtx; var VInfo: TIntegerArray; Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;

Computes generalized eigenvalues with reduction of the symmetric-definite generalized eigenvalues/eigenvectors problem to the normal eigenvalue case.

#NameTypeDescription
1BTMtxsource TMtx
2DTVecsource TVec
3Minimumdoublescalar
4Maximumdoublescalar
5VTMtxsource TMtx
6VInfoTIntegerArray
7Tolerancedoublescalar
8EigGenTypeTEigGenType

Result: stored in self (calling object)

Remarks:

The routine computes selected eigenvalues and optionally also eigenvectors. The problem is of type:

A x=λ B x,A B x=λ x,orB A x=λ xA\,x = \lambda\,B\,x, \qquad A\,B\,x = \lambda\,x, \qquad \mathrm{or} \qquad B\,A\,x = \lambda\,x

A and B are symmetric (Hermitian) and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying a range of values. Eigenvectors are not computed, if V is passed as nil. (NULL).

Tolerance parameter specifies the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

Tolerance + EPS / max( |a|,|b| ) ,

where EPS is the machine precision. If Tolerance is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

Eigenvalues will be computed most accurately when Tolerance is set to twice the underflow threshold, not zero. If this routine returns fails , indicating that some eigenvectors did not converge, try setting Tolerance to 2*UnderflowThreshold.

If V is assinged, VInfo contains values equal to 0 at indices for which eigenvector calculation converged. Eigenvector are stored within V in columns. The returned column count may vary between calls depending on the number of eigenvectors that converged. The eigenvectors are normalized as follows:

etAzBz, etBAz, Z**T*B*Z := I;
etABz        , Z**T*inv(B)*Z := I.

[Lapack Users Guide](Lapack Users Guide).

Overload 4: procedure EigSymGen(const B: TMtx; const D: TVec; const Minimum, Maximum: double; const Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;

#NameTypeDescription
1BTMtxsource TMtx
2DTVecsource TVec
3Minimumdoublescalar
4Maximumdoublescalar
5Tolerancedoublescalar
6EigGenTypeTEigGenType

Result: stored in self (calling object)

Overload 5: procedure EigSymGen(const B: TMtx; const D: TVec; LowerRange, UpperRange: integer; V: TMtx; var VInfo: TIntegerArray; Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;

Computes generalized eigenvalues with reduction of the symmetric-definite generalized eigenvalues/eigenvectors problem to the normal eigenvalue case.

#NameTypeDescription
1BTMtxsource TMtx
2DTVecsource TVec
3LowerRangeinteger
4UpperRangeinteger
5VTMtxsource TMtx
6VInfoTIntegerArray
7Tolerancedoublescalar
8EigGenTypeTEigGenType

Result: stored in self (calling object)

Remarks:

The routine computes selected eigenvalues and optionally also eigenvectors. The problem is of type:

A x=λ B x,A B x=λ x,orB A x=λ xA\,x = \lambda\,B\,x, \qquad A\,B\,x = \lambda\,x, \qquad \mathrm{or} \qquad B\,A\,x = \lambda\,x

A and B are symmetric (Hermitian) and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying a range of indexes of values. Eigenvectors are not computed, if V is passed as nil (NULL).

Tolerance parameter specifies the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to

Tolerance + EPS / max( |a|,|b| ) ,

where EPS is the machine precision. If Tolerance is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.

Eigenvalues will be computed most accurately when Tolerance is set to twice the underflow threshold, not zero. If this routine returns fails , indicating that some eigenvectors did not converge, try setting Tolerance to 2*UnderflowThreshold.

The first eigenvalue index is 1 and the last index is equal to row/column count. LowerRange and UpperRange need to be specified within this interval: 1 <= LowerRange <= UpperRange <= Rows

If V is assinged, VInfo contains values equal to 0 at indices for which eigenvector calculation converged. Eigenvector are stored within V in columns. The returned column count may vary between calls depending on the number of eigenvectors that converged. The eigenvectors are normalized as follows:

etAzBz, etBAz, Z**T*B*Z := I;
etABz        , Z**T*inv(B)*Z := I.

Overload 6: procedure EigSymGen(const B: TMtx; const D: TVec; const LowerRange, UpperRange: integer; const Tolerance: double = 0; const EigGenType: TEigGenType = etAzBz); overload;

#NameTypeDescription
1BTMtxsource TMtx
2DTVecsource TVec
3LowerRangeinteger
4UpperRangeinteger
5Tolerancedoublescalar
6EigGenTypeTEigGenType

Result: stored in self (calling object)