Group actions
Group actions represent actions of a given group on a specified manifold. The following operations are available:
action_side
: whether action acts from theLeftSide
orRightSide
(not to be confused with action direction).apply
: performs given action of an element of the group on an object of compatible type.apply_diff
: differential ofapply
with respect to the object it acts upon.direction
: tells whether a given action isLeftAction
,RightAction
.inverse_apply
: performs given action of the inverse of an element of the group on an object of compatible type. By default inverts the element and callsapply
but it may be have a faster implementation for some actions.inverse_apply_diff
: counterpart ofapply_diff
forinverse_apply
.optimal_alignment
: 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
: an operation that performs either (LeftAction
) on theLeftSide
or (RightAction
) on theRightSide
translation, or actions by inverses of elements (RightAction
on theLeftSide
andLeftAction
on theRightSide
). This is by default performed by callingcompose
with appropriate order of arguments. This function is separated fromcompose
mostly to easily represent its differential,translate_diff
.translate_diff
: differential oftranslate
with respect to the point being translated.adjoint_action
: adjoint action of a given element of a Lie group on an element of its Lie algebra.lie_bracket
: Lie bracket of two vectors from a Lie algebra corresponding to a given group.
The following group actions are available:
- Group operation action
GroupOperationAction
that describes action of a group on itself. RotationAction
, that is action ofSpecialOrthogonal
group on different manifolds.TranslationAction
, which is the action ofTranslationGroup
group on different manifolds.
Manifolds.AbstractGroupAction
โ TypeAbstractGroupAction{AD<:ActionDirection}
An abstract group action on a manifold. ActionDirection
AD
indicates whether it is a left or right action.
Manifolds.adjoint_apply_diff_group
โ Methodadjoint_apply_diff_group(A::AbstractGroupAction, a, X, p)
Pullback with respect to group element of group action A
.
\[(\mathrm{d}ฯ^{p,*}) : T_{ฯ_{a} p} \mathcal M โ T_{a} \mathcal G\]
Manifolds.apply!
โ Methodapply!(A::AbstractGroupAction, q, a, p)
Apply action a
to the point p
with the rule specified by A
. The result is saved in q
.
Manifolds.apply
โ Methodapply(A::AbstractGroupAction, a, p)
Apply action a
to the point p
using map $ฯ_a$, specified by A
. Unless otherwise specified, the right action is defined in terms of the left action:
\[\mathrm{R}_a = \mathrm{L}_{a^{-1}}\]
Manifolds.apply_diff
โ Methodapply_diff(A::AbstractGroupAction, a, p, X)
For point $p โ \mathcal M$ and tangent vector $X โ T_p \mathcal M$, compute the action on $X$ of the differential of the action of $a โ \mathcal{G}$, specified by rule A
. Written as $(\mathrm{d}ฯ_a)_p$, with the specified left or right convention, the differential transports vectors
\[(\mathrm{d}ฯ_a)_p : T_p \mathcal M โ T_{ฯ_a p} \mathcal M\]
Manifolds.apply_diff_group
โ Methodapply_diff_group(A::AbstractGroupAction, a, X, p)
Compute the value of differential of action AbstractGroupAction
A
on vector X
, where element a
is acting on p
, with respect to the group element.
Let $\mathcal G$ be the group acting on manifold $\mathcal M$ by the action A
. The action is of element $g โ \mathcal G$ on a point $p โ \mathcal M$. The differential transforms vector X
from the tangent space at a โ \mathcal G
, $X โ T_a \mathcal G$ into a tangent space of the manifold $\mathcal M$. When action on element p
is written as $\mathrm{d}ฯ^p$, with the specified left or right convention, the differential transforms vectors
\[(\mathrm{d}ฯ^p) : T_{a} \mathcal G โ T_{ฯ_a p} \mathcal M\]
See also
Manifolds.base_group
โ Methodbase_group(A::AbstractGroupAction)
The group that acts in AbstractGroupAction
A
.
Manifolds.center_of_orbit
โ Functioncenter_of_orbit(
A::AbstractGroupAction,
pts,
p,
mean_method::AbstractApproximationMethod = GradientDescentEstimation(),
)
Calculate an action element $a$ of action A
that is the mean element of the orbit of p
with respect to given set of points pts
. The mean
is calculated using the method mean_method
.
The orbit of $p$ with respect to the action of a group $\mathcal{G}$ is the set
\[O = \{ ฯ_a p : a โ \mathcal{G} \}.\]
This function is useful for computing means on quotients of manifolds by a Lie group action.
Manifolds.direction
โ Methoddirection(::AbstractGroupAction{AD}) -> AD
Get the direction of the action: either LeftAction
or RightAction
.
Manifolds.group_manifold
โ Methodgroup_manifold(A::AbstractGroupAction)
The manifold the action A
acts upon.
Manifolds.inverse_apply!
โ Methodinverse_apply!(A::AbstractGroupAction, q, a, p)
Apply inverse of action a
to the point p
with the rule specified by A
. The result is saved in q
.
Manifolds.inverse_apply
โ Methodinverse_apply(A::AbstractGroupAction, a, p)
Apply inverse of action a
to the point p
. The action is specified by A
.
Manifolds.inverse_apply_diff
โ Methodinverse_apply_diff(A::AbstractGroupAction, a, p, X)
For group point $p โ \mathcal M$ and tangent vector $X โ T_p \mathcal M$, compute the action on $X$ of the differential of the inverse action of $a โ \mathcal{G}$, specified by rule A
. Written as $(\mathrm{d}ฯ_a^{-1})_p$, with the specified left or right convention, the differential transports vectors.
\[(\mathrm{d}ฯ_a^{-1})_p : T_p \mathcal M โ T_{ฯ_a^{-1} p} \mathcal M\]
Manifolds.optimal_alignment!
โ Methodoptimal_alignment!(A::AbstractGroupAction, x, p, q)
Calculate an action element of action A
that acts upon p
to produce the element closest to q
. The result is written to x
.
Manifolds.optimal_alignment
โ Methodoptimal_alignment(A::AbstractGroupAction, p, q)
Calculate an action element $a$ of action A
that acts upon p
to produce the element closest to q
in the metric of the G-manifold:
\[\arg\min_{a โ \mathcal{G}} d_{\mathcal M}(ฯ_a p, q)\]
where $\mathcal{G}$ is the group that acts on the G-manifold $\mathcal M$.
Group operation action
Manifolds.GroupOperationAction
โ TypeGroupOperationAction{AD<:ActionDirection,AS<:GroupActionSide,G<:AbstractDecoratorManifold} <: AbstractGroupAction{AD}
Action of a group upon itself via left or right translation, either from left or right side. 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}$.
Constructor
GroupOperationAction(group::AbstractDecoratorManifold, AD::ActionDirectionAndSide = LeftForwardAction())
Manifolds.action_side
โ Methodaction_side(A::GroupOperationAction)
Return whether GroupOperationAction
A
acts on the LeftSide
or RightSide
.
Manifolds.apply_diff_group
โ Methodapply_diff_group(A::GroupOperationAction, a, X, p)
Compute differential of GroupOperationAction
A
with respect to group element at tangent vector X
:
\[(\mathrm{d}ฯ^p) : T_{a} \mathcal G โ T_{ฯ_a p} \mathcal G\]
There are four cases:
- left action from the left side: $L_a: p โฆ a \circ p$, where
\[(\mathrm{d}L_a) : T_{a} \mathcal G โ T_{a \circ p} \mathcal G.\]
- right action from the left side: $L'_a: p โฆ a^{-1} \circ p$, where
\[(\mathrm{d}L'_a) : T_{a} \mathcal G โ T_{a^{-1} \circ p} \mathcal G.\]
- right action from the right side: $R_a: p โฆ p \circ a$, where
\[(\mathrm{d}R_a) : T_{a} \mathcal G โ T_{p \circ a} \mathcal G.\]
- left action from the right side: $R'_a: p โฆ p \circ a^{-1}$, where
\[(\mathrm{d}R'_a) : T_{a} \mathcal G โ T_{p \circ a^{-1}} \mathcal G.\]
Rotation action
Manifolds.ColumnwiseMultiplicationAction
โ TypeColumnwiseMultiplicationAction{
TAD<:ActionDirection,
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
} <: AbstractGroupAction{TAD}
Action of the (special) unitary or orthogonal group GeneralUnitaryMultiplicationGroup
of type On
columns of points on a matrix manifold M
.
Constructor
ColumnwiseMultiplicationAction(
M::AbstractManifold,
On::GeneralUnitaryMultiplicationGroup,
AD::ActionDirection = LeftAction(),
)
Manifolds.RotationAction
โ TypeRotationAction(
M::AbstractManifold,
SOn::SpecialOrthogonal,
AD::ActionDirection = LeftAction(),
)
Space of actions of the SpecialOrthogonal
group $\mathrm{SO}(n)$ on a Euclidean-like manifold M
of dimension n
.
Manifolds.RotationAroundAxisAction
โ TypeRotationAroundAxisAction(axis::AbstractVector)
Space of actions of the circle group RealCircleGroup
on $โ^3$ around given axis
.
Manifolds.RowwiseMultiplicationAction
โ TypeRowwiseMultiplicationAction{
TAD<:ActionDirection,
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
} <: AbstractGroupAction{TAD}
Action of the (special) unitary or orthogonal group GeneralUnitaryMultiplicationGroup
of type On
columns of points on a matrix manifold M
.
Constructor
RowwiseMultiplicationAction(
M::AbstractManifold,
On::GeneralUnitaryMultiplicationGroup,
AD::ActionDirection = LeftAction(),
)
Manifolds.apply
โ Methodapply(A::RotationAroundAxisAction, ฮธ, p)
Rotate point p
from Euclidean(3)
manifold around axis A.axis
by angle ฮธ
. The formula reads
\[p_{rot} = (\cos(ฮธ))p + (kรp) \sin(ฮธ) + k (kโ p) (1-\cos(ฮธ)),\]
where $k$ is the vector A.axis
and โ
is the dot product.
Manifolds.optimal_alignment
โ Methodoptimal_alignment(A::LeftColumnwiseMultiplicationAction, p, q)
Compute optimal alignment for the left ColumnwiseMultiplicationAction
, i.e. the group element $O^{*}$ that, when it acts on p
, returns the point closest to q
. Details of computation are described in Section 2.2.1 of [SK16].
The formula reads
\[O^{*} = \begin{cases} UV^T & \text{if } \operatorname{det}(p q^{\mathrm{T}}) \geq 0\\ U K V^{\mathrm{T}} & \text{otherwise} \end{cases}\]
where $U \Sigma V^{\mathrm{T}}$ is the SVD decomposition of $p q^{\mathrm{T}}$ and $K$ is the unit diagonal matrix with the last element on the diagonal replaced with -1.
Translation action
Manifolds.TranslationAction
โ TypeTranslationAction(
M::AbstractManifold,
Rn::TranslationGroup,
AD::ActionDirection = LeftAction(),
)
Space of actions of the TranslationGroup
$\mathrm{T}(n)$ on a Euclidean-like manifold M
.
The left and right actions are equivalent.
Rotation-translation action (special Euclidean)
Manifolds.ColumnwiseSpecialEuclideanAction
โ TypeColumnwiseSpecialEuclideanAction{
TM<:AbstractManifold,
TSE<:SpecialEuclidean,
TAD<:ActionDirection,
} <: AbstractGroupAction{TAD}
Action of the special Euclidean group SpecialEuclidean
of type SE
columns of points on a matrix manifold M
.
Constructor
ColumnwiseSpecialEuclideanAction(
M::AbstractManifold,
SE::SpecialEuclidean,
AD::ActionDirection = LeftAction(),
)
Manifolds.RotationTranslationAction
โ TypeRotationTranslationAction(
M::AbstractManifold,
SOn::SpecialEuclidean,
AD::ActionDirection = LeftAction(),
)
Space of actions of the SpecialEuclidean
group $\mathrm{SE}(n)$ on a Euclidean-like manifold M
of dimension n
.
Left actions corresponds to active transformations while right actions can be identified with passive transformations for a particular choice of a basis.
Manifolds.RotationTranslationActionOnVector
โ TypeRotationTranslationActionOnVector{TAD,๐ฝ,TE,TSE}
Alias for RotationTranslationAction
where the manifold M
is Euclidean
or TranslationGroup
with size of type TE
, and SpecialEuclidean
group has size type TSE
.
Manifolds.apply
โ Methodapply(::RotationTranslationActionOnVector{LeftAction}, a::ArrayPartition, p)
Rotate point p
by a.x[2]
and translate it by a.x[1]
.
Manifolds.apply
โ Methodapply(::RotationTranslationActionOnVector{RightAction}, a::ArrayPartition, p)
Translate point p
by -a.x[1]
and rotate it by inverse of a.x[2]
.
Manifolds.apply_diff
โ Methodapply_diff(
::RotationTranslationActionOnVector{LeftAction},
a::ArrayPartition,
p,
X,
)
Compute differential of apply
on left RotationTranslationActionOnVector
, with respect to p
, i.e. left-multiply vector X
tangent at p
by a.x[2]
.
Manifolds.apply_diff
โ Methodapply_diff(
::RotationTranslationActionOnVector{RightAction},
a::ArrayPartition,
p,
X,
)
Compute differential of apply
on right RotationTranslationActionOnVector
, with respect to p
, i.e. left-divide vector X
tangent at p
by a.x[2]
.
Manifolds.apply_diff_group
โ Methodapply_diff_group(
::RotationTranslationActionOnVector{LeftAction},
::SpecialEuclideanIdentity,
X,
p,
)
Compute differential of apply
on left RotationTranslationActionOnVector
, with respect to a
at identity, i.e. left-multiply point p
by X.x[2]
.
Manifolds.inverse_apply
โ Methodinverse_apply(::RotationTranslationActionOnVector{LeftAction}, a::ArrayPartition, p)
Translate point p
by -a.x[1]
and rotate it by inverse of a.x[2]
.
Manifolds.inverse_apply
โ Methodinverse_apply(::RotationTranslationActionOnVector{RightAction}, a::ArrayPartition, p)
Rotate point p
by a.x[2]
and translate it by a.x[1]
.
Manifolds.optimal_alignment
โ Methodoptimal_alignment(A::LeftColumnwiseSpecialEuclideanAction, p, q)
Compute optimal alignment of p
to q
under the forward left ColumnwiseSpecialEuclideanAction
. The algorithm, in sequence, computes optimal translation and optimal rotation.