@@ -55,6 +55,18 @@ function Manifolds.get_vector!(M::NPowerManifold, Y, p, c, B::AbstractBasis)
5555 return Y
5656end
5757
58+ # Allocating get_vector that infers element type from coordinates (Dual-compatible)
59+ function ManifoldsBase. get_vector (M:: NPowerManifold , p, c, B:: AbstractBasis )
60+ dim = manifold_dimension (M. manifold)
61+ rep_size = Manifolds. representation_size (M. manifold)
62+ v_iter = Ref (0 )
63+ return [begin
64+ coords_i = SVector {dim} (view (c, v_iter[]+ 1 : v_iter[]+ dim))
65+ v_iter[] += dim
66+ get_vector (M. manifold, Manifolds. _read (M, rep_size, p, i), coords_i, B)
67+ end for i in Manifolds. get_iterator (M)]
68+ end
69+
5870function Manifolds. exp! (M:: NPowerManifold , q, p, X)
5971 rep_size = Manifolds. representation_size (M. manifold)
6072 for i in Manifolds. get_iterator (M)
@@ -67,6 +79,16 @@ function Manifolds.exp!(M::NPowerManifold, q, p, X)
6779 return q
6880end
6981
82+ # Allocating exp that infers element type from tangent vector (Dual-compatible)
83+ function ManifoldsBase. exp (M:: NPowerManifold , p, X)
84+ rep_size = Manifolds. representation_size (M. manifold)
85+ return [exp (
86+ M. manifold,
87+ Manifolds. _read (M, rep_size, p, i),
88+ Manifolds. _read (M, rep_size, X, i),
89+ ) for i in Manifolds. get_iterator (M)]
90+ end
91+
7092function LieGroups. compose! (M:: NPowerManifold , x, p, q)
7193 rep_size = representation_size (M. manifold)
7294 for i in Manifolds. get_iterator (M)
0 commit comments