Skip to content

Commit

Permalink
This fixes 2 issues with the Cholesky update/downdate tests
Browse files Browse the repository at this point in the history
1. It was possible to get random matrices which would not be positive definite when down-dated (e.g. if I ran the block with `srand(1)`. I have no idea how this didn't become an issue more often.

2. Apparently `v*v'` isn't Hermitian when using the system BLAS on Power.
  • Loading branch information
simonbyrne committed Jun 29, 2016
1 parent 844f284 commit 6332269
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/linalg/cholesky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,12 @@ end
let A = complex(randn(10,5), randn(10, 5)), v = complex(randn(5), randn(5))
for uplo in (:U, :L)
AcA = A'A
BcB = AcA + v*v'
BcB = (BcB + BcB')/2
F = cholfact(AcA, uplo)
@test LinAlg.lowrankupdate(F, v)[uplo] cholfact(AcA + v*v')[uplo]
@test LinAlg.lowrankdowndate(F, v)[uplo] cholfact(AcA - v*v')[uplo]
G = cholfact(BcB, uplo)
@test LinAlg.lowrankupdate(F, v)[uplo] G[uplo]
@test LinAlg.lowrankdowndate(G, v)[uplo] F[uplo]
end
end

Expand Down

0 comments on commit 6332269

Please sign in to comment.