diff --git a/src/Manifolds.jl b/src/Manifolds.jl index 2d08d7f421..2258590533 100644 --- a/src/Manifolds.jl +++ b/src/Manifolds.jl @@ -220,8 +220,10 @@ using ManifoldsBase: ComplexNumbers, ComponentManifoldError, CompositeManifoldError, + CotangentSpace, CotangentSpaceType, CoTFVector, + CoTVector, DefaultBasis, DefaultOrthogonalBasis, DefaultOrthonormalBasis, @@ -255,6 +257,7 @@ using ManifoldsBase: PolarInverseRetraction, PolarRetraction, PoleLadderTransport, + PowerBasisData, PowerManifold, PowerManifoldNested, PowerManifoldNestedReplacing, @@ -728,7 +731,6 @@ export AbstractRetractionMethod, ODEExponentialRetraction, PadeRetraction, ProductRetraction, - PowerRetraction, SasakiRetraction # Inverse Retraction types export AbstractInverseRetractionMethod, @@ -793,7 +795,6 @@ export ×, einstein_tensor, embed, embed!, - equiv, exp, exp!, flat, @@ -806,8 +807,6 @@ export ×, get_embedding, get_orbit_action, get_total_space, - grad_euclidean_to_manifold, - grad_euclidean_to_manifold!, hat, hat!, horizontal_component, @@ -919,7 +918,6 @@ export AbstractGroupAction, GroupManifold, GroupOperationAction, Identity, - InvariantMetric, LeftAction, LeftInvariantMetric, LeftSide, diff --git a/src/groups/product_group.jl b/src/groups/product_group.jl index 415c7dd259..571f108ed6 100644 --- a/src/groups/product_group.jl +++ b/src/groups/product_group.jl @@ -62,7 +62,7 @@ function Base.show(io::IO, ::MIME"text/plain", G::ProductGroup) io, "ProductGroup with $(length(base_manifold(G).manifolds)) subgroup$(length(base_manifold(G).manifolds) == 1 ? "" : "s"):", ) - return _show_product_manifold_no_header(io, base_manifold(G)) + return ManifoldsBase._show_product_manifold_no_header(io, base_manifold(G)) end function Base.show(io::IO, G::ProductGroup) diff --git a/src/manifolds/VectorFiber.jl b/src/manifolds/VectorFiber.jl index bfe9a66382..410d19babb 100644 --- a/src/manifolds/VectorFiber.jl +++ b/src/manifolds/VectorFiber.jl @@ -1,16 +1,4 @@ -const CotangentSpaceAtPoint{𝔽,M} = - Fiber{𝔽,CotangentSpaceType,M} where {𝔽,M<:AbstractManifold{𝔽}} - -""" - CotangentSpaceAtPoint(M::AbstractManifold, p) - -Return an object of type [`VectorSpaceAtPoint`](@ref) representing cotangent -space at `p`. -""" -function CotangentSpace(M::AbstractManifold, p) - return Fiber(M, CotangentSpaceType(), p) -end """ TensorProductType(spaces::VectorSpaceType...) @@ -24,6 +12,10 @@ end TensorProductType(spaces::VectorSpaceType...) = TensorProductType{typeof(spaces)}(spaces) +function inner(B::CotangentSpace, p, X, Y) + return inner(B.manifold, B.point, sharp(B.manifold, B.point, X), sharp(B.manifold, B.point, Y)) +end + function Base.show(io::IO, tpt::TensorProductType) return print(io, "TensorProductType(", join(tpt.spaces, ", "), ")") end diff --git a/test/manifolds/fiber.jl b/test/manifolds/fiber.jl index 7582e10aa1..8bf9253d09 100644 --- a/test/manifolds/fiber.jl +++ b/test/manifolds/fiber.jl @@ -9,7 +9,7 @@ struct TestVectorSpaceType <: VectorSpaceType end @testset "tangent and cotangent space" begin p = [1.0, 0.0, 0.0] t_p = TangentSpace(M, p) - ct_p = CotangentSpaceAtPoint(M, p) + ct_p = CotangentSpace(M, p) t_ps = sprint(show, "text/plain", t_p) sp = sprint(show, "text/plain", p) sp = replace(sp, '\n' => "\n ") @@ -17,10 +17,10 @@ struct TestVectorSpaceType <: VectorSpaceType end @test t_ps == t_ps_test @test base_manifold(t_p) == M @test base_manifold(ct_p) == M - @test t_p.fiber.manifold == M - @test ct_p.fiber.manifold == M - @test t_p.fiber.fiber == Manifolds.TangentFiber - @test ct_p.fiber.fiber == Manifolds.CotangentFiber + @test t_p.manifold == M + @test ct_p.manifold == M + @test t_p.fiber_type == TangentSpaceType() + @test ct_p.fiber_type == CotangentSpaceType() @test t_p.point == p @test ct_p.point == p @test injectivity_radius(t_p) == Inf diff --git a/test/metric.jl b/test/metric.jl index 778d4e79ee..2ec18b89f3 100644 --- a/test/metric.jl +++ b/test/metric.jl @@ -617,15 +617,16 @@ Manifolds.inner(::MetricManifold{ℝ,<:AbstractManifold{ℝ},Issue539Metric}, p, cotspace = CotangentSpace(M, p) cotspace2 = CotangentSpace(MM, p) @test coX.X ≈ X - @test inner(M, p, X, Y) ≈ inner(cotspace, p, coX, coY) - @test inner(MM, p, fX, fY) ≈ inner(cotspace, p, coX, coY) + X0p = zero_vector(MM, p) + @test inner(M, p, X, Y) ≈ inner(cotspace, X0p, coX, coY) + @test inner(MM, p, fX, fY) ≈ inner(cotspace, X0p, coX, coY) - @test inner(MM, p, fX, fY) ≈ inner(cotspace2, p, cofX, cofY) + @test inner(MM, p, fX, fY) ≈ inner(cotspace2, X0p, cofX, cofY) @test sharp(M, p, coX) ≈ X coMMfX = flat(MM, p, fX) coMMfY = flat(MM, p, fY) - @test inner(MM, p, fX, fY) ≈ inner(cotspace2, p, coMMfX, coMMfY) + @test inner(MM, p, fX, fY) ≈ inner(cotspace2, X0p, coMMfX, coMMfY) @test isapprox(sharp(MM, p, coMMfX).data, fX.data) @testset "Mutating flat/sharp" begin diff --git a/test/runtests.jl b/test/runtests.jl index c5f5f730b1..afb113cc85 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -176,7 +176,6 @@ include("utils.jl") include_test("manifolds/product_manifold.jl") include_test("manifolds/power_manifold.jl") include_test("manifolds/quotient_manifold.jl") - include_test("manifolds/fiber.jl") include_test("manifolds/fiber_bundle.jl") include_test("manifolds/vector_bundle.jl") include_test("manifolds/graph.jl")