JuliaManifolds / ManifoldsBase.jl

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

AbstractPowerManifold as an interface? #54

Closed kellertuer closed 3 years ago

kellertuer commented 3 years ago

I am currently thinking of simplifying the asymptote export interface over in Manopt.jl. For that I would need the abstract power manifold

https://github.com/JuliaManifolds/Manifolds.jl/blob/9e43ea07ea7c8e69106136a70efc0147f19ba6cf/src/manifolds/PowerManifold.jl#L31

here, to (somewhen) get rid of the dependency of Manifolds in Manopt (i.e. only depend on base). Could we maybe move that over? Just the abstract one and maybe all abstract functions that do not introduce dependencies here.

kellertuer commented 3 years ago

I just noticed that for some implementations I need to actually to a PowerManifold of some size (currently), but as far as I see that is mainly to construct a zero tangent vector then. So that can surely be refactored to not be based on that.

mateuszbaran commented 3 years ago

How do you imagine to use this interface without Manifolds.jl? We can move some parts of AbstractPowerManifold to ManifoldsBase.jl but I'm not sure what could actually be done with the parts that don't introduce new dependencies.

kellertuer commented 3 years ago

To be precise I think I would need

... but for this last point if that introduces too much dependencies, the first two (or even just the very first) would be fine, too.

mateuszbaran commented 3 years ago

Would moving just the nested representation be enough? I think it could be moved here without introducing new dependencies.

kellertuer commented 3 years ago

Sure, that would split both approaches we have, but the interface would provide the straight-forward/simple one of nestedness, which would elaborate on why Power is parametrised as it is. That fits very good I think.

mateuszbaran commented 3 years ago

I've copied more or less what could go to ManifoldsBase.jl. There are no tests yet, feel free to add some to the ManifoldsBase.jl PR.