Skip to content

Commit c8b5990

Browse files
authored
Merge pull request #171 from kshyatt/ksh/moreeig
More tests for eigen
2 parents 83b2655 + 9d512ad commit c8b5990

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/eigen.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
@test (vecs*diagm(vals)*vecs')::SMatrix m
3636

3737
m_d = randn(SVector{2}); m = diagm(m_d)
38+
(vals, vecs) = eig(Hermitian(m))
39+
@test vals::SVector sort(m_d)
40+
(vals, vecs) = eig(Hermitian(m, :L))
41+
@test vals::SVector sort(m_d)
3842
@test eigvals(m) sort(m_d)
3943
@test eigvals(Hermitian(m)) sort(m_d)
4044
end
@@ -61,6 +65,10 @@
6165
@test vals::SVector vals_a
6266

6367
m_d = randn(SVector{3}); m = diagm(m_d)
68+
(vals, vecs) = eig(Hermitian(m))
69+
@test vals::SVector sort(m_d)
70+
(vals, vecs) = eig(Hermitian(m, :L))
71+
@test vals::SVector sort(m_d)
6472
@test eigvals(m) sort(m_d)
6573
@test eigvals(Hermitian(m)) sort(m_d)
6674
end

0 commit comments

Comments
 (0)