Skip to content

Commit

Permalink
manual check for pivoted factorization (pending JuliaLang/julia#36002)
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed May 23, 2020
1 parent ade6f64 commit 9b1ed31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/linalg/statschol.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ retains the original order unless singularity is detected. Columns that are
(computationally) linearly dependent on columns to their left are moved to the
right hand side in a left circular shift.
"""
function statscholesky(xtx::Symmetric{T}, tol::Real = -1) where {T<:AbstractFloat}
function statscholesky(xtx::Symmetric{T}, tol::Real = 0.0) where {T<:AbstractFloat}
n = size(xtx, 2)
println(tol)
chpiv = cholesky(xtx, Val(true), tol = T(tol), check = false)
chunp = cholesky(xtx, check = false)
@assert issuccess(chunp) "Cholesky Decomposition failed"
@assert chpiv.info == 0 "Cholesky decomposition failed"
r = chpiv.rank
piv = [1:n;]
if r < n
Expand Down

0 comments on commit 9b1ed31

Please sign in to comment.