JuliaManifolds / ManifoldsBase.jl

Basic interface for manifolds in Julia
https://juliamanifolds.github.io/ManifoldsBase.jl/
MIT License
82 stars 8 forks source link

Make `injectivity_radius` less prone to ambiguities #189

Open mateuszbaran opened 2 months ago

mateuszbaran commented 2 months ago

The current interface makes it easy to cause ambiguities with the two-argument variant, see https://github.com/JuliaManifolds/Manifolds.jl/pull/722 . Maybe the function could be restructured to make it less likely. For example by splitting it into a two-level scheme maybe?

kellertuer commented 2 months ago

Sounds like a very good idea WE should – towards a 1.0 – focus on reducing ambigutiies to some extend I think.

2 Levels is great, then we could also do something like

injectivity_radius(M; retraction_method=...) and injectivity_radius(M,p; retraction_method=...)

so that the higher level gets nicer to use. Wr just have to find a good name for the llower level then and could do

new_name(M, nothing, method) for the first and new_name(M, p, method), to still have the global case well-distinguished. Or even have 2 names here.