Skip to content

Commit

Permalink
extend tests to inplace inverse retractions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Oct 20, 2023
1 parent 82c7a8c commit e673e69
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions ext/ManifoldsTestExt/tests_general.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,21 +342,27 @@ function test_manifold(
Test.@test isapprox(M, p2, q; atol=point_atol)
# This test is not reasonable for `inverse_retract!(M, X, p, q, m)`,
# since X is of different type/concept than p,q

end
end
end
for p in pts
epsx = find_eps(p)
for inv_retr_method in inverse_retraction_methods
Test.@test isapprox(
M,
p,
zero_vector(M, p),
inverse_retract(M, p, p, inv_retr_method);
atol=epsx * retraction_atol_multiplier,
rtol=retraction_atol_multiplier == 0 ?
sqrt(epsx) * retraction_rtol_multiplier : 0,
)
X = inverse_retract(M, p, p, inv_retr_method)
Y = copy(M, p, X)
inverse_retract!(M, Y, p, p, inv_retr_method)
for Z in [X, Y]
Test.@test isapprox(
M,
p,
zero_vector(M, p),
Z;
atol=epsx * retraction_atol_multiplier,
rtol=retraction_atol_multiplier == 0 ?
sqrt(epsx) * retraction_rtol_multiplier : 0,
)
end
end
end
end
Expand Down

0 comments on commit e673e69

Please sign in to comment.