Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

Class to obtain eigenvalues and eigenvectors of a real matrix.

Author: Paul Meagher
Author: Mustafa Karabulut
License: PHP v3.0
Version: 1.1
File Size: 959 lines (33 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

EigenvalueDecomposition:: (10 methods):
  __construct()
  getEigenvectors()
  getRealEigenvalues()
  getImagEigenvalues()
  getDiagonalEigenvalues()
  tred2()
  tql2()
  orthes()
  cdiv()
  hqr2()


Class: EigenvalueDecomposition  - X-Ref

__construct(array $arg)   X-Ref
Constructor: Check for symmetry, then construct the eigenvalue decomposition


getEigenvectors()   X-Ref
Return the eigenvector matrix


getRealEigenvalues()   X-Ref
Return the real parts of the eigenvalues<br>
d = real(diag(D));


getImagEigenvalues()   X-Ref
Return the imaginary parts of the eigenvalues <br>
d = imag(diag(D))


getDiagonalEigenvalues()   X-Ref
Return the block diagonal eigenvalue matrix


tred2()   X-Ref
Symmetric Householder reduction to tridiagonal form.


tql2()   X-Ref
Symmetric tridiagonal QL algorithm.

This is derived from the Algol procedures tql2, by
Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
Fortran subroutine in EISPACK.

orthes()   X-Ref
Nonsymmetric reduction to Hessenberg form.

This is derived from the Algol procedures orthes and ortran,
by Martin and Wilkinson, Handbook for Auto. Comp.,
Vol.ii-Linear Algebra, and the corresponding
Fortran subroutines in EISPACK.

cdiv($xr, $xi, $yr, $yi)   X-Ref
Performs complex division.

param: int|float $xr
param: int|float $xi
param: int|float $yr
param: int|float $yi

hqr2()   X-Ref
Nonsymmetric reduction from Hessenberg to real Schur form.

Code is derived from the Algol procedure hqr2,
by Martin and Wilkinson, Handbook for Auto. Comp.,
Vol.ii-Linear Algebra, and the corresponding
Fortran subroutine in EISPACK.