@@ -8,13 +8,14 @@ Test whether a linear map is an isometry, where the type of isometry is controll
88
99The `isapprox_kwargs` are passed on to `isapprox` to control the tolerances.
1010
11- New specializations should overload [`isleftisometric`](@ref) and [`isrightisometric`](@ref).
11+ New specializations should overload [`MatrixAlgebraKit.is_left_isometric`](@ref) and
12+ [`MatrixAlgebraKit.is_right_isometric`](@ref).
1213
1314See also [`isunitary`](@ref).
1415"""
1516function isisometric (A; side:: Symbol = :left , isapprox_kwargs... )
16- side === :left && return isleftisometric (A; isapprox_kwargs... )
17- side === :right && return isrightisometric (A; isapprox_kwargs... )
17+ side === :left && return is_left_isometric (A; isapprox_kwargs... )
18+ side === :right && return is_right_isometric (A; isapprox_kwargs... )
1819
1920 throw (ArgumentError (lazy " Invalid isometry side: $side" ))
2021end
@@ -28,40 +29,40 @@ The `isapprox_kwargs` are passed on to `isapprox` to control the tolerances.
2829See also [`isisometric`](@ref).
2930"""
3031function isunitary (A; isapprox_kwargs... )
31- return isleftisometric (A; isapprox_kwargs... ) &&
32- isrightisometric (A; isapprox_kwargs... )
32+ return is_left_isometric (A; isapprox_kwargs... ) &&
33+ is_right_isometric (A; isapprox_kwargs... )
3334end
3435function isunitary (A:: AbstractMatrix ; isapprox_kwargs... )
3536 size (A, 1 ) == size (A, 2 ) || return false
36- return isleftisometric (A; isapprox_kwargs... )
37+ return is_left_isometric (A; isapprox_kwargs... )
3738end
3839
3940@doc """
40- isleftisometric (A; isapprox_kwargs...) -> Bool
41+ is_left_isometric (A; isapprox_kwargs...) -> Bool
4142
42- Test whether a linear map is a left isometry, i.e. `A' * A ≈ I`.
43+ Test whether a linear map is a ( left) isometry, i.e. `A' * A ≈ I`.
4344The `isapprox_kwargs` can be used to control the tolerances of the equality.
4445
45- See also [`isisometric`](@ref) and [`isrightisometric `](@ref).
46- """ isleftisometric
46+ See also [`isisometric`](@ref) and [`MatrixAlgebraKit.is_right_isometric `](@ref).
47+ """ is_left_isometric
4748
48- function isleftisometric (A:: AbstractMatrix ; atol:: Real = 0 , rtol:: Real = defaulttol (A), norm = LinearAlgebra. norm)
49+ function is_left_isometric (A:: AbstractMatrix ; atol:: Real = 0 , rtol:: Real = defaulttol (A), norm = LinearAlgebra. norm)
4950 P = A' * A
5051 nP = norm (P) # isapprox would use `rtol * max(norm(P), norm(I))`
5152 diagview (P) .- = 1
5253 return norm (P) <= max (atol, rtol * nP) # assume that the norm of I is `sqrt(n)`
5354end
5455
5556@doc """
56- isrightisometric (A; isapprox_kwargs...) -> Bool
57+ is_right_isometric (A; isapprox_kwargs...) -> Bool
5758
58- Test whether a linear map is a right isometry, i.e. `A * A' ≈ I`.
59+ Test whether a linear map is a ( right) isometry, i.e. `A * A' ≈ I`.
5960The `isapprox_kwargs` can be used to control the tolerances of the equality.
6061
61- See also [`isisometric`](@ref) and [`isleftisometric `](@ref).
62- """ isrightisometric
62+ See also [`isisometric`](@ref) and [`MatrixAlgebraKit.is_left_isometric `](@ref).
63+ """ is_right_isometric
6364
64- function isrightisometric (A:: AbstractMatrix ; atol:: Real = 0 , rtol:: Real = defaulttol (A), norm = LinearAlgebra. norm)
65+ function is_right_isometric (A:: AbstractMatrix ; atol:: Real = 0 , rtol:: Real = defaulttol (A), norm = LinearAlgebra. norm)
6566 P = A * A'
6667 nP = norm (P) # isapprox would use `rtol * max(norm(P), norm(I))`
6768 diagview (P) .- = 1
0 commit comments