Skip to content

Commit

Permalink
Improve the tests of AMD.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 14, 2021
1 parent e68a95f commit 65c1554
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 65c1554

Please sign in to comment.