Skip to content

Commit

Permalink
Change default QR tolerance to match SPQR (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
corbett5 authored Aug 22, 2024
1 parent 81d49e9 commit 313a04f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solvers/spqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Matrix{T}(Q::QRSparseQ) where {T} = lmul!(Q, Matrix{T}(I, size(Q, 1), min(size(Q

# From SPQR manual p. 6
_default_tol(A::AbstractSparseMatrixCSC) =
20*sum(size(A))*eps(real(eltype(A)))*maximum(norm(view(A, :, i)) for i in 1:size(A, 2))
20*sum(size(A))*eps()*maximum(norm(view(A, :, i)) for i in 1:size(A, 2))

"""
qr(A::SparseMatrixCSC; tol=_default_tol(A), ordering=ORDERING_DEFAULT) -> QRSparse
Expand Down

0 comments on commit 313a04f

Please sign in to comment.