Skip to content

Commit dc17ad7

Browse files
committed
refactor is_right_isometric
1 parent 1e36ef1 commit dc17ad7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/common/matrixproperties.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,7 @@ The `isapprox_kwargs` can be used to control the tolerances of the equality.
6161
6262
See also [`isisometric`](@ref) and [`MatrixAlgebraKit.is_left_isometric`](@ref).
6363
""" is_right_isometric
64-
65-
function is_right_isometric(A::AbstractMatrix; atol::Real = 0, rtol::Real = defaulttol(A), norm = LinearAlgebra.norm)
66-
P = A * A'
67-
nP = norm(P) # isapprox would use `rtol * max(norm(P), norm(I))`
68-
diagview(P) .-= 1
69-
return norm(P) <= max(atol, rtol * nP) # assume that the norm of I is `sqrt(n)`
70-
end
64+
is_right_isometric(A; kwargs...) = is_left_isometric(A'; kwargs...)
7165
7266
"""
7367
ishermitian(A; isapprox_kwargs...)

0 commit comments

Comments
 (0)