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

Improve the tests of AMD.jl #46

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Changes from all commits
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
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ for n in [10, 20, 30]
@test meta.info[AMD_STATUS] == AMD_OK
@test minimum(p) == 1
@test maximum(p) == n
@test isperm(p)

q = amd(A)
@test all(p .== q)

# test that amd(A) with A unsymmetric is amd(A + A')
A = A + A'
pA = amd(A)
@test minimum(pA) == 1
@test maximum(pA) == n
@test isperm(pA)

L = Symmetric(A, :L)
pL = amd(L)
Expand All @@ -47,6 +51,7 @@ for n in [10, 20, 30]
@test meta.stats[COLAMD_STATUS] == COLAMD_OK
@test minimum(p) == 1
@test maximum(p) == m
@test isperm(p)
q = colamd(A)
@test all(p .== q)

Expand All @@ -57,6 +62,7 @@ for n in [10, 20, 30]
@test meta.stats[COLAMD_STATUS] == COLAMD_OK
@test minimum(p) == 1
@test maximum(p) == m
@test isperm(p)

q = symamd(A)
@test all(p .== q)
Expand Down