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

Implement sorting for Eigen #24536

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
More tests
  • Loading branch information
Evey Dee committed Nov 9, 2017
commit 53b0be2891a95467bf164d689fd3221d42f75633
10 changes: 7 additions & 3 deletions test/linalg/eigen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ end
end
end

let a = rand(10, 10)
f = sort(eigfact(a))
@test a ≈ f[:vectors] * Diagonal(f[:values]) / f[:vectors]
let aa = rand(10, 10)
bb = aa'aa
for a in (aa, bb)
f = sort(eigfact(a))
@test issorted(f[:values], by=Base.LinAlg.eigsortby)
@test a ≈ f[:vectors] * Diagonal(f[:values]) / f[:vectors]
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the purpose is to sort, should we test that too? E.g. @test issorted(...)



Expand Down