Skip to content

Commit

Permalink
docs improvements; split group actions to a separate page
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Oct 23, 2023
1 parent 7481720 commit 697df39
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 67 deletions.
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ makedocs(;
"Atlases and charts" => "features/atlases.md",
"Differentiation" => "features/differentiation.md",
"Distributions" => "features/distributions.md",
"Group actions" => "features/group_actions.md",
"Integration" => "features/integration.md",
"Statistics" => "features/statistics.md",
"Testing" => "features/testing.md",
Expand Down
63 changes: 63 additions & 0 deletions docs/src/features/group_actions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Group actions

Group actions represent actions of a given group on a specified manifold.
The following operations are available:

* [`action_side`](@ref): whether action acts from the [`LeftSide`](@ref) or [`RightSide`](@ref) (not to be confused with action direction).
* [`apply`](@ref): performs given action of an element of the group on an object of compatible type.
* [`apply_diff`](@ref): differential of [`apply`](@ref) with respect to the object it acts upon.
* [`direction`](@ref): tells whether a given action is [`LeftAction`](@ref), [`RightAction`](@ref).
* [`inverse_apply`](@ref): performs given action of the inverse of an element of the group on an object of compatible type. By default inverts the element and calls [`apply`](@ref) but it may be have a faster implementation for some actions.
* [`inverse_apply_diff`](@ref): counterpart of [`apply_diff`](@ref) for [`inverse_apply`](@ref).
* [`optimal_alignment`](@ref): determine the element of a group that, when it acts upon a point, produces the element closest to another given point in the metric of the G-manifold.

Furthermore, group operation action features the following:

* [`translate`](@ref Main.Manifolds.translate): an operation that performs either ([`LeftAction`](@ref)) on the [`LeftSide`](@ref) or ([`RightAction`](@ref)) on the [`RightSide`](@ref) translation, or actions by inverses of elements ([`RightAction`](@ref) on the [`LeftSide`](@ref) and [`LeftAction`](@ref) on the [`RightSide`](@ref)). This is by default performed by calling [`compose`](@ref) with appropriate order of arguments. This function is separated from `compose` mostly to easily represent its differential, [`translate_diff`](@ref).
* [`translate_diff`](@ref): differential of [`translate`](@ref Main.Manifolds.translate) with respect to the point being translated.
* [`adjoint_action`](@ref): adjoint action of a given element of a Lie group on an element of its Lie algebra.
* [`lie_bracket`](@ref): Lie bracket of two vectors from a Lie algebra corresponding to a given group.

The following group actions are available:

* Group operation action [`GroupOperationAction`](@ref) that describes action of a group on itself.
* [`RotationAction`](@ref), that is action of [`SpecialOrthogonal`](@ref) group on different manifolds.
* [`TranslationAction`](@ref), which is the action of [`TranslationGroup`](@ref) group on different manifolds.

```@autodocs
Modules = [Manifolds]
Pages = ["groups/group_action.jl"]
Order = [:type, :function]
```

## Group operation action

```@autodocs
Modules = [Manifolds]
Pages = ["groups/group_operation_action.jl"]
Order = [:type, :function]
```

## Rotation action

```@autodocs
Modules = [Manifolds]
Pages = ["groups/rotation_action.jl"]
Order = [:type, :function]
```

## Translation action

```@autodocs
Modules = [Manifolds]
Pages = ["groups/translation_action.jl"]
Order = [:type, :function]
```

## Rotation-translation action (special Euclidean)

```@autodocs
Modules = [Manifolds]
Pages = ["groups/rotation_translation_action.jl"]
Order = [:type, :const, :function]
```
66 changes: 1 addition & 65 deletions docs/src/manifolds/group.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Group manifolds and actions](@id GroupManifoldSection)
# [Group manifolds](@id GroupManifoldSection)

