All Projects → RalphAS → GenericSchur.jl

RalphAS / GenericSchur.jl

Licence: other
Julia package for Schur decomposition of matrices with generic element types

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to GenericSchur.jl

ArnoldiMethod.jl
Implicitly Restarted Arnoldi Method, natively in Julia
Stars: ✭ 59 (+321.43%)
Mutual labels:  linear-algebra, eigenvectors, eigenvalues
mathematics-for-machine-learning-coursera
quizzes/assignments for mathematics for machine learning specialization on coursera
Stars: ✭ 264 (+1785.71%)
Mutual labels:  linear-algebra, eigenvectors, eigenvalues
Gosl
Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations.
Stars: ✭ 1,629 (+11535.71%)
Mutual labels:  linear-algebra, eigenvectors, eigenvalues
eigenvalues
symmetric matrices algorithms to compute eigenvalue/eigenvector pairs
Stars: ✭ 26 (+85.71%)
Mutual labels:  linear-algebra, eigenvalues
PageRank
A demonstration of the PageRank algorithm, using Eigenvectors to assign significance to HTML pages
Stars: ✭ 17 (+21.43%)
Mutual labels:  eigenvectors, eigenvalues
SLICOT-Reference
SLICOT - A Fortran subroutines library for systems and control
Stars: ✭ 19 (+35.71%)
Mutual labels:  linear-algebra, eigenvalues
dbcsr
DBCSR: Distributed Block Compressed Sparse Row matrix library
Stars: ✭ 65 (+364.29%)
Mutual labels:  linear-algebra
launchpad
Resources to get started in Quantum Computing!
Stars: ✭ 21 (+50%)
Mutual labels:  linear-algebra
optimath
A #[no_std] LinAlg library
Stars: ✭ 47 (+235.71%)
Mutual labels:  linear-algebra
Cpp-Examples
Numerical C++ examples.
Stars: ✭ 38 (+171.43%)
Mutual labels:  linear-algebra
EngComp4 landlinear
Using computational thinking to get deep insights on the foundations of linear algebra
Stars: ✭ 102 (+628.57%)
Mutual labels:  linear-algebra
CNCC-2020
Computational Neuroscience Crash Course (University of Bordeaux, 2020)
Stars: ✭ 36 (+157.14%)
Mutual labels:  linear-algebra
ign-math
General purpose math library for robot applications.
Stars: ✭ 35 (+150%)
Mutual labels:  linear-algebra
vec-la
Tiny linear algebra library specifically for 2d
Stars: ✭ 41 (+192.86%)
Mutual labels:  linear-algebra
Matrix
Easy-to-use Scientific Computing library in/for C++ available for Linux and Windows.
Stars: ✭ 20 (+42.86%)
Mutual labels:  linear-algebra
monolish
monolish: MONOlithic LInear equation Solvers for Highly-parallel architecture
Stars: ✭ 166 (+1085.71%)
Mutual labels:  linear-algebra
sblas
Scala Native BLAS (Basic Linear Algebra Subprograms) supporting Linux and macOS
Stars: ✭ 25 (+78.57%)
Mutual labels:  linear-algebra
scalapack
ScaLAPACK development repository
Stars: ✭ 57 (+307.14%)
Mutual labels:  linear-algebra
math-app-ml
Essential mathematics for applied machine learning and data science
Stars: ✭ 43 (+207.14%)
Mutual labels:  linear-algebra
lapack
Wrappers for LAPACK (Fortran)
Stars: ✭ 63 (+350%)
Mutual labels:  linear-algebra

GenericSchur

Lifecycle GitHub CI Build Status codecov.io

Eigen-analysis of matrices with generic floating-point element types in Julia

The Schur decomposition is the workhorse for eigensystem analysis of dense matrices. The diagonal eigen-decomposition of normal (especially Hermitian) matrices is an important special case, but for non-normal matrices the Schur form is often more useful.

The purpose of this package is to extend the schur! and related functions of the standard library to number types not handled by LAPACK, such as Complex{BigFloat}, Complex{Float128} (from Quadmath.jl), etc. For these, the schur!, eigvals!, and eigen! functions in the LinearAlgebra standard library are overloaded here, and may be accessed through the usual schur, eigvals, and eigen wrappers:

A = your_matrix_generator()
S = schur(A)

The result S is a LinearAlgebra.Schur object, with the properties T, Z=vectors, and values.

The unexported gschur and gschur! functions are available for types normally handled by the LAPACK wrappers in LinearAlgebra.

Complex matrices

For square matrices of complex element type, this package provides a full Schur decomposition:

A::StridedMatrix{C} where {C <: Complex} == Z * T * adjoint(Z)

where T is upper-triangular and Z is unitary, both with the same element type as A. (See below for real matrices.)

The algorithm is essentially the unblocked, serial, single-shift Francis (QR) scheme used in the complex LAPACK routines. Balancing is also available.

Eigenvectors

Right and left eigenvectors are available from complex Schur factorizations, using

S = schur(A)
VR = eigvecs(S)
VL = eigvecs(S,left=true)

Normalization

As of v0.4, eigenvectors as returned from our eigen and eigvecs methods for the standard problem have unit Euclidean norm. This accords with the current (undocumented) behavior of LinearAlgebra methods. (Previously a convention based on low-level LAPACK routines was used here.)

Real decompositions

A quasi-triangular "real Schur" decomposition of real matrices is also provided:

A::StridedMatrix{R} where {R <: Real} == Z * T * transpose(Z)

where T is quasi-upper-triangular and Z is orthogonal, both with the same element type as A. This is what you get by invoking the above-mentioned functions with matrix arguments whose element type T <: Real. The result is in standard form, so pair-blocks (and therefore rank-2 invariant subspaces) should be fully resolved.

Eigenvectors are not currently available for the "real Schur" forms. But don't despair; one can convert a standard quasi-triangular real Schur into a complex Schur with the triangularize function provided here.

Balancing

The accuracy of eigenvalues and eigenvectors may be improved for some matrices by use of a similarity transform which reduces the matrix norm. This is done by default in the eigen! method, and may also be handled explicitly via the balance! function provided here:

Ab, B = balance!(copy(A))
S = schur(Ab)
v = eigvecs(S)
lmul!(B, v) # to get the eigenvectors of A

More details are in the function docstring. Although the balancing function also does permutations to isolate trivial subspaces, the Schur routines do not yet exploit this opportunity for reduced workload.

Subspaces, condition, and all that.

Methods for reordering a Schur decomposition (ordschur) and computing condition numbers (eigvalscond) and subspace separation (subspacesep) are provided. Tests to date suggest that behavior is analogous to the LAPACK routines on which the implementation is based.

Generalized eigensystems

Methods for the generalized eigenvalue problem (matrix pencils) with Complex element types are available as of release 0.3.0; in particular, extension of schur(A,B) from LinearAlgebra. The algorithms are translated from LAPACK, but this implementation has had limited testing. (Note that it is easy to check the decomposition of a particular case ex post facto.)

Corresponding functions for reordering and condition estimation are included. Tests to date suggest that behavior is analogous to LAPACK.

Right eigenvectors of generalized problems are available with V = eigvecs(S::GeneralizedSchur{<:Complex}). Column j of V satisfies S.beta[j] * A * v ≈ S.alpha[j] * B * v. These currently have a peculiar norm intended to be compatible with LAPACK conventions.

Acknowledgements

This package incorporates or elaborates several methods from Andreas Noack's GenericLinearAlgebra.jl package, and includes translations from LAPACK code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].