|
| 1 | +""" |
| 2 | + eigenbox(A) |
| 3 | +
|
| 4 | +Returns an enclosure of all the eigenvalues of `A`. If `A` is symmetric, than the |
| 5 | +output is a real interval, otherwise it is a complex interval. |
| 6 | +
|
| 7 | +### Algorithm |
| 8 | +
|
| 9 | +The algorithms used by the function are described in [[HLA13]](@ref). |
| 10 | +
|
| 11 | +### Notes |
| 12 | +
|
| 13 | +The enclosure is not rigorous, meaning that the real eigenvalue problems solved internally |
| 14 | +utilize normal floating point computations. |
| 15 | +
|
| 16 | +### Examples |
| 17 | +
|
| 18 | +```jldoctest |
| 19 | +julia> A = [0 -1 -1;2 -1.399.. -0.001 0;1 0.5 -1] |
| 20 | +3×3 Matrix{Interval{Float64}}: |
| 21 | + [0, 0] [-1, -1] [-1, -1] |
| 22 | + [2, 2] [-1.39901, -0.000999999] [0, 0] |
| 23 | + [1, 1] [0.5, 0.5] [-1, -1] |
| 24 | +
|
| 25 | +julia> eigenbox(A) |
| 26 | +[-1.90679, 0.970154] + [-2.51903, 2.51903]im |
| 27 | +``` |
| 28 | +""" |
| 29 | +function eigenbox(A::Symmetric{Interval{T}, Matrix{Interval{T}}}) where {T} |
| 30 | + |
| 31 | + AΔ = Symmetric(radius.(A)) |
| 32 | + Ac = Symmetric(mid.(A)) |
| 33 | + |
| 34 | + ρ = eigmax(AΔ) |
| 35 | + λmax = eigmax(Ac) |
| 36 | + λmin = eigmin(Ac) |
| 37 | + return Interval(λmin - ρ, λmax + ρ) |
| 38 | + |
| 39 | +end |
| 40 | + |
| 41 | +function eigenbox(A::AbstractMatrix{Interval{T}}) where {T} |
| 42 | + |
| 43 | + λ = eigenbox(Symmetric(0.5*(A + A'))) |
| 44 | + |
| 45 | + n = checksquare(A) |
| 46 | + μ = eigenbox(Symmetric([zeros(n, n) 0.5*(A - A'); |
| 47 | + 0.5*(A' - A) zeros(n, n)])) |
| 48 | + |
| 49 | + return λ + μ*im |
| 50 | +end |
| 51 | + |
| 52 | +function eigenbox(M::AbstractMatrix{Complex{Interval{T}}}) where {T} |
| 53 | + A = real.(M) |
| 54 | + B = imag.(M) |
| 55 | + λ = eigenbox(Symmetric(0.5*[A+A' B'-B; |
| 56 | + B-B' A+A'])) |
| 57 | + |
| 58 | + μ = eigenbox(Symmetric(0.5*[B+B' A-A'; |
| 59 | + A'-A B+B'])) |
| 60 | + |
| 61 | + return λ + μ*im |
| 62 | +end |
| 63 | + |
| 64 | + |
| 65 | +function eigenbox(M::Hermitian{Complex{Interval{T}}, Matrix{Complex{Interval{T}}}}) where T |
| 66 | + A = real(M) |
| 67 | + B = imag(M) |
| 68 | + return eigenbox(Symmetric([A B';B A])) |
| 69 | + |
| 70 | +end |
0 commit comments