Skip to content

Commit

Permalink
Merge branch 'kellertuer/first-group' of github.com:JuliaManifolds/Li…
Browse files Browse the repository at this point in the history
…eGroups.jl into kellertuer/first-group
  • Loading branch information
kellertuer committed Oct 21, 2024
2 parents eae7e20 + 859d6f6 commit bf14e8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
14 changes: 6 additions & 8 deletions src/Lie_algebra/Lie_algebra_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ this is internally just a `const` of the corresponding $(_link(:TangentSpace)).
Return the Lie Algebra belonging to the [`LieGroup`](@ref) `G`.
"""
const LieAlgebra{𝔽,G,I} = ManifoldsBase.Fiber{
𝔽,ManifoldsBase.TangentSpaceType,G,I
} where {𝔽,G<:LieGroup{𝔽},I<:Identity}

function LieAlgebra(G::LieGroup{𝔽}) where {𝔽}
return LieAlgebra{𝔽,typeof(G),typeof(Identity(G))}(
G, Identity(G), ManifoldsBase.TangentSpaceType()
)
const LieAlgebra{𝔽,O<:AbstractGroupOperation,G<:LieGroup{𝔽,O}} = ManifoldsBase.Fiber{
𝔽,ManifoldsBase.TangentSpaceType,G,Identity{O}
}

function LieAlgebra(G::LieGroup{𝔽,O}) where {𝔽,O<:AbstractGroupOperation}
return LieAlgebra{𝔽,O,typeof(G)}(G, Identity(G), ManifoldsBase.TangentSpaceType())
end

_doc_lie_bracket = """
Expand Down
10 changes: 4 additions & 6 deletions src/group_operations/addition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ function inv!(G::LieGroup{𝔽,AdditionGroupOperation}, h, g) where {𝔽}
end

_doc_lie_bracket_add = """
lie_bracket!(𝔤::LieAlgebra{𝔽,<:LieGroup{𝔽,AdditionGroupOperation}}, X, Y)
lie_bracket!(𝔤::LieAlgebra{𝔽,<:LieGroup{𝔽,AdditionGroupOperation}}, Z, X, Y)
lie_bracket!(𝔤::LieAlgebra{𝔽,AdditionGroupOperation}, X, Y)
lie_bracket!(𝔤::LieAlgebra{𝔽,AdditionGroupOperation}, Z, X, Y)
Compute the Lie bracket ``[⋅,⋅]: $(_math(:𝔤))×$(_math(:𝔤))$(_math(:𝔤))``,
which for the for the [`AdditionGroupOperation`](@ref) simplifies to the
Expand All @@ -176,12 +176,10 @@ The computation can be done in-place of `Z`.
"""

@doc "$(_doc_lie_bracket_add)"
lie_bracket(𝔤::LieAlgebra{𝔽,<:LieGroup{𝔽,AdditionGroupOperation}}, X, Y) where {𝔽}
lie_bracket(𝔤::LieAlgebra{𝔽,AdditionGroupOperation}, X, Y) where {𝔽}

@doc "$(_doc_lie_bracket_add)"
function lie_bracket!(
𝔤::LieAlgebra{𝔽,<:LieGroup{𝔽,AdditionGroupOperation}}, Z, X, Y
) where {𝔽}
function lie_bracket!(𝔤::LieAlgebra{𝔽,AdditionGroupOperation}, Z, X, Y) where {𝔽}
return zero_vector!(𝔤, Z)
end

Expand Down

0 comments on commit bf14e8f

Please sign in to comment.