Skip to content

Commit

Permalink
Test coverage for case in closest_representative! where given points …
Browse files Browse the repository at this point in the history
…are not as close as possible.
  • Loading branch information
Simon Jacobsson committed Dec 19, 2024
1 parent 25ece44 commit 82f2c72
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions test/manifolds/segre.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ using Manifolds, Test, Random, LinearAlgebra, FiniteDifferences
Segre(7, 2),
Segre(7, 9, 9),
Segre(9, 3, 6, 6),
MetricManifold(Segre(10), WarpedMetric{1.2025837056880606}()),
MetricManifold(Segre(2, 9), WarpedMetric{1.1302422072971439}()),
MetricManifold(Segre(9, 6, 10), WarpedMetric{1.4545138169484464}()),
MetricManifold(Segre(9, 3, 8, 10), WarpedMetric{1.396673190458706}()),
MetricManifold(Segre(10), WarpedMetric(1.2025837056880606)),
MetricManifold(Segre(2, 9), WarpedMetric(1.1302422072971439)),
MetricManifold(Segre(9, 6, 10), WarpedMetric(1.4545138169484464)),
MetricManifold(Segre(9, 3, 8, 10), WarpedMetric(1.396673190458706)),
]

# Vs[i] is the valence of Ms[i]
Expand Down Expand Up @@ -831,4 +831,19 @@ using Manifolds, Test, Random, LinearAlgebra, FiniteDifferences
end
end
end

# Test a point that does not use the closest representative
@testset "log" begin
M = Ms[4]
p = ps[4]
q = qs[4]
q_ = [q[1], q[2], q[3], -q[4], -q[5]]
@test isapprox(log(M, p, q), log(M, p, q_))

M = Ms[8]
p = ps[8]
q = qs[8]
q_ = [q[1], q[2], q[3], -q[4], -q[5]]
@test isapprox(log(M, p, q), log(M, p, q_))
end
end

0 comments on commit 82f2c72

Please sign in to comment.