Lie groups, groups that are Riemannian manifolds with a smooth binary group operation [`AbstractGroupOperation`](@ref), are implemented as [`AbstractDecoratorManifold`](https://juliamanifolds.github.io/ManifoldsBase.jl/stable/decorator.html#ManifoldsBase.AbstractDecoratorManifold) and specifying the group operation using the [`IsGroupManifold`](@ref) or by decorating an existing manifold with a group operation using [`GroupManifold`](@ref).

Expand Down Expand Up @@ -180,70 +180,6 @@ Pages = ["groups/translation_group.jl"]
Order = [:constant, :type, :function]
```

## Group actions

Group actions represent actions of a given group on a specified manifold.
The following operations are available:

* [`action_side`](@ref): whether action acts from the [`LeftSide`](@ref) or [`RightSide`](@ref) (not to be confused with action direction).
* [`apply`](@ref): performs given action of an element of the group on an object of compatible type.
* [`apply_diff`](@ref): differential of [`apply`](@ref) with respect to the object it acts upon.
* [`direction`](@ref): tells whether a given action is [`LeftAction`](@ref), [`RightAction`](@ref).
* [`inverse_apply`](@ref): performs given action of the inverse of an element of the group on an object of compatible type. By default inverts the element and calls [`apply`](@ref) but it may be have a faster implementation for some actions.
* [`inverse_apply_diff`](@ref): counterpart of [`apply_diff`](@ref) for [`inverse_apply`](@ref).
* [`optimal_alignment`](@ref): determine the element of a group that, when it acts upon a point, produces the element closest to another given point in the metric of the G-manifold.

Furthermore, group operation action features the following:

* [`translate`](@ref Main.Manifolds.translate): an operation that performs either ([`LeftAction`](@ref)) on the [`LeftSide`](@ref) or ([`RightAction`](@ref)) on the [`RightSide`](@ref) translation, or actions by inverses of elements ([`RightAction`](@ref) on the [`LeftSide`](@ref) and [`LeftAction`](@ref) on the [`RightSide`](@ref)). This is by default performed by calling [`compose`](@ref) with appropriate order of arguments. This function is separated from `compose` mostly to easily represent its differential, [`translate_diff`](@ref).
* [`translate_diff`](@ref): differential of [`translate`](@ref Main.Manifolds.translate) with respect to the point being translated.
* [`adjoint_action`](@ref): adjoint action of a given element of a Lie group on an element of its Lie algebra.
* [`lie_bracket`](@ref): Lie bracket of two vectors from a Lie algebra corresponding to a given group.

The following group actions are available:

* Group operation action [`GroupOperationAction`](@ref) that describes action of a group on itself.
* [`RotationAction`](@ref), that is action of [`SpecialOrthogonal`](@ref) group on different manifolds.
* [`TranslationAction`](@ref), which is the action of [`TranslationGroup`](@ref) group on different manifolds.

```@autodocs
Modules = [Manifolds]
Pages = ["groups/group_action.jl"]
Order = [:type, :function]
```

### Group operation action

```@autodocs
Modules = [Manifolds]
Pages = ["groups/group_operation_action.jl"]
Order = [:type, :function]
```

### Rotation action

```@autodocs
Modules = [Manifolds]
Pages = ["groups/rotation_action.jl"]
Order = [:type, :function]
```

### Translation action

```@autodocs
Modules = [Manifolds]
Pages = ["groups/translation_action.jl"]
Order = [:type, :function]
```

### Rotation-translation action (special Euclidean)

```@autodocs
Modules = [Manifolds]
Pages = ["groups/rotation_translation_action.jl"]
Order = [:type, :function]
```

## Metrics on groups

Lie groups by default typically forward all metric-related operations like exponential or logarithmic map to the underlying manifold, for example [`SpecialOrthogonal`](@ref) uses methods for [`Rotations`](@ref) (which is, incidentally, bi-invariant), or [`SpecialEuclidean`](@ref) uses product metric of the translation and rotation parts (which is not invariant under group operation).
Expand Down
1 change: 1 addition & 0 deletions src/Manifolds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ export AbstractGroupAction,
RightSide,
RotationAction,
RotationTranslationAction,
RotationTranslationActionOnVector,
SemidirectProductGroup,
SpecialEuclidean,
SpecialLinear,
Expand Down
2 changes: 1 addition & 1 deletion src/groups/group_operation_action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ An element `p` of the group can act upon another another element by either:
* left action from the left side: ``L_p: q ↦ p \circ q``,
* right action from the left side: ``L'_p: q ↦ p^{-1} \circ q``,
* right action from the right side: ``R_p: q ↦ q \circ p``,
* left action from the right side: ``R'_p &: q ↦ q \circ p^{-1}``.
* left action from the right side: ``R'_p: q ↦ q \circ p^{-1}``.
# Constructor
Expand Down
2 changes: 1 addition & 1 deletion src/groups/rotation_action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ of computation are described in Section 2.2.1 of [SrivastavaKlassen:2016](@cite)
The formula reads
```math
O^{*} = \begin{cases}
UV^T & \text{if } \operatorname{det}(p q^{\mathrm{T}})\\
UV^T & \text{if } \operatorname{det}(p q^{\mathrm{T}}) \geq 0\\
U K V^{\mathrm{T}} & \text{otherwise}
\end{cases}
```
Expand Down
7 changes: 7 additions & 0 deletions src/groups/rotation_translation_action.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ function Base.show(io::IO, A::RotationTranslationAction)
return print(io, "RotationTranslationAction($(A.manifold), $(A.SEn), $(direction(A)))")
end

"""
RotationTranslationActionOnVector{TAD,𝔽,TE,TSE}
Alias for [`RotationTranslationAction`](@ref) where the manifold `M` is [`Euclidean`](@ref)
or [`TranslationGroup`](@ref) with size of type `TE`, and [`SpecialEuclidean`](@ref)
group has size type `TSE`.
"""
const RotationTranslationActionOnVector{TAD,𝔽,TE,TSE} = RotationTranslationAction{
TAD,
<:Union{Euclidean{TE,𝔽},TranslationGroup{TE,𝔽}},
Expand Down

0 comments on commit 697df39

Please sign in to comment.