diff --git a/.zenodo.json b/.zenodo.json index cdf6e9c2bb..d4a28f3ea3 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,5 +1,11 @@ { "contributors": [ + { + "affiliation": "NTNU Trondheim", + "name": "Jasa, Hajg", + "type": "ProjectMember", + "orcid": "0009-0002-7917-0530" + }, { "name": "Mathieu Besançon", "type": "Other", diff --git a/Project.toml b/Project.toml index a4355013e3..a566d92328 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Manifolds" uuid = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e" authors = ["Seth Axen ", "Mateusz Baran ", "Ronny Bergmann ", "Antoine Levitt "] -version = "0.8.76" +version = "0.8.77" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/docs/src/references.bib b/docs/src/references.bib index ec6b78b79c..46e3f3d19b 100644 --- a/docs/src/references.bib +++ b/docs/src/references.bib @@ -505,6 +505,14 @@ @article{LorenziPennec:2013 TITLE = {Efficient Parallel Transport of Deformations in Time Series of Images: From Schild's to Pole Ladder}, JOURNAL = {Journal of Mathematical Imaging and Vision} } +@book{Lee:2019, + AUTHOR = {John M. Lee}, + DOI = {10.1007/978-3-319-91755-9}, + ISBN = {978-3-319-91755-9}, + PUBLISHER = {Springer Cham}, + TITLE = {Introduction to Riemannian Manifolds}, + YEAR = {2019} +} # # M # ---------------------------------------------------------------------------------------- @@ -667,7 +675,7 @@ @book{SrivastavaKlassen:2016 AUTHOR = {Anuj Srivastava and Eric P. Klassen}, DOI = {10.1007/978-1-4939-4020-2}, ISBN = {978-1-4939-4018-9}, - PUBLISHER = {Springer NEw York}, + PUBLISHER = {Springer New York}, TITLE = {Functional and Shape Data Analysis}, YEAR = {2016} } diff --git a/src/manifolds/Hyperbolic.jl b/src/manifolds/Hyperbolic.jl index 9e18b5ec22..37b62e5718 100644 --- a/src/manifolds/Hyperbolic.jl +++ b/src/manifolds/Hyperbolic.jl @@ -380,3 +380,20 @@ for (P, T) in zip(_ExtraHyperbolicPointTypes, _ExtraHyperbolicTangentTypes) @eval zero_vector(::Hyperbolic, p::$P) = $T(zero(p.value)) @eval zero_vector!(::Hyperbolic, X::$T, ::$P) = fill!(X.value, 0) end + +@doc raw""" + riemann_tensor(M::Hyperbolic{n}, p, X, Y, Z) + +Compute the Riemann tensor ``R(X,Y)Z`` at point `p` on [`Hyperbolic`](@ref) `M`. +The formula reads (see e.g., [Lee:2019](@cite) Proposition 8.36) + +````math +R(X,Y)Z = - (\langle Z, Y \rangle X - \langle Z, X \rangle Y) +```` +""" +riemann_tensor(::Hyperbolic, p, X, Y, Z) + +function riemann_tensor!(M::Hyperbolic, W, p, X, Y, Z) + W .= inner(M, p, Z, X) .* Y .- inner(M, p, Z, Y) .* X + return W +end diff --git a/test/manifolds/hyperbolic.jl b/test/manifolds/hyperbolic.jl index 0fede44efe..97a25da6a5 100644 --- a/test/manifolds/hyperbolic.jl +++ b/test/manifolds/hyperbolic.jl @@ -328,6 +328,26 @@ include("../utils.jl") A = change_metric(M, MinkowskiMetric(), p, X) @test A == X end + @testset "other metric" begin + M = Hyperbolic(2) + @test riemann_tensor( + M, + [0.0, 0.0, -1.0], + [-1.0, 0.0, 0.0], + [0.0, -1.0, 0.0], + [-0.5, -0.5, 0.0], + ) == [0.5, -0.5, 0.0] + X = [0.0, 0.0, 0.0] + @test riemann_tensor!( + M, + X, + [0.0, 0.0, -1.0], + [-1.0, 0.0, 0.0], + [0.0, -1.0, 0.0], + [-0.5, -0.5, 0.0], + ) === X + @test X == [0.5, -0.5, 0.0] + end @testset "ManifoldDiff" begin # ManifoldDiff M = Hyperbolic(2)