Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes calls to LAPACK.stebz #2609

Merged
merged 1 commit into from

2 participants

@jiahao
Collaborator

Fixes crash in eigenvalue computations for SymTridiagonal matrices

I think this addresses issue #2606

@jiahao jiahao Fixes calls to LAPACK.stebz
Fixes crash in eigenvalue computations for SymTridiagonal matrices
aa0ae07
@ViralBShah ViralBShah merged commit 417f142 into JuliaLang:master

1 check failed

Details default The Travis build failed
@ViralBShah
Owner

Could you add eigvals tests to test/linalg.jl too?

@jiahao jiahao referenced this pull request
Closed

0.2 release notes #2581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 19, 2013
  1. @jiahao

    Fixes calls to LAPACK.stebz

    jiahao authored
    Fixes crash in eigenvalue computations for SymTridiagonal matrices
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +5 −3 base/linalg/tridiag.jl
View
8 base/linalg/tridiag.jl
@@ -46,9 +46,11 @@ size(m::SymTridiagonal) = (length(m.dv), length(m.dv))
size(m::SymTridiagonal, d::Integer) = d<1 ? error("dimension out of range") : (d<2 ? length(m.dv) : 1)
eig(m::SymTridiagonal) = LAPACK.stegr!('V', copy(m.dv), copy(m.ev))
-eigvals(m::SymTridiagonal, il::Int, ih::Int) = LAPACK.stebz!('I', 'E', 0.0, 0.0, il, iu, -1.0, copy(m.dv), copy(m.ev))[1]
-eigvals(m::SymTridiagonal, vl::Int, iv::Int) = LAPACK.stebz!('V', 'E', vl, vh, 0, 0, -1.0, copy(m.dv), copy(m.ev))[1]
-eigvals(m::SymTridiagonal) = eigvals(m, 1, size(m, 1))
+
+#Wrap LAPACK DSTEBZ to compute eigenvalues
+eigvals(m::SymTridiagonal, il::Int, iu::Int) = LAPACK.stebz!('I', 'E', 0.0, 0.0, il, iu, -1.0, copy(m.dv), copy(m.ev))[1]
+eigvals(m::SymTridiagonal, vl::Float64, vu::Float64) = LAPACK.stebz!('V', 'E', vl, vu, 0, 0, -1.0, copy(m.dv), copy(m.ev))[1]
+eigvals(m::SymTridiagonal) = LAPACK.stebz!('A', 'E', 0.0, 0.0, 0, 0, -1.0, copy(m.dv), copy(m.ev))[1]
## Tridiagonal matrices ##
type Tridiagonal{T} <: AbstractMatrix{T}
Something went wrong with that request. Please try again.