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

Fixes 2 issues with the Cholesky update/downdate tests #17199

Merged
merged 1 commit into from
Jul 1, 2016
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
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
Copy link
Member

@andreasnoack andreasnoack Jun 29, 2016

Choose a reason for hiding this comment

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

Maybe cholfact(Hermitian(AcA + v*v')) instead of cholfact(BcB).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

julia> cholfact(Hermitian(AcA + v*v'))
ERROR: ArgumentError: Cannot construct Hermitian from matrix with nonreal diagonals

Copy link
Member

Choose a reason for hiding this comment

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

Arrrr... I'd forgotten that we still do that. That check should go away.

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