Skip to content
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
4 changes: 2 additions & 2 deletions src/common/gauge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ _argmaxabs(x) = reduce(_largest, x; init = zero(eltype(x)))
_largest(x::Real, y::Real) = abs(x) < abs(y) ? y : x
_largest(x::Complex, y::Complex) = abs2(x) < abs2(y) ? y : x

default_gauge_rtol(V) = sqrt(eps(real(float(eltype(V)))))
default_gauge_rtol(V) = eps(real(float(eltype(V))))^(3 // 4)

"""
gauge_index(V; dims = 1, rtol = sqrt(eps(real(eltype(V)))))
gauge_index(V; dims = 1, rtol = eps(real(eltype(V)))^(3 // 4))

Indices of the entries of `V` used to fix the gauge along dimension `dims`: for every slice, the
first entry whose magnitude is at least `(1 - rtol)` times the largest magnitude in that slice.
Expand Down
Loading