Group manifolds and actions
Lie groups, groups that are Riemannian manifolds with a smooth binary group operation AbstractGroupOperation
, are implemented as AbstractDecoratorManifold
and specifying the group operation using the IsGroupManifold
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
: an allocation-free representation of the identity element of the group.inv
: get the inverse of a given element.compose
: compose two given elements of a group.identity_element
get the identity element of the group, in the representation used by other points from the 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.AbstractGroupOperation
— TypeAbstractGroupOperation
Abstract 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 group manifold over number system 𝔽
or in general, by defining for an operation Op
the following methods:
identity_element!(::AbstractDecoratorManifold, q, q)
inv!(::AbstractDecoratorManifold, q, p)
_compose!(::AbstractDecoratorManifold, x, p, q)
Note that a manifold is connected with an operation by wrapping it with a decorator, AbstractDecoratorManifold
using the IsGroupManifold
to specify the operation. For a concrete case the concrete wrapper GroupManifold
can be used.
Manifolds.AbstractInvarianceTrait
— TypeAbstractInvarianceTrait <: AbstractTrait
A common supertype for anz AbstractTrait
related to metric invariance
Manifolds.ActionDirection
— TypeActionDirection
Direction of action on a manifold, either LeftAction
or RightAction
.
Manifolds.GroupExponentialRetraction
— TypeGroupExponentialRetraction{D<:ActionDirection} <: AbstractRetractionMethod
Retraction using the group exponential exp_lie
"translated" to any point on the manifold.
For more details, see retract
.
Constructor
GroupExponentialRetraction(conv::ActionDirection = LeftAction())
Manifolds.GroupLogarithmicInverseRetraction
— TypeGroupLogarithmicInverseRetraction{D<:ActionDirection} <: AbstractInverseRetractionMethod
Retraction using the group logarithm log_lie
"translated" to any point on the manifold.
For more details, see inverse_retract
.
Constructor
GroupLogarithmicInverseRetraction(conv::ActionDirection = LeftAction())
Manifolds.HasBiinvariantMetric
— TypeHasBiinvariantMetric <: AbstractInvarianceTrait
Specify that a certain the metric of a GroupManifold
is a bi-invariant metric
Manifolds.HasLeftInvariantMetric
— TypeHasLeftInvariantMetric <: AbstractInvarianceTrait
Specify that a certain the metric of a GroupManifold
is a left-invariant metric
Manifolds.HasRightInvariantMetric
— TypeHasRightInvariantMetric <: AbstractInvarianceTrait
Specify that a certain the metric of a GroupManifold
is a right-invariant metric
Manifolds.Identity
— TypeIdentity{O<:AbstractGroupOperation}
Represent the group identity element $e ∈ \mathcal{G}$ on a Lie group $\mathcal G$ with AbstractGroupOperation
of type O
.
Similar to the philosophy that points are agnostic of their group at hand, the identity does not store the group g
it belongs to. However it depends on the type of the AbstractGroupOperation
used.
See also identity_element
on how to obtain the corresponding AbstractManifoldPoint
or array representation.
Constructors
Identity(G::AbstractDecoratorManifold{𝔽})
Identity(o::O)
Identity(::Type{O})
create the identity of the corresponding subtype O<:
AbstractGroupOperation
Manifolds.IsGroupManifold
— TypeIsGroupManifold{O<:AbstractGroupOperation} <: AbstractTrait
A trait to declare an AbstractManifold
as a manifold with group structure with operation of type O
.
Using this trait you can turn a manifold that you implement implictly into a Lie group. If you wish to decorate an existing manifold with one (or different) AbstractGroupAction
s, see GroupManifold
.
Constructor
IsGroupManifold(op)
Manifolds.LeftAction
— TypeLeftAction()
Left action of a group on a manifold.
Manifolds.RightAction
— TypeRightAction()
Right action of a group on a manifold.
Base.inv
— Methodinv(G::AbstractDecoratorManifold, 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::AbstractDecoratorManifold, 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.compose
— Methodcompose(G::AbstractDecoratorManifold, p, q)
Compose elements $p,q ∈ \mathcal{G}$ using the group operation $p \circ q$.
For implementing composition on a new group manifold, please overload _compose
instead so that methods with Identity
arguments are not ambiguous.
Manifolds.exp_lie
— Methodexp_lie(G, X)
exp_lie!(G, q, 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. Note that one-parameter subgroups are commutative (see [Suhubi2013], section 3.5), even if the Lie group itself is not commutative.
\[\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
.
For example for the MultiplicationOperation
and either Number
or AbstractMatrix
the Lie exponential is the numeric/matrix exponential.
\[\exp X = \operatorname{Exp} X = \sum_{n=0}^∞ \frac{1}{n!} X^n.\]
Since this function also depends on the group operation, make sure to implement the corresponding trait version exp_lie(::TraitList{<:IsGroupManifold}, G, X)
.
Manifolds.get_coordinates_lie
— Methodget_coordinates_lie(G::AbstractManifold, X, B::AbstractBasis)
Get the coordinates of an element X
from the Lie algebra og G
with respect to a basis B
. This is similar to calling get_coordinates
at the p=
Identity
(G)
.
Manifolds.get_vector_lie
— Methodget_vector_lie(G::AbstractDecoratorManifold, a, B::AbstractBasis)
Reconstruct a tangent vector from the Lie algebra of G
from cooordinates a
of a basis B
. This is similar to calling get_vector
at the p=
Identity
(G)
.
Manifolds.identity_element
— Methodidentity_element(G::AbstractDecoratorManifold, p)
Return a point representation of the Identity
on the IsGroupManifold
G
, where p
indicates the type to represent the identity.
Manifolds.identity_element
— Methodidentity_element(G)
Return a point representation of the Identity
on the IsGroupManifold
G
. By default this representation is the default array or number representation. It should return the corresponding default representation of $e$ as a point on G
if points are not represented by arrays.
Manifolds.inverse_translate
— Methodinverse_translate(G::AbstractDecoratorManifold, p, q, conv::ActionDirection=LeftAction())
Inverse translate group element $q$ by $p$ with the inverse translation $τ_p^{-1}$ with the specified conv
ention, 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::AbstractDecoratorManifold, 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 conv
ention. The differential transports vectors:
\[(\mathrm{d}τ_p^{-1})_q : T_q \mathcal{G} → T_{τ_p^{-1} q} \mathcal{G}\\\]
Manifolds.is_group_manifold
— Methodis_group_manifold(G::GroupManifold)
is_group_manifoldd(G::AbstractManifold, o::AbstractGroupOperation)
returns whether an AbstractDecoratorManifold
is a group manifold with AbstractGroupOperation
o
. For a GroupManifold
G
this checks whether the right operations is stored within G
.
Manifolds.is_identity
— Methodis_identity(G::AbstractDecoratorManifold, q; kwargs)
Check whether q
is the identity on the IsGroupManifold
G
, i.e. it is either the Identity
{O}
with the corresponding AbstractGroupOperation
O
, or (approximately) the correct point representation.
Manifolds.lie_bracket
— Methodlie_bracket(G::AbstractDecoratorManifold, X, Y)
Lie bracket between elements X
and Y
of the Lie algebra corresponding to the Lie group G
, cf. IsGroupManifold
.
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.log_lie
— Methodlog_lie(G, q)
log_lie!(G, X, q)
Compute the Lie group logarithm of the Lie 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 exp_lie
, 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
.
For matrix Lie groups this is equal to the (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}$.
Since this function also depends on the group operation, make sure to implement either
_log_lie(G, q)
and_log_lie!(G, X, q)
for the points not being theIdentity
- the trait version
log_lie(::TraitList{<:IsGroupManifold}, G, e)
,log_lie(::TraitList{<:IsGroupManifold}, G, X, e)
for own implementations of the identity case.
Manifolds.switch_direction
— Methodswitch_direction(::ActionDirection)
Returns a RightAction
when given a LeftAction
and vice versa.
Manifolds.translate
— Methodtranslate(G::AbstractDecoratorManifold, p, q, conv::ActionDirection=LeftAction()])
Translate group element $q$ by $p$ with the translation $τ_p$ with the specified conv
ention, 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::AbstractDecoratorManifold, 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 conv
ention. The differential transports vectors:
\[(\mathrm{d}τ_p)_q : T_q \mathcal{G} → T_{τ_p q} \mathcal{G}\\\]
ManifoldsBase.hat
— Methodhat(M::AbstractDecoratorManifold{𝔽,O}, ::Identity{O}, Xⁱ) where {𝔽,O<:AbstractGroupOperation}
Given a basis $e_i$ on the tangent space at a the Identity
and tangent component vector $X^i$, compute the equivalent vector representation ``X=X^i e_i**, where Einstein summation notation is used:
\[∧ : X^i ↦ X^i e_i\]
For array manifolds, this converts a vector representation of the tangent vector to an array representation. The vee
map is the hat
map's inverse.
ManifoldsBase.inverse_retract
— Methodinverse_retract(
G::AbstractDecoratorManifold,
p,
X,
method::GroupLogarithmicInverseRetraction{<:ActionDirection},
)
Compute the inverse retraction using the group logarithm log_lie
"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 (log_lie
), 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::AbstractDecoratorManifold,
p,
X,
method::GroupExponentialRetraction{<:ActionDirection},
)
Compute the retraction using the group exponential exp_lie
"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 (exp_lie
), and $(\mathrm{d}τ_p^{-1})_p$ is the action of the differential of inverse translation $τ_p^{-1}$ evaluated at $p$ (see inverse_translate_diff
).
ManifoldsBase.vee
— Methodvee(M::AbstractManifold, p, X)
Given a basis $e_i$ on the tangent space at a point p
and tangent vector X
, compute the vector components $X^i$, such that $X = X^i e_i$, where Einstein summation notation is used:
\[\vee : X^i e_i ↦ X^i\]
For array manifolds, this converts an array representation of the tangent vector to a vector representation. The hat
map is the vee
map's inverse.
GroupManifold
As a concrete wrapper for manifolds (e.g. when the manifold per se is a group manifold but another group structure should be implemented), there is the GroupManifold
Manifolds.GroupManifold
— TypeGroupManifold{𝔽,M<:AbstractManifold{𝔽},O<:AbstractGroupOperation} <: AbstractDecoratorManifold{𝔽}
Decorator for a smooth manifold that equips the manifold with a group operation, thus making it a Lie group. See IsGroupManifold
for more details.
Group manifolds by default forward metric-related operations to the wrapped manifold.
Constructor
GroupManifold(manifold, op)
Generic Operations
For groups based on an addition operation or a group operation, several default implementations are provided.
Addition Operation
Manifolds.AdditionOperation
— TypeAdditionOperation <: AbstractGroupOperation
Group operation that consists of simple addition.
Multiplication Operation
Manifolds.MultiplicationOperation
— TypeMultiplicationOperation <: AbstractGroupOperation
Group operation that consists of multiplication.
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
).
Manifolds.RealCircleGroup
— TypeRealCircleGroup <: GroupManifold{Circle{ℝ},AdditionOperation}
The real circle group is the real circle (Circle(ℝ)
) equipped with the group operation of addition (AdditionOperation
).
General linear group
Manifolds.GeneralLinear
— TypeGeneralLinear{n,𝔽} <:
AbstractDecoratorManifold{𝔽}
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.
Heisenberg group
Manifolds.HeisenbergGroup
— TypeHeisenbergGroup{n} <: AbstractDecoratorManifold{ℝ}
Heisenberg group HeisenbergGroup(n)
is the group of $(n+2) × (n+2)$ matrices [BinzPods2008]
\[\begin{bmatrix} 1 & \mathbf{a} & c \\ \mathbf{0} & I_n & \mathbf{b} \\ 0 & \mathbf{0} & 1 \end{bmatrix}\]
where $I_n$ is the $n×n$ unit matrix, $\mathbf{a}$ is a row vector of length $n$, $\mathbf{b}$ is a column vector of length $n$ and $c$ is a real number. The group operation is matrix multiplication.
The left-invariant metric on the manifold is used.
Base.exp
— Methodexp(M::HeisenbergGroup, p, X)
Exponential map on the HeisenbergGroup
M
with the left-invariant metric. The expression reads
\[\exp_{\begin{bmatrix} 1 & \mathbf{a}_p & c_p \\ \mathbf{0} & I_n & \mathbf{b}_p \\ 0 & \mathbf{0} & 1 \end{bmatrix}}\left(\begin{bmatrix} 0 & \mathbf{a}_X & c_X \\ \mathbf{0} & 0_n & \mathbf{b}_X \\ 0 & \mathbf{0} & 0 \end{bmatrix}\right) = \begin{bmatrix} 1 & \mathbf{a}_p + \mathbf{a}_X & c_p + c_X + \mathbf{a}_X⋅\mathbf{b}_X/2 + \mathbf{a}_p⋅\mathbf{b}_X \\ \mathbf{0} & I_n & \mathbf{b}_p + \mathbf{b}_X \\ 0 & \mathbf{0} & 1 \end{bmatrix}\]
where $I_n$ is the $n×n$ identity matrix, $0_n$ is the $n×n$ zero matrix and $\mathbf{a}⋅\mathbf{b}$ is dot product of vectors.
Base.log
— Methodlog(G::HeisenbergGroup, p, q)
Compute the logarithmic map on the HeisenbergGroup
group. The formula reads
\[\log_{\begin{bmatrix} 1 & \mathbf{a}_p & c_p \\ \mathbf{0} & I_n & \mathbf{b}_p \\ 0 & \mathbf{0} & 1 \end{bmatrix}}\left(\begin{bmatrix} 1 & \mathbf{a}_q & c_q \\ \mathbf{0} & I_n & \mathbf{b}_q \\ 0 & \mathbf{0} & 1 \end{bmatrix}\right) = \begin{bmatrix} 0 & \mathbf{a}_q - \mathbf{a}_p & c_q - c_p + \mathbf{a}_p⋅\mathbf{b}_p - \mathbf{a}_q⋅\mathbf{b}_q - (\mathbf{a}_q - \mathbf{a}_p)⋅(\mathbf{b}_q - \mathbf{b}_p) / 2 \\ \mathbf{0} & 0_n & \mathbf{b}_q - \mathbf{b}_p \\ 0 & \mathbf{0} & 0 \end{bmatrix}\]
where $I_n$ is the $n×n$ identity matrix, $0_n$ is the $n×n$ zero matrix and $\mathbf{a}⋅\mathbf{b}$ is dot product of vectors.
Manifolds.exp_lie
— Methodexp_lie(M::HeisenbergGroup, X)
Lie group exponential for the HeisenbergGroup
M
of the vector X
. The formula reads
\[\exp\left(\begin{bmatrix} 0 & \mathbf{a} & c \\ \mathbf{0} & 0_n & \mathbf{b} \\ 0 & \mathbf{0} & 0 \end{bmatrix}\right) = \begin{bmatrix} 1 & \mathbf{a} & c + \mathbf{a}⋅\mathbf{b}/2 \\ \mathbf{0} & I_n & \mathbf{b} \\ 0 & \mathbf{0} & 1 \end{bmatrix}\]
where $I_n$ is the $n×n$ identity matrix, $0_n$ is the $n×n$ zero matrix and $\mathbf{a}⋅\mathbf{b}$ is dot product of vectors.
Manifolds.log_lie
— Methodlog_lie(M::HeisenbergGroup, p)
Lie group logarithm for the HeisenbergGroup
M
of the point p
. The formula reads
\[\log\left(\begin{bmatrix} 1 & \mathbf{a} & c \\ \mathbf{0} & I_n & \mathbf{b} \\ 0 & \mathbf{0} & 1 \end{bmatrix}\right) = \begin{bmatrix} 0 & \mathbf{a} & c - \mathbf{a}⋅\mathbf{b}/2 \\ \mathbf{0} & 0_n & \mathbf{b} \\ 0 & \mathbf{0} & 0 \end{bmatrix}\]
where $I_n$ is the $n×n$ identity matrix, $0_n$ is the $n×n$ zero matrix and $\mathbf{a}⋅\mathbf{b}$ is dot product of vectors.
ManifoldsBase.get_coordinates
— Methodget_coordinates(M::HeisenbergGroup, p, X, ::DefaultOrthonormalBasis{ℝ,TangentSpaceType})
Get coordinates of tangent vector X
at point p
from the HeisenbergGroup
M
. Given a matrix
\[\begin{bmatrix} 1 & \mathbf{a} & c \\ \mathbf{0} & I_n & \mathbf{b} \\ 0 & \mathbf{0} & 1 \end{bmatrix}\]
the coordinates are concatenated vectors $\mathbf{a}$, $\mathbf{b}$, and number $c$.
ManifoldsBase.get_vector
— Methodget_vector(M::HeisenbergGroup, p, Xⁱ, ::DefaultOrthonormalBasis{ℝ,TangentSpaceType})
Get tangent vector with coordinates Xⁱ
at point p
from the HeisenbergGroup
M
. Given a vector of coordinates $\begin{bmatrix}\mathbb{a} & \mathbb{b} & c\end{bmatrix}$ the tangent vector is equal to
\[\begin{bmatrix} 1 & \mathbf{a} & c \\ \mathbf{0} & I_n & \mathbf{b} \\ 0 & \mathbf{0} & 1 \end{bmatrix}\]
ManifoldsBase.injectivity_radius
— Methodinjectivity_radius(M::HeisenbergGroup)
Return the injectivity radius on the HeisenbergGroup
M
, which is $∞$.
ManifoldsBase.project
— Methodproject(M::HeisenbergGroup{n}, p, X)
Project a matrix X
in the Euclidean embedding onto the Lie algebra of HeisenbergGroup
M
. Sets the diagonal elements to 0 and all non-diagonal elements except the first row and the last column to 0.
ManifoldsBase.project
— Methodproject(M::HeisenbergGroup{n}, p)
Project a matrix p
in the Euclidean embedding onto the HeisenbergGroup
M
. Sets the diagonal elements to 1 and all non-diagonal elements except the first row and the last column to 0.
(Special) Orthogonal and (Special) Unitary group
Since the orthogonal, unitary and special orthogonal and special unitary groups share many common functions, these are also implemented on a common level.
Common functions
Manifolds.GeneralUnitaryMultiplicationGroup
— TypeGeneralUnitaryMultiplicationGroup{n,𝔽,M} = GroupManifold{𝔽,M,MultiplicationOperation}
A generic type for Lie groups based on a unitary property and matrix multiplcation, see e.g. Orthogonal
, SpecialOrthogonal
, Unitary
, and SpecialUnitary
Manifolds.exp_lie
— Method exp_lie(G::Orthogonal{2}, X)
exp_lie(G::SpecialOrthogonal{2}, X)
Compute the Lie group exponential map on the Orthogonal
(2)
or SpecialOrthogonal
(2)
group. Given $X = \begin{pmatrix} 0 & -θ \\ θ & 0 \end{pmatrix}$, the group exponential is
\[\exp_e \colon X ↦ \begin{pmatrix} \cos θ & -\sin θ \\ \sin θ & \cos θ \end{pmatrix}.\]
Manifolds.exp_lie
— Method exp_lie(G::Orthogonal{4}, X)
exp_lie(G::SpecialOrthogonal{4}, X)
Compute the group exponential map on the Orthogonal
(4)
or the SpecialOrthogonal
group. The algorithm used is a more numerically stable form of those proposed in [Gallier2002], [Andrica2013].
Orthogonal group
Manifolds.Orthogonal
— TypeOrthogonal{n} = GeneralUnitaryMultiplicationGroup{n,ℝ,AbsoluteDeterminantOneMatrices}
Orthogonal group $\mathrm{O}(n)$ represented by OrthogonalMatrices
.
Constructor
Orthogonal(n)
Special orthogonal group
Manifolds.SpecialOrthogonal
— TypeSpecialOrthogonal{n} <: GroupManifold{ℝ,Rotations{n},MultiplicationOperation}
Special orthogonal group $\mathrm{SO}(n)$ represented by rotation matrices, see Rotations
.
Constructor
SpecialOrthogonal(n)
Special unitary group
Manifolds.SpecialUnitary
— TypeSpecialUnitary{n} = GeneralUnitaryMultiplicationGroup{n,ℝ,GeneralUnitaryMatrices{n,ℂ,DeterminantOneMatrices}}
The special unitary group $\mathrm{SU}(n)$ represented by unitary matrices of determinant +1.
The tangent spaces are of the form
\[T_p\mathrm{SU}(x) = \bigl\{ X \in \mathbb C^{n×n} \big| X = pY \text{ where } Y = -Y^{\mathrm{H}} \bigr\}\]
and we represent tangent vectors by just storing the SkewHermitianMatrices
$Y$, or in other words we represent the tangent spaces employing the Lie algebra $\mathfrak{su}(n)$.
Constructor
SpecialUnitary(n)
Generate the Lie group of $n×n$ unitary matrices with determinant +1.
ManifoldsBase.project
— Methodproject(G::SpecialUnitary, p)
Project p
to the nearest point on the SpecialUnitary
group G
.
Given the singular value decomposition $p = U S V^\mathrm{H}$, with the singular values sorted in descending order, the projection is
\[\operatorname{proj}_{\mathrm{SU}(n)}(p) = U\operatorname{diag}\left[1,1,…,\det(U V^\mathrm{H})\right] V^\mathrm{H}.\]
The diagonal matrix ensures that the determinant of the result is $+1$.
Unitary group
Manifolds.Unitary
— Type Unitary{n,𝔽} = GeneralUnitaryMultiplicationGroup{n,𝔽,AbsoluteDeterminantOneMatrices}
The group of unitary matrices $\mathrm{U}(n, 𝔽)$, either complex (when 𝔽=ℂ) or quaternionic (when 𝔽=ℍ)
The group consists of all points $p ∈ 𝔽^{n × n}$ where $p^\mathrm{H}p = pp^\mathrm{H} = I$.
The tangent spaces are if the form
\[T_p\mathrm{U}(n) = \bigl\{ X \in 𝔽^{n×n} \big| X = pY \text{ where } Y = -Y^{\mathrm{H}} \bigr\}\]
and we represent tangent vectors by just storing the SkewHermitianMatrices
$Y$, or in other words we represent the tangent spaces employing the Lie algebra $\mathfrak{u}(n, 𝔽)$.
Quaternionic unitary group is isomorphic to the compact symplectic group of the same dimension.
Constructor
Unitary(n, 𝔽::AbstractNumbers=ℂ)
Construct $\mathrm{U}(n, 𝔽)$. See also Orthogonal(n)
for the real-valued case.
Manifolds.exp_lie
— Methodexp_lie(G::Unitary{2,ℂ}, X)
Compute the group exponential map on the Unitary(2)
group, which is
\[\exp_e \colon X ↦ e^{\operatorname{tr}(X) / 2} \left(\cos θ I + \frac{\sin θ}{θ} \left(X - \frac{\operatorname{tr}(X)}{2} I\right)\right),\]
where $θ = \frac{1}{2} \sqrt{4\det(X) - \operatorname{tr}(X)^2}$.
Power group
Manifolds.PowerGroup
— MethodPowerGroup{𝔽,T} <: GroupManifold{𝔽,<:AbstractPowerManifold{𝔽,M,RPT},ProductOperation}
Decorate a power manifold with a ProductOperation
.
Constituent manifold of the power manifold must also have a IsGroupManifold
or a decorated instance of one. This type is mostly useful for equipping the direct product of group manifolds with an Identity
element.
Constructor
PowerGroup(manifold::AbstractPowerManifold)
Manifolds.PowerGroupNested
— TypePowerGroupNested
Alias to PowerGroup
with NestedPowerRepresentation
representation.
Manifolds.PowerGroupNestedReplacing
— TypePowerGroupNestedReplacing
Alias to PowerGroup
with NestedReplacingPowerRepresentation
representation.
Product group
Manifolds.ProductGroup
— MethodProductGroup{𝔽,T} <: GroupManifold{𝔽,ProductManifold{T},ProductOperation}
Decorate a product manifold with a ProductOperation
.
Each submanifold must also have a IsGroupManifold
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 <: AbstractGroupOperation
Direct 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.identity_element
— Methodidentity_element(G::SemidirectProductGroup)
Get the identity element of SemidirectProductGroup
G
. Uses ProductRepr
to represent the point.
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).\]
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
— TypeSpecialEuclideanInGeneralLinear
An 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) -> AbstractMatrix
Represent 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.exp_lie
— Methodexp_lie(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.exp_lie
— Methodexp_lie(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.exp_lie
— Methodexp_lie(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 exp_lie
).
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.log_lie
— Methodlog_lie(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.log_lie
— Methodlog_lie(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.log_lie
— Methodlog_lie(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 log_lie
):
Manifolds.screw_matrix
— Methodscrew_matrix(G::SpecialEuclidean, X) -> AbstractMatrix
Represent 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
.
Special linear group
Manifolds.SpecialLinear
— TypeSpecialLinear{n,𝔽} <: AbstractDecoratorManifold
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}.\]
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.
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 ofapply
with respect to the object it acts upon.direction
: tells whether a given action isLeftAction
orRightAction
.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 left (LeftAction
) or right (RightAction
) translation. 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
An abstract group action on a manifold.
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 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.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 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}) -> AD
Get the direction of the action
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(group::AbstractDecoratorManifold, AD::ActionDirection = LeftAction())
Action of a group upon itself via left or right translation.
Rotation action
Manifolds.ColumnwiseMultiplicationAction
— TypeColumnwiseMultiplicationAction{
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
TAD<:ActionDirection,
} <: 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{
TM<:AbstractManifold,
TO<:GeneralUnitaryMultiplicationGroup,
TAD<:ActionDirection,
} <: 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 [Srivastava2016].
The formula reads
\[O^{*} = \begin{cases} UV^T & \text{if } \operatorname{det}(p q^{\mathrm{T}})\\ 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.
References
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.
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
uses methods for Rotations
(which is, incidentally, bi-invariant), or SpecialEuclidean
uses product metric of the translation and rotation parts (which is not invariant under group operation).
It is, however, possible to change the metric used by a group by wrapping it in a MetricManifold
decorator.
Invariant metrics
Manifolds.LeftInvariantMetric
— TypeLeftInvariantMetric <: AbstractMetric
An AbstractMetric
that changes the metric of a Lie group to the left-invariant metric obtained by left-translations to the identity. Adds the HasLeftInvariantMetric
trait.
Manifolds.RightInvariantMetric
— TypeRightInvariantMetric <: AbstractMetric
An AbstractMetric
that changes the metric of a Lie group to the right-invariant metric obtained by right-translations to the identity. Adds the HasRightInvariantMetric
trait.
Manifolds.direction
— Methoddirection(::AbstractDecoratorManifold) -> AD
Get the direction of the action a certain Lie group with its implicit metric has
Manifolds.has_approx_invariant_metric
— Methodhas_approx_invariant_metric(
G::AbstractDecoratorManifold,
p,
X,
Y,
qs::AbstractVector,
conv::ActionDirection = LeftAction();
kwargs...,
) -> Bool
Check 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.
Cartan-Schouten connections
Manifolds.AbstractCartanSchoutenConnection
— TypeAbstractCartanSchoutenConnection
Abstract type for Cartan-Schouten connections, that is connections whose geodesics going through group identity are one-parameter subgroups. See[Pennec2020] for details.
Manifolds.CartanSchoutenMinus
— TypeCartanSchoutenMinus
The 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
— TypeCartanSchoutenPlus
The 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
— TypeCartanSchoutenZero
The 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.
Base.exp
— Methodexp(M::ConnectionManifold{𝔽,<:AbstractDecoratorManifold{𝔽},<:AbstractCartanSchoutenConnection}, 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.
Base.log
— Methodlog(M::ConnectionManifold{𝔽,<:AbstractDecoratorManifold{𝔽},<:AbstractCartanSchoutenConnection}, 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.parallel_transport_direction
— Methodparallel_transport_direction(M::CartanSchoutenZeroGroup, ::Identity, X, d)
Transport tangent vector X
at identity on the group manifold with the CartanSchoutenZero
connection in the direction d
. See [Pennec2020] for details.
ManifoldsBase.parallel_transport_to
— Methodparallel_transport_to(M::CartanSchoutenMinusGroup, p, X, q)
Transport tangent vector X
at point p
on the group manifold M
with the CartanSchoutenMinus
connection to point q
. See [Pennec2020] for details.
ManifoldsBase.parallel_transport_to
— Methodvector_transport_to(M::CartanSchoutenPlusGroup, p, X, q)
Transport tangent vector X
at point p
on the group manifold M
with the CartanSchoutenPlus
connection to point q
. See [Pennec2020] for details.
ManifoldsBase.parallel_transport_to
— Methodparallel_transport_to(M::CartanSchoutenZeroGroup, p::Identity, X, q)
Transport vector X
at identity of group M
equipped with the CartanSchoutenZero
connection to point q
using parallel transport.
- Suhubi2013
E. Suhubi, Exterior Analysis: Using Applications of Differential Forms, 1st edition. Amsterdam: Academic Press, 2013.
- 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.
- BinzPods2008
E. Binz and S. Pods, The Geometry of Heisenberg Groups: With Applications in Signal Theory, Optics, Quantization, and Field Quantization. American Mathematical Soc., 2008.
- Gallier2002
Gallier J.; Xu D.; Computing exponentials of skew-symmetric matrices and logarithms of orthogonal matrices. International Journal of Robotics and Automation (2002), 17(4), pp. 1-11. pdf.
- Andrica2013
Andrica D.; Rohan R.-A.; Computing the Rodrigues coefficients of the exponential map of the Lie groups of matrices. Balkan Journal of Geometry and Its Applications (2013), 18(2), pp. 1-2. pdf.
- 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.
- Srivastava2016
A. Srivastava and E. P. Klassen, Functional and Shape Data Analysis. Springer New York, 2016. ISBN: 978-1-4939-4018-9. doi: 10.1007/978-1-4939-4020-2.
- 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.