Group manifolds and actions
Lie groups, groups that are AbstractManifolds with a smooth binary group operation AbstractGroupOperation, are implemented as subtypes of AbstractGroupManifold or by decorating an existing manifold with a group operation using GroupManifold.
The common addition and multiplication group operations of AdditionOperation and MultiplicationOperation are provided, though their behavior may be customized for a specific group.
There are short introductions at the beginning of each subsection. They briefly mention what is available with links to more detailed descriptions.
Contents
Groups
The following operations are available for group manifolds:
identity: get the identity of the group.inv: get the inverse of a given element.compose: compose two given elements of a group.
Group manifold
GroupManifold adds a group structure to the wrapped manifold. It does not affect metric (or connection) structure of the wrapped manifold, however it can to be further wrapped in MetricManifold to get invariant metrics, or in a ConnectionManifold to equip it with a Cartan-Schouten connection.
Manifolds.AbstractGroupDecoratorType β Typeabstract type AbstractGroupDecroatorType <: AbstractDecoratorTypeA common decorator type for all group decorators. It is similar to DefaultEmbeddingType but for groups.
Manifolds.AbstractGroupManifold β TypeAbstractGroupManifold{π½,O<:AbstractGroupOperation} <: AbstractDecoratorManifold{π½}Abstract type for a Lie group, a group that is also a smooth manifold with an AbstractGroupOperation, a smooth binary operation. AbstractGroupManifolds must implement at least inv, identity, compose, and translate_diff.
Manifolds.AbstractGroupOperation β TypeAbstractGroupOperationAbstract type for smooth binary operations $β$ on elements of a Lie group $\mathcal{G}$:
\[β : \mathcal{G} Γ \mathcal{G} β \mathcal{G}\]
An operation can be either defined for a specific AbstractGroupManifold over number system π½ or in general, by defining for an operation Op the following methods:
identity!(::AbstractGroupManifold{π½,Op}, q, q)
identity(::AbstractGroupManifold{π½,Op}, p)
inv!(::AbstractGroupManifold{π½,Op}, q, p)
inv(::AbstractGroupManifold{π½,Op}, p)
compose(::AbstractGroupManifold{π½,Op}, p, q)
compose!(::AbstractGroupManifold{π½,Op}, x, p, q)Note that a manifold is connected with an operation by wrapping it with a decorator, AbstractGroupManifold. In typical cases the concrete wrapper GroupManifold can be used.
Manifolds.ActionDirection β TypeActionDirectionDirection of action on a manifold, either LeftAction or RightAction.
Manifolds.AdditionOperation β TypeAdditionOperation <: AbstractGroupOperationGroup operation that consists of simple addition.
Manifolds.DefaultGroupDecoratorType β Typestruct DefaultGroupDecoratorType <: AbstractDecoratorTypeThe default group decorator type with no special properties.
Manifolds.GroupExponentialRetraction β TypeGroupExponentialRetraction{D<:ActionDirection} <: AbstractRetractionMethodRetraction using the group exponential group_exp "translated" to any point on the manifold.
For more details, see retract.
Constructor
GroupExponentialRetraction(conv::ActionDirection = LeftAction())Manifolds.GroupLogarithmicInverseRetraction β TypeGroupLogarithmicInverseRetraction{D<:ActionDirection} <: AbstractInverseRetractionMethodRetraction using the group logarithm group_log "translated" to any point on the manifold.
For more details, see inverse_retract.
Constructor
GroupLogarithmicInverseRetraction(conv::ActionDirection = LeftAction())Manifolds.GroupManifold β TypeGroupManifold{π½,M<:AbstractManifold{π½},O<:AbstractGroupOperation} <: AbstractGroupManifold{π½,O}Decorator for a smooth manifold that equips the manifold with a group operation, thus making it a Lie group. See AbstractGroupManifold for more details.
Group manifolds by default forward metric-related operations to the wrapped manifold.
Constructor
GroupManifold(manifold, op)Manifolds.Identity β TypeIdentity(G::AbstractGroupManifold, p)The group identity element $e β \mathcal{G}$ represented by point p.
Manifolds.LeftAction β TypeLeftAction()Left action of a group on a manifold.
Manifolds.MultiplicationOperation β TypeMultiplicationOperation <: AbstractGroupOperationGroup operation that consists of multiplication.
Manifolds.RightAction β TypeRightAction()Right action of a group on a manifold.
Manifolds.TransparentGroupDecoratorType β Typestruct TransparentGroupDecoratorType <: AbstractDecoratorTypeA transparent group decorator type that acts transparently, similar to the TransparentIsometricEmbedding, i.e. it passes through all metric-related functions such as logarithmic and exponential map as well as retraction and inverse retractions to the manifold it decorates.
Base.identity β Methodidentity(G::AbstractGroupManifold, p)Identity element $e β \mathcal{G}$, such that for any element $p β \mathcal{G}$, $p \circ e = e \circ p = p$. The returned element is of a similar type to p.
Base.inv β Methodinv(G::AbstractGroupManifold, p)Inverse $p^{-1} β \mathcal{G}$ of an element $p β \mathcal{G}$, such that $p \circ p^{-1} = p^{-1} \circ p = e β \mathcal{G}$, where $e$ is the identity element of $\mathcal{G}$.
Manifolds.adjoint_action β Methodadjoint_action(G::AbstractGroupManifold, p, X)Adjoint action of the element p of the Lie group G on the element X of the corresponding Lie algebra.
It is defined as the differential of the group authomorphism $Ξ¨_p(q) = pqpβ»ΒΉ$ at the identity of G.
The formula reads
\[\operatorname{Ad}_p(X) = dΨ_p(e)[X]\]
where $e$ is the identity element of G.
Note that the adjoint representation of a Lie group isn't generally faithful. Notably the adjoint representation of SO(2) is trivial.
Manifolds.base_group β Methodbase_group(M::AbstractManifold) -> AbstractGroupManifoldUn-decorate M until an AbstractGroupManifold is encountered. Return an error if the base_manifold is reached without encountering a group.
Manifolds.compose β Methodcompose(G::AbstractGroupManifold, p, q)Compose elements $p,q β \mathcal{G}$ using the group operation $p \circ q$.
Manifolds.group_exp β Methodgroup_exp(G::AbstractGroupManifold, X)Compute the group exponential of the Lie algebra element X. It is equivalent to the exponential map defined by the CartanSchoutenMinus connection.
Given an element $X β π€ = T_e \mathcal{G}$, where $e$ is the identity element of the group $\mathcal{G}$, and $π€$ is its Lie algebra, the group exponential is the map
\[\exp : π€ β \mathcal{G},\]
such that for $t,s β β$, $Ξ³(t) = \exp (t X)$ defines a one-parameter subgroup with the following properties:
\[\begin{aligned} Ξ³(t) &= Ξ³(-t)^{-1}\\ Ξ³(t + s) &= Ξ³(t) \circ Ξ³(s) = Ξ³(s) \circ Ξ³(t)\\ Ξ³(0) &= e\\ \lim_{t β 0} \frac{d}{dt} Ξ³(t) &= X. \end{aligned}\]
In general, the group exponential map is distinct from the Riemannian exponential map exp.
group_exp(G::AbstractGroupManifold{π½,AdditionOperation}, X) where {π½}Compute $q = X$.
group_exp(G::AbstractGroupManifold{π½,MultiplicationOperation}, X) where {π½}For Number and AbstractMatrix types of X, compute the usual numeric/matrix exponential,
\[\exp X = \operatorname{Exp} X = \sum_{n=0}^β \frac{1}{n!} X^n.\]
Manifolds.group_log β Methodgroup_log(G::AbstractGroupManifold, q)Compute the group logarithm of the group element q. It is equivalent to the logarithmic map defined by the CartanSchoutenMinus connection.
Given an element $q β \mathcal{G}$, compute the right inverse of the group exponential map group_exp, that is, the element $\log q = X β π€ = T_e \mathcal{G}$, such that $q = \exp X$
In general, the group logarithm map is distinct from the Riemannian logarithm map log.
group_log(G::AbstractGroupManifold{π½,AdditionOperation}, q) where {π½}Compute $X = q$.
group_log(G::AbstractGroupManifold{π½,MultiplicationOperation}, q) where {π½}For Number and AbstractMatrix types of q, compute the usual numeric/matrix logarithm:
\[\log q = \operatorname{Log} q = \sum_{n=1}^β \frac{(-1)^{n+1}}{n} (q - e)^n,\]
where $e$ here is the identity element, that is, $1$ for numeric $q$ or the identity matrix $I_m$ for matrix $q β β^{m Γ m}$.
Manifolds.inverse_translate β Methodinverse_translate(G::AbstractGroupManifold, p, q)
inverse_translate(G::AbstractGroupManifold, p, q, conv::ActionDirection=LeftAction())Inverse translate group element $q$ by $p$ with the inverse translation $Ο_p^{-1}$ with the specified convention, either left ($L_p^{-1}$) or right ($R_p^{-1}$), defined as
\[\begin{aligned} L_p^{-1} &: q β¦ p^{-1} \circ q\\ R_p^{-1} &: q β¦ q \circ p^{-1}. \end{aligned}\]
Manifolds.inverse_translate_diff β Methodinverse_translate_diff(G::AbstractGroupManifold, p, q, X)
inverse_translate_diff(G::AbstractGroupManifold, p, q, X, conv::ActionDirection=LeftAction())For group elements $p, q β \mathcal{G}$ and tangent vector $X β T_q \mathcal{G}$, compute the action on $X$ of the differential of the inverse translation $Ο_p$ by $p$, with the specified left or right convention. The differential transports vectors:
\[(\mathrm{d}Ο_p^{-1})_q : T_q \mathcal{G} β T_{Ο_p^{-1} q} \mathcal{G}\\\]
Manifolds.lie_bracket β Methodlie_bracket(G::AbstractGroupManifold, X, Y)Lie bracket between elements X and Y of the Lie algebra corresponding to the Lie group G.
This can be used to compute the adjoint representation of a Lie algebra. Note that this representation isn't generally faithful. Notably the adjoint representation of π°π¬(2) is trivial.
Manifolds.switch_direction β Methodswitch_direction(::ActionDirection)Returns a RightAction when given a LeftAction and vice versa.
Manifolds.translate β Methodtranslate(G::AbstractGroupManifold, p, q)
translate(G::AbstractGroupManifold, p, q, conv::ActionDirection=LeftAction()])Translate group element $q$ by $p$ with the translation $Ο_p$ with the specified convention, either left ($L_p$) or right ($R_p$), defined as
\[\begin{aligned} L_p &: q β¦ p \circ q\\ R_p &: q β¦ q \circ p. \end{aligned}\]
Manifolds.translate_diff β Methodtranslate_diff(G::AbstractGroupManifold, p, q, X)
translate_diff(G::AbstractGroupManifold, p, q, X, conv::ActionDirection=LeftAction())For group elements $p, q β \mathcal{G}$ and tangent vector $X β T_q \mathcal{G}$, compute the action of the differential of the translation $Ο_p$ by $p$ on $X$, with the specified left or right convention. The differential transports vectors:
\[(\mathrm{d}Ο_p)_q : T_q \mathcal{G} β T_{Ο_p q} \mathcal{G}\\\]
ManifoldsBase.base_manifold β Methodbase_manifold(M::AbstractGroupManifold, d::Val{N} = Val(-1))Return the base manifold of M that is enhanced with its group. While functions like inner might be overwritten to use the (decorated) manifold representing the group, the base_manifold is the manifold itself. Hence for this abstract case, just M is returned.
ManifoldsBase.base_manifold β Methodbase_manifold(M::GroupManifold, d::Val{N} = Val(-1))Return the base manifold of M that is enhanced with its group. Here, the internally stored enhanced manifold M.manifold is returned.
ManifoldsBase.inverse_retract β Methodinverse_retract(
G::AbstractGroupManifold,
p,
X,
method::GroupLogarithmicInverseRetraction{<:ActionDirection},
)Compute the inverse retraction using the group logarithm group_log "translated" to any point on the manifold. With a group translation (translate) $Ο_p$ in a specified direction, the retraction is
\[\operatorname{retr}_p^{-1} = (\mathrm{d}Ο_p)_e \circ \log \circ Ο_p^{-1},\]
where $\log$ is the group logarithm (group_log), and $(\mathrm{d}Ο_p)_e$ is the action of the differential of translation $Ο_p$ evaluated at the identity element $e$ (see translate_diff).
ManifoldsBase.retract β Methodretract(
G::AbstractGroupManifold,
p,
X,
method::GroupExponentialRetraction{<:ActionDirection},
)Compute the retraction using the group exponential group_exp "translated" to any point on the manifold. With a group translation (translate) $Ο_p$ in a specified direction, the retraction is
\[\operatorname{retr}_p = Ο_p \circ \exp \circ (\mathrm{d}Ο_p^{-1})_p,\]
where $\exp$ is the group exponential (group_exp), and $(\mathrm{d}Ο_p^{-1})_p$ is the action of the differential of inverse translation $Ο_p^{-1}$ evaluated at $p$ (see inverse_translate_diff).
Product group
Manifolds.ProductGroup β MethodProductGroup{π½,T} <: GroupManifold{π½,ProductManifold{T},ProductOperation}Decorate a product manifold with a ProductOperation.
Each submanifold must also be an AbstractGroupManifold or a decorated instance of one. This type is mostly useful for equipping the direct product of group manifolds with an Identity element.
Constructor
ProductGroup(manifold::ProductManifold)Manifolds.ProductOperation β TypeProductOperation <: AbstractGroupOperationDirect product group operation.
Semidirect product group
Manifolds.SemidirectProductGroup β MethodSemidirectProductGroup(N::GroupManifold, H::GroupManifold, A::AbstractGroupAction)A group that is the semidirect product of a normal group $\mathcal{N}$ and a subgroup $\mathcal{H}$, written $\mathcal{G} = \mathcal{N} β_ΞΈ \mathcal{H}$, where $ΞΈ: \mathcal{H} Γ \mathcal{N} β \mathcal{N}$ is an automorphism action of $\mathcal{H}$ on $\mathcal{N}$. The group $\mathcal{G}$ has the composition rule
\[g \circ g' = (n, h) \circ (n', h') = (n \circ ΞΈ_h(n'), h \circ h')\]
and the inverse
\[g^{-1} = (n, h)^{-1} = (ΞΈ_{h^{-1}}(n^{-1}), h^{-1}).\]
Manifolds.SemidirectProductOperation β TypeSemidirectProductOperation(action::AbstractGroupAction)Group operation of a semidirect product group. The operation consists of the operation opN on a normal subgroup N, the operation opH on a subgroup H, and an automorphism action of elements of H on N. Only the action is stored.
Manifolds.translate_diff β Methodtranslate_diff(G::SemidirectProductGroup, p, q, X, conX::LeftAction)Perform differential of the left translation on the semidirect product group G.
Since the left translation is defined as (cf. SemidirectProductGroup):
\[L_{(n', h')} (n, h) = ( L_{n'} ΞΈ_{h'}(n), L_{h'} h)\]
then its differential can be computed as
\[\mathrm{d}L_{(n', h')}(X_n, X_h) = ( \mathrm{d}L_{n'} (\mathrm{d}ΞΈ_{h'}(X_n)), \mathrm{d}L_{h'} X_h).\]
Circle group
Manifolds.CircleGroup β TypeCircleGroup <: GroupManifold{Circle{β},MultiplicationOperation}The circle group is the complex circle (Circle(β)) equipped with the group operation of complex multiplication (MultiplicationOperation).
General linear group
Manifolds.GeneralLinear β TypeGeneralLinear{n,π½} <:
AbstractGroupManifold{π½,MultiplicationOperation,DefaultEmbeddingType}The general linear group, that is, the group of all invertible matrices in $π½^{nΓn}$.
The default metric is the left-$\mathrm{GL}(n)$-right-$\mathrm{O}(n)$-invariant metric whose inner product is
\[β¨X_p,Y_pβ©_p = β¨p^{-1}X_p,p^{-1}Y_pβ©_\mathrm{F} = β¨X_e, Y_eβ©_\mathrm{F},\]
where $X_p, Y_p β T_p \mathrm{GL}(n, π½)$, $X_e = p^{-1}X_p β π€π©(n) = T_e \mathrm{GL}(n, π½) = π½^{nΓn}$ is the corresponding vector in the Lie algebra, and $β¨β ,β β©_\mathrm{F}$ denotes the Frobenius inner product.
By default, tangent vectors $X_p$ are represented with their corresponding Lie algebra vectors $X_e = p^{-1}X_p$.
Base.exp β Methodexp(G::GeneralLinear, p, X)Compute the exponential map on the GeneralLinear group.
The exponential map is
\[\exp_p \colon X β¦ p \operatorname{Exp}(X^\mathrm{H}) \operatorname{Exp}(X - X^\mathrm{H}),\]
where $\operatorname{Exp}(β )$ denotes the matrix exponential, and $β ^\mathrm{H}$ is the conjugate transpose. [AndruchowLarotondaRechtVarela2014][MartinNeff2016]
Base.log β Methodlog(G::GeneralLinear, p, q)Compute the logarithmic map on the GeneralLinear(n) group.
The algorithm proceeds in two stages. First, the point $r = p^{-1} q$ is projected to the nearest element (under the Frobenius norm) of the direct product subgroup $\mathrm{O}(n) Γ S^+$, whose logarithmic map is exactly computed using the matrix logarithm. This initial tangent vector is then refined using the NLsolveInverseRetraction.
For GeneralLinear(n, β), the logarithmic map is instead computed on the realified supergroup GeneralLinear(2n) and the resulting tangent vector is then complexified.
Note that this implementation is experimental.
Special linear group
Manifolds.SpecialLinear β TypeSpecialLinear{n,π½} <:
AbstractGroupManifold{π½,MultiplicationOperation,DefaultEmbeddingType}The special linear group $\mathrm{SL}(n,π½)$ that is, the group of all invertible matrices with unit determinant in $π½^{nΓn}$.
The Lie algebra $π°π©(n, π½) = T_e \mathrm{SL}(n,π½)$ is the set of all matrices in $π½^{nΓn}$ with trace of zero. By default, tangent vectors $X_p β T_p \mathrm{SL}(n,π½)$ for $p β \mathrm{SL}(n,π½)$ are represented with their corresponding Lie algebra vector $X_e = p^{-1}X_p β π°π©(n, π½)$.
The default metric is the same left-$\mathrm{GL}(n)$-right-$\mathrm{O}(n)$-invariant metric used for GeneralLinear(n, π½). The resulting geodesic on $\mathrm{GL}(n,π½)$ emanating from an element of $\mathrm{SL}(n,π½)$ in the direction of an element of $π°π©(n, π½)$ is a closed subgroup of $\mathrm{SL}(n,π½)$. As a result, most metric functions forward to GeneralLinear.
ManifoldsBase.project β Methodproject(G::SpecialLinear, p, X)Orthogonally project $X β π½^{n Γ n}$ onto the tangent space of $p$ to the SpecialLinear $G = \mathrm{SL}(n, π½)$. The formula reads
\[\operatorname{proj}_{p} = (\mathrm{d}L_p)_e β \operatorname{proj}_{π°π©(n, π½)} β (\mathrm{d}L_p^{-1})_p \colon X β¦ X - \frac{\operatorname{tr}(X)}{n} I,\]
where the last expression uses the tangent space representation as the Lie algebra.
ManifoldsBase.project β Methodproject(G::SpecialLinear, p)Project $p β \mathrm{GL}(n, π½)$ to the SpecialLinear group $G=\mathrm{SL}(n, π½)$.
Given the singular value decomposition of $p$, written $p = U S V^\mathrm{H}$, the formula for the projection is
\[\operatorname{proj}_{\mathrm{SL}(n, π½)}(p) = U S D V^\mathrm{H},\]
where
\[D_{ij} = Ξ΄_{ij} \begin{cases} 1 & \text{ if } i β n \\ \det(p)^{-1} & \text{ if } i = n \end{cases}.\]
Special orthogonal group
Manifolds.SpecialOrthogonal β TypeSpecialOrthogonal{n} <: GroupManifold{β,Rotations{n},MultiplicationOperation}Special orthogonal group $\mathrm{SO}(n)$ represented by rotation matrices.
Constructor
SpecialOrthogonal(n)Translation group
Manifolds.TranslationGroup β TypeTranslationGroup{T<:Tuple,π½} <: GroupManifold{Euclidean{T,π½},AdditionOperation}Translation group $\mathrm{T}(n)$ represented by translation arrays.
Constructor
TranslationGroup(nβ,...,nα΅’; field = π½)Generate the translation group on $π½^{nβ,β¦,nα΅’}$ = Euclidean(nβ,...,nα΅’; field = π½), which is isomorphic to the group itself.
Special Euclidean group
Manifolds.SpecialEuclidean β TypeSpecialEuclidean(n)Special Euclidean group $\mathrm{SE}(n)$, the group of rigid motions.
$\mathrm{SE}(n)$ is the semidirect product of the TranslationGroup on $β^n$ and SpecialOrthogonal(n)
\[\mathrm{SE}(n) β \mathrm{T}(n) β_ΞΈ \mathrm{SO}(n),\]
where $ΞΈ$ is the canonical action of $\mathrm{SO}(n)$ on $\mathrm{T}(n)$ by vector rotation.
This constructor is equivalent to calling
Tn = TranslationGroup(n)
SOn = SpecialOrthogonal(n)
SemidirectProductGroup(Tn, SOn, RotationAction(Tn, SOn))Points on $\mathrm{SE}(n)$ may be represented as points on the underlying product manifold $\mathrm{T}(n) Γ \mathrm{SO}(n)$. For group-specific functions, they may also be represented as affine matrices with size (n + 1, n + 1) (see affine_matrix), for which the group operation is MultiplicationOperation.
Manifolds.SpecialEuclideanInGeneralLinear β TypeSpecialEuclideanInGeneralLinearAn explicit isometric and homomorphic embedding of $\mathrm{SE}(n)$ in $\mathrm{GL}(n+1)$ and $π°π’(n)$ in $π€π©(n+1)$. Note that this is not a transparently isometric embedding.
Constructor
SpecialEuclideanInGeneralLinear(n)Manifolds.adjoint_action β Methodadjoint_action(::SpecialEuclidean{3}, p, fX::TFVector{<:Any,VeeOrthogonalBasis{β}})Adjoint action of the SpecialEuclidean group on the vector with coefficients fX tangent at point p.
The formula for the coefficients reads $tΓ(Rβ
Ο) + Rβ
r$ for the translation part and $Rβ
Ο$ for the rotation part, where t is the translation part of p, R is the rotation matrix part of p, r is the translation part of fX and Ο is the rotation part of fX, $Γ$ is the cross product and $β
$ is the matrix product.
Manifolds.affine_matrix β Methodaffine_matrix(G::SpecialEuclidean, p) -> AbstractMatrixRepresent the point $p β \mathrm{SE}(n)$ as an affine matrix. For $p = (t, R) β \mathrm{SE}(n)$, where $t β \mathrm{T}(n), R β \mathrm{SO}(n)$, the affine representation is the $n + 1 Γ n + 1$ matrix
\[\begin{pmatrix} R & t \\ 0^\mathrm{T} & 1 \end{pmatrix}.\]
This function embeds $\mathrm{SE}(n)$ in the general linear group $\mathrm{GL}(n+1)$. It is an isometric embedding and group homomorphism [RicoMartinez1988].
See also screw_matrix for matrix representations of the Lie algebra.
Manifolds.group_exp β Methodgroup_exp(G::SpecialEuclidean{2}, X)Compute the group exponential of $X = (b, Ξ©) β π°π’(2)$, where $b β π±(2)$ and $Ξ© β π°π¬(2)$:
\[\exp X = (t, R) = (U(ΞΈ) b, \exp Ξ©),\]
where $t β \mathrm{T}(2)$, $R = \exp Ξ©$ is the group exponential on $\mathrm{SO}(2)$,
\[U(ΞΈ) = \frac{\sin ΞΈ}{ΞΈ} I_2 + \frac{1 - \cos ΞΈ}{ΞΈ^2} Ξ©,\]
and $ΞΈ = \frac{1}{\sqrt{2}} \lVert Ξ© \rVert_e$ (see norm) is the angle of the rotation.
Manifolds.group_exp β Methodgroup_exp(G::SpecialEuclidean{3}, X)Compute the group exponential of $X = (b, Ξ©) β π°π’(3)$, where $b β π±(3)$ and $Ξ© β π°π¬(3)$:
\[\exp X = (t, R) = (U(ΞΈ) b, \exp Ξ©),\]
where $t β \mathrm{T}(3)$, $R = \exp Ξ©$ is the group exponential on $\mathrm{SO}(3)$,
\[U(ΞΈ) = I_3 + \frac{1 - \cos ΞΈ}{ΞΈ^2} Ξ© + \frac{ΞΈ - \sin ΞΈ}{ΞΈ^3} Ξ©^2,\]
and $ΞΈ = \frac{1}{\sqrt{2}} \lVert Ξ© \rVert_e$ (see norm) is the angle of the rotation.
Manifolds.group_exp β Methodgroup_exp(G::SpecialEuclidean{n}, X)Compute the group exponential of $X = (b, Ξ©) β π°π’(n)$, where $b β π±(n)$ and $Ξ© β π°π¬(n)$:
\[\exp X = (t, R),\]
where $t β \mathrm{T}(n)$ and $R = \exp Ξ©$ is the group exponential on $\mathrm{SO}(n)$.
In the screw_matrix representation, the group exponential is the matrix exponential (see group_exp).
Manifolds.group_log β Methodgroup_log(G::SpecialEuclidean{2}, p)Compute the group logarithm of $p = (t, R) β \mathrm{SE}(2)$, where $t β \mathrm{T}(2)$ and $R β \mathrm{SO}(2)$:
\[\log p = (b, Ξ©) = (U(ΞΈ)^{-1} t, \log R),\]
where $b β π±(2)$, $Ξ© = \log R β π°π¬(2)$ is the group logarithm on $\mathrm{SO}(2)$,
\[U(ΞΈ) = \frac{\sin ΞΈ}{ΞΈ} I_2 + \frac{1 - \cos ΞΈ}{ΞΈ^2} Ξ©,\]
and $ΞΈ = \frac{1}{\sqrt{2}} \lVert Ξ© \rVert_e$ (see norm) is the angle of the rotation.
Manifolds.group_log β Methodgroup_log(G::SpecialEuclidean{3}, p)Compute the group logarithm of $p = (t, R) β \mathrm{SE}(3)$, where $t β \mathrm{T}(3)$ and $R β \mathrm{SO}(3)$:
\[\log p = (b, Ξ©) = (U(ΞΈ)^{-1} t, \log R),\]
where $b β π±(3)$, $Ξ© = \log R β π°π¬(3)$ is the group logarithm on $\mathrm{SO}(3)$,
\[U(ΞΈ) = I_3 + \frac{1 - \cos ΞΈ}{ΞΈ^2} Ξ© + \frac{ΞΈ - \sin ΞΈ}{ΞΈ^3} Ξ©^2,\]
and $ΞΈ = \frac{1}{\sqrt{2}} \lVert Ξ© \rVert_e$ (see norm) is the angle of the rotation.
Manifolds.group_log β Methodgroup_log(G::SpecialEuclidean{n}, p) where {n}Compute the group logarithm of $p = (t, R) β \mathrm{SE}(n)$, where $t β \mathrm{T}(n)$ and $R β \mathrm{SO}(n)$:
\[\log p = (b, Ξ©),\]
where $b β π±(n)$ and $Ξ© = \log R β π°π¬(n)$ is the group logarithm on $\mathrm{SO}(n)$.
In the affine_matrix representation, the group logarithm is the matrix logarithm (see group_log):
Manifolds.lie_bracket β Methodlie_bracket(G::SpecialEuclidean, X::ProductRepr, Y::ProductRepr)
lie_bracket(G::SpecialEuclidean, X::AbstractMatrix, Y::AbstractMatrix)Calculate the Lie bracket between elements X and Y of the special Euclidean Lie algebra. For the matrix representation (which can be obtained using screw_matrix) the formula is $[X, Y] = XY-YX$, while in the ProductRepr representation the formula reads $[X, Y] = [(t_1, R_1), (t_2, R_2)] = (R_1 t_2 - R_2 t_1, R_1 R_2 - R_2 R_1)$.
Manifolds.screw_matrix β Methodscrew_matrix(G::SpecialEuclidean, X) -> AbstractMatrixRepresent the Lie algebra element $X β π°π’(n) = T_e \mathrm{SE}(n)$ as a screw matrix. For $X = (b, Ξ©) β π°π’(n)$, where $Ξ© β π°π¬(n) = T_e \mathrm{SO}(n)$, the screw representation is the $n + 1 Γ n + 1$ matrix
\[\begin{pmatrix} Ξ© & b \\ 0^\mathrm{T} & 0 \end{pmatrix}.\]
This function embeds $π°π’(n)$ in the general linear Lie algebra $π€π©(n+1)$ but it's not a homomorphic embedding (see SpecialEuclideanInGeneralLinear for a homomorphic one).
See also affine_matrix for matrix representations of the Lie group.
Manifolds.translate_diff β Methodtranslate_diff(G::SpecialEuclidean, p, q, X, ::RightAction)Differential of the right action of the SpecialEuclidean group on itself. The formula for the rotation part is the differential of the right rotation action, while the formula for the translation part reads
\[R_qβ X_Rβ t_p + X_t\]
where $R_q$ is the rotation part of q, $X_R$ is the rotation part of X, $t_p$ is the translation part of p and $X_t$ is the translation part of X.
ManifoldsBase.embed β Methodembed(M::SpecialEuclideanInGeneralLinear, p, X)Embed the tangent vector X at point p on SpecialEuclidean in the GeneralLinear group. Point p can use any representation valid for SpecialEuclidean. The embedding is similar from the one defined by screw_matrix but the translation part is multiplied by inverse of the rotation part.
ManifoldsBase.embed β Methodembed(M::SpecialEuclideanInGeneralLinear, p)Embed the point p on SpecialEuclidean in the GeneralLinear group. The embedding is calculated using affine_matrix.
ManifoldsBase.project β Methodproject(M::SpecialEuclideanInGeneralLinear, p, X)Project tangent vector X at point p in GeneralLinear to the SpecialEuclidean Lie algebra. This reverses the transformation performed by embed
ManifoldsBase.project β Methodproject(M::SpecialEuclideanInGeneralLinear, p)Project point p in GeneralLinear to the SpecialEuclidean group. This is performed by extracting the rotation and translation part as in affine_matrix.
Group actions
Group actions represent actions of a given group on a specified manifold. The following operations are available:
apply: performs given action of an element of the group on an object of compatible type.apply_diff: differential ofapplywith respect to the object it acts upon.direction: tells whether a given action isLeftActionorRightAction.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 callsapplybut it may be have a faster implementation for some actions.inverse_apply_diff: counterpart ofapply_diffforinverse_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 left (LeftAction) or right (RightAction) translation. This is by default performed by callingcomposewith appropriate order of arguments. This function is separated fromcomposemostly to easily represent its differential,translate_diff.translate_diff: differential oftranslatewith 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
GroupOperationActionthat describes action of a group on itself. RotationAction, that is action ofSpecialOrthogonalgroup on different manifolds.TranslationAction, which is the action ofTranslationGroupgroup on different manifolds.
Manifolds.AbstractGroupAction β TypeAbstractGroupActionAn abstract group action on a manifold.
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 group 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.base_group β Methodbase_group(A::AbstractGroupAction)The group that acts in action A.
Manifolds.center_of_orbit β Functioncenter_of_orbit(
A::AbstractGroupAction,
pts,
p,
mean_method::AbstractEstimationMethod = 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}) -> ADGet the direction of the action
Manifolds.g_manifold β Methodg_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(group::AbstractGroupManifold, AD::ActionDirection = LeftAction())Action of a group upon itself via left or right translation.
Rotation action
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.
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.
Invariant metrics
Manifolds.InvariantMetric β TypeInvariantMetric{G<:AbstractMetric,D<:ActionDirection} <: AbstractMetricExtend a metric on the Lie algebra of an AbstractGroupManifold to the whole group via translation in the specified direction.
Given a group $\mathcal{G}$ and a left- or right group translation map $Ο$ on the group, a metric $g$ is $Ο$-invariant if it has the inner product
\[g_p(X, Y) = g_{Ο_q p}((\mathrm{d}Ο_q)_p X, (\mathrm{d}Ο_q)_p Y),\]
for all $p,q β \mathcal{G}$ and $X,Y β T_p \mathcal{G}$, where $(\mathrm{d}Ο_q)_p$ is the differential of translation by $q$ evaluated at $p$ (see translate_diff).
InvariantMetric constructs an (assumed) $Ο$-invariant metric by extending the inner product of a metric $h_e$ on the Lie algebra to the whole group:
\[g_p(X, Y) = h_e((\mathrm{d}Ο_p^{-1})_p X, (\mathrm{d}Ο_p^{-1})_p Y).\]
The invariance condition is not checked and must be verified for the entire group. To verify the condition for a set of points numerically, use has_approx_invariant_metric.
The convenient aliases LeftInvariantMetric and RightInvariantMetric are provided.
Constructor
InvariantMetric(metric::AbstractMetric, conv::ActionDirection = LeftAction())Manifolds.LeftInvariantMetric β MethodLeftInvariantMetric(metric::AbstractMetric)Alias for a left-InvariantMetric.
Manifolds.RightInvariantMetric β MethodRightInvariantMetric(metric::AbstractMetric)Alias for a right-InvariantMetric.
Manifolds.biinvariant_metric_dispatch β Methodbiinvariant_metric_dispatch(G::AbstractGroupManifold) -> ValReturn Val(true) if the metric on the manifold is bi-invariant, that is, if the metric is both left- and right-invariant (see invariant_metric_dispatch).
Manifolds.has_approx_invariant_metric β Methodhas_approx_invariant_metric(
G::AbstractGroupManifold,
p,
X,
Y,
qs::AbstractVector,
conv::ActionDirection = LeftAction();
kwargs...,
) -> BoolCheck whether the metric on the group $\mathcal{G}$ is (approximately) invariant using a set of predefined points. Namely, for $p β \mathcal{G}$, $X,Y β T_p \mathcal{G}$, a metric $g$, and a translation map $Ο_q$ in the specified direction, check for each $q β \mathcal{G}$ that the following condition holds:
\[g_p(X, Y) β g_{Ο_q p}((\mathrm{d}Ο_q)_p X, (\mathrm{d}Ο_q)_p Y).\]
This is necessary but not sufficient for invariance.
Optionally, kwargs passed to isapprox may be provided.
Manifolds.invariant_metric_dispatch β Methodinvariant_metric_dispatch(G::AbstractGroupManifold, conv::ActionDirection) -> ValReturn Val(true) if the metric on the group $\mathcal{G}$ is invariant under translations by the specified direction, that is, given a group $\mathcal{G}$, a left- or right group translation map $Ο$, and a metric $g_e$ on the Lie algebra, a $Ο$-invariant metric at any point $p β \mathcal{G}$ is defined as a metric with the inner product
\[g_p(X, Y) = g_{Ο_q p}((\mathrm{d}Ο_q)_p X, (\mathrm{d}Ο_q)_p Y),\]
for $X,Y β T_q \mathcal{G}$ and all $q β \mathcal{G}$, where $(\mathrm{d}Ο_q)_p$ is the differential of translation by $q$ evaluated at $p$ (see translate_diff).
Cartan-Schouten connections
Manifolds.AbstractCartanSchoutenConnection β TypeAbstractCartanSchoutenConnectionAbstract type for Cartan-Schouten connections, that is connections whose geodesics going through group identity are one-parameter subgroups. See [Pennec2020] for details.
Manifolds.CartanSchoutenMinus β TypeCartanSchoutenMinusThe unique Cartan-Schouten connection such that all left-invariant vector fields are globally defined by their value at identity. It is biinvariant with respect to the group operation.
Manifolds.CartanSchoutenPlus β TypeCartanSchoutenPlusThe unique Cartan-Schouten connection such that all right-invariant vector fields are globally defined by their value at identity. It is biinvariant with respect to the group operation.
Manifolds.CartanSchoutenZero β TypeCartanSchoutenZeroThe unique torsion-free Cartan-Schouten connection. It is biinvariant with respect to the group operation.
If the metric on the underlying manifold is bi-invariant then it is equivalent to the Levi-Civita connection of that metric.
ManifoldsBase.exp! β Methodexp!(M::ConnectionManifold{π½,<:AbstractGroupManifold{π½},<:AbstractCartanSchoutenConnection}, q, p, X) where {π½}Compute the exponential map on the ConnectionManifold M with a Cartan-Schouten connection. See Sections 5.3.2 and 5.3.3 of [Pennec2020] for details.
ManifoldsBase.log! β Methodlog!(M::ConnectionManifold{π½,<:AbstractGroupManifold{π½},<:AbstractCartanSchoutenConnection}, Y, p, q) where {π½}Compute the logarithmic map on the ConnectionManifold M with a Cartan-Schouten connection. See Sections 5.3.2 and 5.3.3 of [Pennec2020] for details.
ManifoldsBase.vector_transport_direction β Methodvector_transport_direction(M::CartanSchoutenZeroGroup, ::Identity, X, d, ::ParallelTransport)Transport tangent vector X at identity on the group manifold with the CartanSchoutenZero connection in the direction d. See [Pennec2020] for details.
ManifoldsBase.vector_transport_to β Methodvector_transport_to(M::CartanSchoutenMinusGroup, p, X, q, ::ParallelTransport)Transport tangent vector X at point p on the group manifold M with the CartanSchoutenMinus connection to point q. See [Pennec2020] for details.
ManifoldsBase.vector_transport_to β Methodvector_transport_to(M::CartanSchoutenPlusGroup, p, X, q, ::ParallelTransport)Transport tangent vector X at point p on the group manifold M with the CartanSchoutenPlus connection to point q. See [Pennec2020] for details.
ManifoldsBase.vector_transport_to β Methodvector_transport_to(M::CartanSchoutenZeroGroup, ::Identity, X, q, m::ParallelTransport)Transport vector X at identity of group M equipped with the CartanSchoutenZero connection to point q using parallel transport.
- AndruchowLarotondaRechtVarela2014
Andruchow E., Larotonda G., Recht L., and Varela A.: βThe left invariant metric in the general linear groupβ, Journal of Geometry and Physics 86, pp. 241-257, 2014. doi: 10.1016/j.geomphys.2014.08.009, arXiv: 1109.0520v1.
- MartinNeff2016
Martin, R. J. and Neff, P.: βMinimal geodesics on GL(n) for left-invariant, right-O(n)-invariant Riemannian metricsβ, Journal of Geometric Mechanics 8(3), pp. 323-357, 2016. doi: 10.3934/jgm.2016010, arXiv: 1409.7849v2.
- RicoMartinez1988
Rico Martinez, J. M., βRepresentations of the Euclidean group and its applications to the kinematics of spatial chains,β PhD Thesis, University of Florida, 1988.
- Pennec2020
X. Pennec and M. Lorenzi, β5 - Beyond Riemannian geometry: The affine connection setting for transformation groups,β in Riemannian Geometric Statistics in Medical Image Analysis, X. Pennec, S. Sommer, and T. Fletcher, Eds. Academic Press, 2020, pp. 169β229. doi: 10.1016/B978-0-12-814725-2.00012-1.
- Pennec2020
X. Pennec and M. Lorenzi, β5 - Beyond Riemannian geometry: The affine connection setting for transformation groups,β in Riemannian Geometric Statistics in Medical Image Analysis, X. Pennec, S. Sommer, and T. Fletcher, Eds. Academic Press, 2020, pp. 169β229. doi: 10.1016/B978-0-12-814725-2.00012-1.
- Pennec2020
X. Pennec and M. Lorenzi, β5 - Beyond Riemannian geometry: The affine connection setting for transformation groups,β in Riemannian Geometric Statistics in Medical Image Analysis, X. Pennec, S. Sommer, and T. Fletcher, Eds. Academic Press, 2020, pp. 169β229. doi: 10.1016/B978-0-12-814725-2.00012-1.
- Pennec2020
X. Pennec and M. Lorenzi, β5 - Beyond Riemannian geometry: The affine connection setting for transformation groups,β in Riemannian Geometric Statistics in Medical Image Analysis, X. Pennec, S. Sommer, and T. Fletcher, Eds. Academic Press, 2020, pp. 169β229. doi: 10.1016/B978-0-12-814725-2.00012-1.
- Pennec2020
X. Pennec and M. Lorenzi, β5 - Beyond Riemannian geometry: The affine connection setting for transformation groups,β in Riemannian Geometric Statistics in Medical Image Analysis, X. Pennec, S. Sommer, and T. Fletcher, Eds. Academic Press, 2020, pp. 169β229. doi: 10.1016/B978-0-12-814725-2.00012-1.
- Pennec2020
X. Pennec and M. Lorenzi, β5 - Beyond Riemannian geometry: The affine connection setting for transformation groups,β in Riemannian Geometric Statistics in Medical Image Analysis, X. Pennec, S. Sommer, and T. Fletcher, Eds. Academic Press, 2020, pp. 169β229. doi: 10.1016/B978-0-12-814725-2.00012-1.