Skip to content

Commit

Permalink
Change default QR tolerance to match SPQR
Browse files Browse the repository at this point in the history
  • Loading branch information
corbett5 authored Aug 13, 2024
1 parent 0dd8d45 commit a5ffa1a
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 a5ffa1a

Please sign in to comment.