Skip to content

Commit

Permalink
Add injectivity radius on fixed rank matrices (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran authored Jun 26, 2023
1 parent d24f6d2 commit 20fe351
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/manifolds/FixedRankMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,21 @@ end

get_embedding(::FixedRankMatrices{m,n,k,𝔽}) where {m,n,k,𝔽} = Euclidean(m, n; field=𝔽)

"""
injectivity_radius(::FixedRankMatrices)
Return the incjectivity radius of the manifold of [`FixedRankMatrices`](@ref), i.e. 0.
See [^HosseiniUschmajew2017].
[^HosseiniUschmajew2017]:
> S. Hosseini and A. Uschmajew, “A Riemannian Gradient Sampling Algorithm for Nonsmooth
> Optimization on Manifolds,” SIAM J. Optim., vol. 27, no. 1, pp. 173–189, Jan. 2017,
> doi: [10.1137/16M1069298](https://doi.org/10.1137/16M1069298).
"""
function injectivity_radius(::FixedRankMatrices{m,n,k}) where {m,n,k}
return 0.0
end

@doc raw"""
inner(M::FixedRankMatrices, p::SVDMPoint, X::UMVTVector, Y::UMVTVector)
Expand Down
2 changes: 2 additions & 0 deletions test/manifolds/fixed_rank.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ include("../utils.jl")
q2 = similar(q)
embed!(M, q2, p)
@test q == q2

@test injectivity_radius(M2) == 0.0
end
types = [[Matrix{Float64}, Vector{Float64}, Matrix{Float64}]]
TEST_FLOAT32 && push!(types, [Matrix{Float32}, Vector{Float32}, Matrix{Float32}])
Expand Down

0 comments on commit 20fe351

Please sign in to comment.