API

Most of the user-facing methods are extensions of functions declared in LinearAlgebra: eigen!, schur!, ordschur!, eigvals!.

Additional exported functions are as follows.

Balancing

GenericSchur.balance!Function
balance!(A; scale=true, permute=true) => Abal, B::Balancer

Balance a square matrix so that various operations are more stable.

If permute, then row and column permutations are found such that Abal has the block form [T₁ X Y; 0 C Z; 0 0 T₂] where T₁ and T₂ are upper-triangular. If scale, then a diagonal similarity transform using powers of 2 is found such that the 1-norm of the C block (or the whole of Abal, if not permuting) is near unity. The transformations are encoded into B so that they can be inverted for eigenvectors, etc. Balancing typically improves the accuracy of eigen-analysis.

source

Converting a real quasi-Schur to a true complex Schur object

GenericSchur.triangularizeFunction
triangularize(S::Schur{T}) => Schur{complex{T})

convert a (standard-form) quasi-triangular real Schur factorization into a triangular complex Schur factorization.

source

Obtaining eigenvectors from a decomposition

LinearAlgebra.eigvecsMethod
eigvecs(S::Schur{Complex{<:AbstractFloat}}; left=false) -> Matrix

Compute right or left eigenvectors from a Schur decomposition. Eigenvectors are returned as columns of a matrix, ordered to match S.values. The returned eigenvectors have unit Euclidean norm, and the largest elements are real.

source

Eigenvalue condition numbers

GenericSchur.eigvalscondFunction
eigvalscond(S::Schur,nsub::Integer) => Real

Estimate the reciprocal of the condition number of the nsub leading eigenvalues of S. (Use ordschur to move a subspace of interest to the front of S.)

See the LAPACK User's Guide for details of interpretation.

source
eigvalscond(S::GeneralizedSchur, nsub) => pl, pr

compute approx. reciprocal norms of projectors on left/right subspaces associated w/ leading nsub×nsub block of S. Use ordschur to select eigenvalues of interest.

An approximate bound on avg. absolute error of associated eigenvalues is ϵ * norm(vcat(A,B)) / pl. See LAPACK documentation for further details.

source

Subspace conditioning

GenericSchur.subspacesepFunction
subspacesep(S::Schur,nsub::Integer) => Real

Estimate the reciprocal condition of the separation angle for the invariant subspace corresponding to the leading block of size nsub of a Schur decomposition. (Use ordschur to move a subspace of interest to the front of S.)

See the LAPACK User's Guide for details of interpretation.

source

Circumventing normal dispatch

Mainly for testing purposes, one can invoke the generic methods implemented here for LAPACK-compatible matrix types with these methods.

GenericSchur.gschur!Function

gschur!(A::StridedMatrix) -> F::Schur

Destructive version of gschur (q.v.).

source

gschur!(H::Hessenberg, Z) -> F::Schur

Compute the Schur decomposition of a Hessenberg matrix. Subdiagonals of H must be real. If Z is provided, it is updated with the unitary transformations of the decomposition.

source
GenericSchur.gschurFunction

gschur(A::StridedMatrix) -> F::Schur

Computes the Schur factorization of matrix A using a generic implementation. See LinearAlgebra.schur for usage.

source