Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constructor for complex triangular Schur from real quasitriangular Schur #40573

Merged
merged 4 commits into from
May 31, 2021

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Apr 22, 2021

This adds a constructor Schur{Complex}(S) that converts a real Schur factorization S into a complex one, based on code by @RalphAS from GenericSchur.jl. This is useful because the real Schur factorization is only "quasitriangular" — it can have 2×2 blocks along the diagonal corresponding to complex eigenvalue pairs — whereas many algorithms require the complex upper-triangular factorization.

Previously, one obtained the complex Schur factorization by schur(complex(A)), but this seems to be 2–3× slower than Schur{Complex}(schur(A)) for real A.

In consequence, a number of the Schur-based algorithms, such as asin(A) and A^3.2, are about 2× faster for real A after this PR. There is also a smaller speedup for sqrt and log.

@stevengj stevengj added the linear algebra Linear algebra label Apr 22, 2021
@stevengj stevengj requested a review from andreasnoack April 23, 2021 13:47
NEWS.md Outdated Show resolved Hide resolved
Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
@stevengj
Copy link
Member Author

stevengj commented Apr 26, 2021

(Note that the analogous function in Matlab is rsf2csf and in SciPy is rsf2csf.)

@dkarrasch dkarrasch merged commit 97aa831 into JuliaLang:master May 31, 2021
shirodkara pushed a commit to shirodkara/julia that referenced this pull request Jun 9, 2021
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
@stevengj stevengj deleted the sgj/quasitriangular branch April 5, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants