diff --git a/NEWS.md b/NEWS.md index 931ff41dda..b7bf9f8f4c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.7] - 2023-11-14 + +### Fixed + +- Fixed `is_flat` for `CholeskySpace` and `SymmetricPositiveDefinite` with `LogCholeskyMetric` [https://github.com/JuliaManifolds/Manifolds.jl/issues/684](https://github.com/JuliaManifolds/Manifolds.jl/issues/684). + ## [0.9.6] - 2023-11-09 ### Fixed diff --git a/Project.toml b/Project.toml index 932393dddd..50ae539bec 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.9.6" +version = "0.9.7" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/src/manifolds/CholeskySpace.jl b/src/manifolds/CholeskySpace.jl index ff3b9af276..5127235a07 100644 --- a/src/manifolds/CholeskySpace.jl +++ b/src/manifolds/CholeskySpace.jl @@ -132,9 +132,9 @@ end """ is_flat(::CholeskySpace) -Return false. [`CholeskySpace`](@ref) is not a flat manifold. +Return true. [`CholeskySpace`](@ref) is a flat manifold. See Proposition 8 of [Lin:2019](@cite). """ -is_flat(M::CholeskySpace) = false +is_flat(M::CholeskySpace) = true @doc raw""" log(M::CholeskySpace, X, p, q) diff --git a/src/manifolds/SymmetricPositiveDefiniteLogCholesky.jl b/src/manifolds/SymmetricPositiveDefiniteLogCholesky.jl index 25c7d22d42..47c43ea723 100644 --- a/src/manifolds/SymmetricPositiveDefiniteLogCholesky.jl +++ b/src/manifolds/SymmetricPositiveDefiniteLogCholesky.jl @@ -99,10 +99,10 @@ end """ is_flat(::MetricManifold{ℝ,<:SymmetricPositiveDefinite,LogCholeskyMetric}) -Return false. [`SymmetricPositiveDefinite`](@ref) with [`LogCholeskyMetric`](@ref) -is not a flat manifold. +Return true. [`SymmetricPositiveDefinite`](@ref) with [`LogCholeskyMetric`](@ref) +is a flat manifold. See Proposition 8 of [Lin:2019](@cite). """ -is_flat(M::MetricManifold{ℝ,<:SymmetricPositiveDefinite,LogCholeskyMetric}) = false +is_flat(M::MetricManifold{ℝ,<:SymmetricPositiveDefinite,LogCholeskyMetric}) = true @doc raw""" log(M::MetricManifold{ℝ,<:SymmetricPositiveDefinite,LogCholeskyMetric}, p, q) diff --git a/src/manifolds/SymmetricPositiveSemidefiniteFixedRank.jl b/src/manifolds/SymmetricPositiveSemidefiniteFixedRank.jl index 9be8593caf..0f096829b7 100644 --- a/src/manifolds/SymmetricPositiveSemidefiniteFixedRank.jl +++ b/src/manifolds/SymmetricPositiveSemidefiniteFixedRank.jl @@ -156,7 +156,7 @@ end """ is_flat(::SymmetricPositiveSemidefiniteFixedRank) -Return false. [`SymmetricPositiveSemidefiniteFixedRank`](@ref) is not a flat manifold. +Return false. [`SymmetricPositiveSemidefiniteFixedRank`](@ref) is not a flat manifold. See Theorem A.18 in [MassartAbsil:2020](@cite). """ is_flat(M::SymmetricPositiveSemidefiniteFixedRank) = false diff --git a/test/manifolds/cholesky_space.jl b/test/manifolds/cholesky_space.jl index 2cbd2e11db..3fe165f654 100644 --- a/test/manifolds/cholesky_space.jl +++ b/test/manifolds/cholesky_space.jl @@ -4,7 +4,7 @@ include("../utils.jl") M = Manifolds.CholeskySpace(3) @test repr(M) == "CholeskySpace(3)" - @test !is_flat(M) + @test is_flat(M) types = [Matrix{Float64}] TEST_FLOAT32 && push!(types, Matrix{Float32}) diff --git a/test/manifolds/symmetric_positive_definite.jl b/test/manifolds/symmetric_positive_definite.jl index 254f187f69..e8d0e6c091 100644 --- a/test/manifolds/symmetric_positive_definite.jl +++ b/test/manifolds/symmetric_positive_definite.jl @@ -34,7 +34,11 @@ include("../utils.jl") end @testset "$(typeof(M))" begin @test representation_size(M) == (3, 3) - @test !is_flat(M) + if M === M3 + @test is_flat(M) + else + @test !is_flat(M) + end for T in types exp_log_atol_multiplier = 8.0 if T <: MMatrix{3,3,Float64}