Skip to content

Commit

Permalink
GroupManifold accepts two arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierverdier committed Sep 14, 2024
1 parent 11f0a6c commit cce7531
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 8 additions & 0 deletions src/groups/GroupManifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ struct GroupManifold{
vectors::VR
end

function GroupManifold(

Check warning on line 27 in src/groups/GroupManifold.jl

View check run for this annotation

Codecov / codecov/patch

src/groups/GroupManifold.jl#L27

Added line #L27 was not covered by tests
M::AbstractManifold{𝔽},
op,
rep=LeftInvariantRepresentation(),
) where {𝔽}
return GroupManifold{𝔽,typeof(M),typeof(op),typeof(rep)}(M, op, rep)

Check warning on line 32 in src/groups/GroupManifold.jl

View check run for this annotation

Codecov / codecov/patch

src/groups/GroupManifold.jl#L32

Added line #L32 was not covered by tests
end

"""
vector_representation(M::GroupManifold)
Expand Down
12 changes: 2 additions & 10 deletions test/groups/groups_general.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ using Manifolds:
@test switch_direction(LeftAction()) === RightAction()
@test switch_direction(RightAction()) === LeftAction()

G = GroupManifold(
NotImplementedManifold(),
NotImplementedOperation(),
Manifolds.LeftInvariantRepresentation(),
)
G = GroupManifold(NotImplementedManifold(), NotImplementedOperation())
@test Manifolds._action_order(G, 1, 2, LeftForwardAction()) === (1, 2)
@test Manifolds._action_order(G, 1, 2, RightBackwardAction()) === (2, 1)
end
Expand All @@ -153,11 +149,7 @@ using Manifolds:
end

@testset "Addition operation" begin
G = GroupManifold(
NotImplementedManifold(),
Manifolds.AdditionOperation(),
Manifolds.LeftInvariantRepresentation(),
)
G = GroupManifold(NotImplementedManifold(), Manifolds.AdditionOperation())
test_group(
G,
[[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]],
Expand Down

0 comments on commit cce7531

Please sign in to comment.