You are here: Symbol Reference > MtxVec Namespace > Classes > TMtx Class > public > EigSymGen Method > TMtx.EigSymGen Method (TMtx, TVec, TMtx, TEigGenType)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtx.EigSymGen Method (TMtx, TVec, TMtx, TEigGenType)

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

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

It can find solution to either of the following problems:

A*x = lambda*B*x, A*B*x = lambda*x, or 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.

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;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!