📄 ebk&nvsunits.txt
字号:
unit MathTypes
- definitions of vectors and matrices of various types
- memory management routines
unit LinAlg
tred2 - Householder (tridiagonal) reduction of a real, symmetric matrix }
tqli - QL diagonalization algorithm with implicit shifts for a real tridiaginal symmetric matrix .
Order - Sorting of the eigenvalues E and eigenvectors
Diag - combines the three above calls
Jacobi - Claccical Jacobi diagonalization of real symmetric square matrices
JacobiC - Jacobi diagonalization of Complex Hermitian square matrices
FastInverse - Matrix inversion by the Gauss-Jordan elimination algorithm
SVD - Singular Value Decomposition - translation from Forsythe-Malcolm-Moler FORTRAN subroutine
OrderSVD - sorting for SVD
CholDecomp - Perturbated Cholesky Decomposition
LSolve - Cholesky L-Solution of L*Y = B (for given B)
LTSolve - Cholesky LT - Solution of LT*X = Y (for given Y)
ChSolve - Solution of the equation L*LT*S = G by Cholesky method
CholBandDec - Cholesky decomposition of the band matrix H[1..p+1,1..N].
LBandSolve - Cholesky L - Solution of L*Y = B (for given B)
LTBandSolve - Cholesky LT - Solution of LT*X = Y (for given Y)
ChBandSolve - Solution of the equation L*LT*S = G by the Cholesky method
QRDecomp - QR Decomposition of the M }
RSolve - This routine solves R*X = B for X ,
QRSolve - This routine solves the equation (QR)*X = B,
Gram_Schmidt - Gram-Schmidt Orthogonalization
unit MatrixProc;
Basic Algebra (matrix-vector) routines:
- multiplication
- normalization
- emulation of complex matrix computation
- sorting
{ A = B*R }
procedure VxR(N: IntType; var A: Vector; const B: Vector; R: RealType);
procedure MxR(N: IntType; const A, B: Matrix; R: RealType);
{ A = B }
procedure CopyV(N: IntType; var A: Vector;const B: Vector);
procedure CopyM(N: IntType; const A, B: Matrix);
{ C = rA*A + rB*B}
procedure CombineV(N: IntType; var C: Vector; const A, B: Vector; rA, rB: RealType);
procedure CombineM(N: IntType; const C, A, B: Matrix; rA, rB: RealType);
{ Dot product: VTxV = (A*B) = <A|B> }
function VTxV(N: IntType; const A, B: Vector): RealType;
{ NormalizeV = |B| if |B| > 0 then A := B/|B| }
function NormalizeV(N: IntType; var A: Vector; const B: Vector): RealType;
{ NormV = |B| = sqrt(<B|B>) }
function NormV(N: IntType; const B: Vector): RealType;
{ Norm2V = <B|B> }
function Norm2V(N: IntType; const B: Vector): RealType;
{ A := Transpose(B) = BT }
procedure TransposeM(N: IntType; const A, B: Matrix);
{ D := Diagonal(V) D[i,i] = V[i] }
procedure DiagonalM(N: IntType; const D: Matrix; const V: Vector);
{ D := R*UnitaryMatrix }
procedure ScalarM(N: IntType; const D: Matrix; R: RealType);
procedure MxV(N: IntType; var A: Vector; const B: Matrix; const V: Vector);
procedure VxM(N: IntType; var A: Vector; const V: Vector; const B: Matrix);
procedure MxM(N: IntType; const C, A, B: Matrix);
procedure MTxM(N: IntType; const C, A, B: Matrix);
procedure MxMT(N: IntType; const C, A, B: Matrix);
procedure MTxDxM(N: IntType; const A, B, C: Matrix; const D: Vector);
procedure MxDxMT(N: IntType; const A, B, C: Matrix; const D: Vector);
procedure MTxMxM(N: IntType; const A, M, C: Matrix);
procedure MxMxMT(N: IntType; const A, M, C: Matrix);
{ Rectangualar matrices }
procedure MN1N2xMN2N3(N1, N2, N3: IntType; const A, B, C: Matrix);
procedure TransposeMN1N2(N1, N2: IntType; const A, B: Matrix);
{ Complex calculation emulation }
procedure CMxCMr(N: IntType; s: RealType; const U, V, X, Y, A, B: Matrix);
procedure CMTxCMr(N: IntType; s: RealType; const U, V, X, Y, A, B: Matrix);
procedure CMxDxCMHr(N: IntType; const AR, AI, CR, CI: Matrix; const D: Vector);
procedure CMHxDxCMr(N: IntType; const AR, AI, CR, CI: Matrix; const D: Vector);
procedure CMHxCMxCMr(N: IntType; const AR, AI, MR, MI, CR, CI: Matrix );
{ Other utilities }
{ simple buble sort of N1 to N2 row vectors by E }
procedure SortTVec(N1, N2: IntType; var VCT: Matrix; E: Vector; ascending: boolean);
{ simple buble sort of N1 to N2 row vectors by norm }
procedure SortNornTVec(N1, N2, N: IntType; var VCT: Matrix; ascending: boolean);
{ simple buble sort of N1 to N2 column vectors by E}
procedure SortVec(N1, N2, N: IntType; var VCT: Matrix; E: Vector; ascending: boolean);
program TestEBKandNVS - examples of usage EBK & NVS library (see tutorial)
program LinAlgEBKandNVS - Test of tred2-tqli, Jacobi, SVD, Gram_Schmidt
unit ReadWrite
some I/O routines used in the test programs:
- ReadMatrix
- WriteMatrix
- ReadVector
- WriteVector
- ReadTVector
- WriteTVector
- MatrixToHTML
- VectorToHTML
- TVectorToHTML
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -