Skip to content

Commit

Permalink
Merge pull request JuliaLang#13714 from JuliaLang/anj/chol
Browse files Browse the repository at this point in the history
Fix upper/lower bug in cholfact! for non-BlasFloats
  • Loading branch information
andreasnoack committed Oct 23, 2015
2 parents 9470795 + 51478ff commit 8173e37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Deprecated or removed
in favor of versions that require the matrix to be in factored form
([#13496]).

* Deprecate `chol(A,Val{:U/:L})` in favor of `chol(A)` ([#13680]).

Julia v0.4.0 Release Notes
==========================

Expand Down
2 changes: 1 addition & 1 deletion base/linalg/cholesky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function cholfact!(A::StridedMatrix, uplo::Symbol, ::Type{Val{false}})
if uplo == :U
Cholesky(chol!(A, UpperTriangular).data, 'U')
else
Cholesky(chol!(A, UpperTriangular).data, 'U')
Cholesky(chol!(A, LowerTriangular).data, 'L')
end
end
cholfact!(A::StridedMatrix, uplo::Symbol, ::Type{Val{true}}; tol = 0.0) = throw(ArgumentError("generic pivoted Cholesky fectorization is not implemented yet"))
Expand Down
2 changes: 2 additions & 0 deletions test/linalg/cholesky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ for eltya in (Float32, Float64, Complex64, Complex128, BigFloat, Int)
@test_approx_eq full(lapd) apd
l = lapd[:L]
@test_approx_eq l*l' apd
@test triu(capd.factors) lapd[:U]
@test tril(lapd.factors) capd[:L]

#pivoted upper Cholesky
if eltya != BigFloat
Expand Down

0 comments on commit 8173e37

Please sign in to comment.