JuliaManifolds / Manifolds.jl

Manifolds.jl provides a library of manifolds aiming for an easy-to-use and fast implementation.
https://juliamanifolds.github.io/Manifolds.jl
MIT License
368 stars 53 forks source link

Hyperbolic Riemann tensor #651

Closed hajg-ijk closed 11 months ago

hajg-ijk commented 12 months ago

This small PR implements the Riemann tensor for the Hyperbolic manifold, analogous to the one on the Sphere.

I know I should probably open an issue about this, but since it's related: I was wondering whether it would make sense to implement a sectional_curvature method for the manifolds where a riemann_tensor is available.

I also added a new textbook reference for the formula and myself to the list of contributors.

codecov[bot] commented 12 months ago

Codecov Report

Merging #651 (6ae7cf0) into master (22dc01d) will decrease coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #651      +/-   ##
==========================================
- Coverage   99.22%   99.20%   -0.02%     
==========================================
  Files         106      106              
  Lines       10430    10433       +3     
==========================================
+ Hits        10349    10350       +1     
- Misses         81       83       +2     
Files Changed Coverage Δ
src/manifolds/Hyperbolic.jl 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

mateuszbaran commented 12 months ago

Thanks, I think this is a good addition.

I know I should probably open an issue about this, but since it's related: I was wondering whether it would make sense to implement a sectional_curvature method for the manifolds where a riemann_tensor is available

What is computing sectional curvatures useful for? I'm generally trying to avoid adding functions that don't have a practical use. Note that most of MetricManifold stuff needs to be revisited so don't pay too much attention to it.

hajg-ijk commented 12 months ago

What is computing sectional curvatures useful for? I'm generally trying to avoid adding functions that don't have a practical use. Note that most of MetricManifold stuff needs to be revisited so don't pay too much attention to it.

Honestly, I only thought about it because I am using it in what I am doing at the moment, which is also the reason why I implemented the Riemann tensor for the hyperbolic space. I thought about it as just a utility function, much like some cost functions are exported by Manopt. However, I am not sure about all the possible use cases, and one might of course argue that it only takes a few lines to implement if needed.

mateuszbaran commented 12 months ago

OK, sure, if you find it useful then we can add it to Manifolds.jl :slightly_smiling_face:

kellertuer commented 11 months ago

I think that is a useful function that could be added (in a new PR), but should then also be properly documented what the interface is and what it does.

edit: Oh I misread the title, this function is indeed nice and useful here :) Thanks for documenting it carefully and directly also adding tests

hajg-ijk commented 11 months ago

I still don't understand why codecov/project fails. It laments an indirect change in the circle group, but when you look at it, it has no relation whatsoever to my changes.

kellertuer commented 11 months ago

Nighlty is ok to fail and the rest looks good. all is fine.