Skip to content

Commit

Permalink
adapt to exp/retract unification
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Oct 16, 2023
1 parent d6091f8 commit 0a1ecfc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Manifolds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import ManifoldsBase:
_access_nested,
_get_basis,
_injectivity_radius,
_inverse_retract,
_inverse_retract!,
_read,
_retract,
_retract!,
_write,
active_traits,
Expand Down
8 changes: 8 additions & 0 deletions src/manifolds/VectorBundle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ function inner(B::FiberBundle, p, X, Y)
return inner(B.manifold, px, VXM, VYM) + inner(F, Vx, VXF, VYF)
end

function _inverse_retract(M::FiberBundle, p, q, ::FiberBundleInverseProductRetraction)
return inverse_retract_product(M, p, q)
end

function _inverse_retract!(M::FiberBundle, X, p, q, ::FiberBundleInverseProductRetraction)
return inverse_retract_product!(M, X, p, q)
end
Expand Down Expand Up @@ -251,6 +255,10 @@ which by default allocates and calls `retract_product!`.
"""
retract(::VectorBundle, p, q, t::Number, ::FiberBundleProductRetraction)

function _retract(M::VectorBundle, p, X, t::Number, ::FiberBundleProductRetraction)
return retract_product(M, p, X, t)
end

function retract_product(M::VectorBundle, p, X, t::Number)
q = allocate_result(M, retract, p, X)
return retract_product!(M, q, p, X, t)
Expand Down
4 changes: 0 additions & 4 deletions test/manifolds/circle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ include("../utils.jl")

using Manifolds: TFVector, CoTFVector

# TODO: remove after bug in StaticArray is fixed
@inline Base.copy(a::SizedArray) = __copy(a)
@inline __copy(a::SizedArray{S,T}) where {S,T} = SizedArray{S,T}(copy(a.data))

@testset "Circle" begin
M = Circle()
@testset "Real Circle Basics" begin
Expand Down

0 comments on commit 0a1ecfc

Please sign in to comment.