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

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

Pascal
procedure EigSymGen(B: TMtx; D: TVec; V: TMtx; 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!