Skip to content

Commit c079d0c

Browse files
Copilotlkdvos
andcommitted
Rename is_left_isometry and is_right_isometry to isleftisometric and isrightisometric
Co-authored-by: lkdvos <37111893+lkdvos@users.noreply.github.com>
1 parent f622982 commit c079d0c

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

src/common/matrixproperties.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Test whether a linear map is an isometry, where the type of isometry is controll
88
99
The `isapprox_kwargs` are passed on to `isapprox` to control the tolerances.
1010
11-
New specializations should overload [`is_left_isometry`](@ref) and [`is_right_isometry`](@ref).
11+
New specializations should overload [`isleftisometric`](@ref) and [`isrightisometric`](@ref).
1212
1313
See also [`isunitary`](@ref).
1414
"""
1515
function isisometric(A; side::Symbol = :left, isapprox_kwargs...)
16-
side === :left && return is_left_isometry(A; isapprox_kwargs...)
17-
side === :right && return is_right_isometry(A; isapprox_kwargs...)
16+
side === :left && return isleftisometric(A; isapprox_kwargs...)
17+
side === :right && return isrightisometric(A; isapprox_kwargs...)
1818

1919
throw(ArgumentError(lazy"Invalid isometry side: $side"))
2020
end
@@ -28,40 +28,40 @@ The `isapprox_kwargs` are passed on to `isapprox` to control the tolerances.
2828
See also [`isisometric`](@ref).
2929
"""
3030
function isunitary(A; isapprox_kwargs...)
31-
return is_left_isometry(A; isapprox_kwargs...) &&
32-
is_right_isometry(A; isapprox_kwargs...)
31+
return isleftisometric(A; isapprox_kwargs...) &&
32+
isrightisometric(A; isapprox_kwargs...)
3333
end
3434
function isunitary(A::AbstractMatrix; isapprox_kwargs...)
3535
size(A, 1) == size(A, 2) || return false
36-
return is_left_isometry(A; isapprox_kwargs...)
36+
return isleftisometric(A; isapprox_kwargs...)
3737
end
3838

3939
@doc """
40-
is_left_isometry(A; isapprox_kwargs...) -> Bool
40+
isleftisometric(A; isapprox_kwargs...) -> Bool
4141
4242
Test whether a linear map is a left isometry, i.e. `A' * A ≈ I`.
4343
The `isapprox_kwargs` can be used to control the tolerances of the equality.
4444
45-
See also [`isisometric`](@ref) and [`is_right_isometry`](@ref).
46-
""" is_left_isometry
45+
See also [`isisometric`](@ref) and [`isrightisometric`](@ref).
46+
""" isleftisometric
4747

48-
function is_left_isometry(A::AbstractMatrix; atol::Real = 0, rtol::Real = defaulttol(A), norm = LinearAlgebra.norm)
48+
function isleftisometric(A::AbstractMatrix; atol::Real = 0, rtol::Real = defaulttol(A), norm = LinearAlgebra.norm)
4949
P = A' * A
5050
nP = norm(P) # isapprox would use `rtol * max(norm(P), norm(I))`
5151
diagview(P) .-= 1
5252
return norm(P) <= max(atol, rtol * nP) # assume that the norm of I is `sqrt(n)`
5353
end
5454

5555
@doc """
56-
is_right_isometry(A; isapprox_kwargs...) -> Bool
56+
isrightisometric(A; isapprox_kwargs...) -> Bool
5757
5858
Test whether a linear map is a right isometry, i.e. `A * A' ≈ I`.
5959
The `isapprox_kwargs` can be used to control the tolerances of the equality.
6060
61-
See also [`isisometric`](@ref) and [`is_left_isometry`](@ref).
62-
""" is_right_isometry
61+
See also [`isisometric`](@ref) and [`isleftisometric`](@ref).
62+
""" isrightisometric
6363

64-
function is_right_isometry(A::AbstractMatrix; atol::Real = 0, rtol::Real = defaulttol(A), norm = LinearAlgebra.norm)
64+
function isrightisometric(A::AbstractMatrix; atol::Real = 0, rtol::Real = defaulttol(A), norm = LinearAlgebra.norm)
6565
P = A * A'
6666
nP = norm(P) # isapprox would use `rtol * max(norm(P), norm(I))`
6767
diagview(P) .-= 1

0 commit comments

Comments
 (0)