@@ -16,7 +16,6 @@ Random.seed!(12343219)
1616areal = randn (n,n)/ 2
1717aimg = randn (n,n)/ 2
1818
19- # DEBUGGING INFO
2019@testset for eltya in (Float32, Float64, ComplexF32, ComplexF64, Int)
2120 aa = eltya == Int ? rand (1 : 7 , n, n) : convert (Matrix{eltya}, eltya <: Complex ? complex .(areal, aimg) : areal)
2221 asym = aa' + aa # symmetric indefinite
@@ -25,46 +24,6 @@ aimg = randn(n,n)/2
2524 (view (aa, 1 : n, 1 : n),
2625 view (asym, 1 : n, 1 : n),
2726 view (apd, 1 : n, 1 : n)))
28- @testset " non-symmetric eigen decomposition" begin
29- for T in (Hermitian (Tridiagonal (a), :U ), Hermitian (Tridiagonal (a), :L ))
30- @info typeof (T)
31- f = eigen (T)
32- end
33- end
34- @testset " symmetric generalized eigenproblem" begin
35- if isa (a, Array)
36- asym_sg = asym[1 : n1, 1 : n1]
37- a_sg = a[:,n1+ 1 : n2]
38- else
39- asym_sg = view (asym, 1 : n1, 1 : n1)
40- a_sg = view (a, 1 : n, n1+ 1 : n2)
41- end
42- ASG2 = a_sg' a_sg
43-
44- # matrices of different types (#14896)
45- D = Diagonal (ASG2)
46- for uplo in (:L , :U )
47- gd = eigen (Hermitian (Tridiagonal (ASG2), uplo), D)
48- @test Hermitian (Tridiagonal (ASG2), uplo) * gd. vectors ≈ D * gd. vectors * Diagonal (gd. values)
49- end
50- end
51- end
52- end
53-
54-
55-
56- @testset for eltya in (Float32, Float64, ComplexF32, ComplexF64, Int)
57- @info " eigen.jl"
58- @info eltya
59- aa = eltya == Int ? rand (1 : 7 , n, n) : convert (Matrix{eltya}, eltya <: Complex ? complex .(areal, aimg) : areal)
60- @info repr (aa)
61- asym = aa' + aa # symmetric indefinite
62- apd = aa' * aa # symmetric positive-definite
63- for (a, asym, apd) in ((aa, asym, apd),
64- (view (aa, 1 : n, 1 : n),
65- view (asym, 1 : n, 1 : n),
66- view (apd, 1 : n, 1 : n)))
67- @info typeof (a)
6827 ε = εa = eps (abs (float (one (eltya))))
6928
7029 α = rand (eltya)
7433 @test eab. vectors == eigvecs (fill (α,1 ,1 ),fill (β,1 ,1 ))
7534
7635 @testset " non-symmetric eigen decomposition" begin
77- @info " non-symmetric eigen decomposition"
7836 d, v = eigen (a)
7937 for i in 1 : size (a,2 )
8038 @test a* v[:,i] ≈ d[i]* v[:,i]
8846 @test Array (f) ≈ a
8947
9048 for T in (Tridiagonal (a), Hermitian (Tridiagonal (a), :U ), Hermitian (Tridiagonal (a), :L ))
91- @info T
9249 f = eigen (T)
9350 d, v = f
9451 for i in 1 : size (a,2 )
10865 @test_throws DomainError eigmax (a - a' )
10966 end
11067 @testset " symmetric generalized eigenproblem" begin
111- @info " symmetric generalized eigenproblem"
11268 if isa (a, Array)
11369 asym_sg = asym[1 : n1, 1 : n1]
11470 a_sg = a[:,n1+ 1 : n2]
144100 # matrices of different types (#14896)
145101 D = Diagonal (ASG2)
146102 for uplo in (:L , :U )
147- @info uplo
148103 if eltya <: Real
149104 fs = eigen (Symmetric (asym_sg, uplo), ASG2)
150105 @test fs. values ≈ f. values
0 commit comments