Group manifolds
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.GroupActionSide
โ TypeManifolds.GroupExponentialRetraction
โ TypeGroupExponentialRetraction{D<:ActionDirectionAndSide} <: AbstractRetractionMethod
Retraction using the group exponential exp_lie
"translated" to any point on the manifold.
For more details, see retract
.
Constructor
GroupExponentialRetraction(conv::ActionDirectionAndSide = LeftAction())
Manifolds.GroupLogarithmicInverseRetraction
โ TypeGroupLogarithmicInverseRetraction{D<:ActionDirectionAndSide} <: AbstractInverseRetractionMethod
Retraction using the group logarithm log_lie
"translated" to any point on the manifold.
For more details, see inverse_retract
.
Constructor
GroupLogarithmicInverseRetraction(conv::ActionDirectionAndSide = LeftForwardAction())
Manifolds.HasBiinvariantMetric
โ TypeHasBiinvariantMetric <: AbstractInvarianceTrait
Specify that the default metric functions for the bi-invariant metric on a GroupManifold
are to be used.
Manifolds.HasLeftInvariantMetric
โ TypeHasLeftInvariantMetric <: AbstractInvarianceTrait
Specify that the default metric functions for the left-invariant metric on a GroupManifold
are to be used.
Manifolds.HasRightInvariantMetric
โ TypeHasRightInvariantMetric <: AbstractInvarianceTrait
Specify that the default metric functions for the right-invariant metric on a GroupManifold
are to be used.
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::AbstractGroupOperation)
Manifolds.LeftAction
โ TypeLeftAction()
Left action of a group on a manifold. For a forward action $ฮฑ: GรX โ X$ it is characterized by
\[ฮฑ(g, ฮฑ(h, x)) = ฮฑ(gh, x)\]
for all $g, h โ G$ and $x โ X$.
Manifolds.LeftSide
โ TypeLeftSide()
An action of a group on a manifold that acts from the left side, i.e. $ฮฑ: GรX โ X$.
Manifolds.RightAction
โ TypeRightAction()
Right action of a group on a manifold. For a forward action $ฮฑ: GรX โ X$ it is characterized by
\[ฮฑ(g, ฮฑ(h, x)) = ฮฑ(hg, x)\]
for all $g, h โ G$ and $x โ X$.
Note that a right action may act from either left or right side in an expression.
Manifolds.RightSide
โ TypeRightSide()
An action of a group on a manifold that acts from the right side, i.e. $ฮฑ: XรG โ X$.
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.adjoint_inv_diff
โ Methodadjoint_inv_diff(G::AbstractDecoratorManifold, p, X)
Compute the value of pullback of inverse $p^{-1} โ \mathcal{G}$ of an element $p โ \mathcal{G}$ at tangent vector X
at $p^{-1}$. The result is a tangent vector at $p$.
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 [Suh13], 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::AbstractDecoratorManifold)
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.inv_diff
โ Methodinv_diff(G::AbstractDecoratorManifold, p, X)
Compute the value of differential of inverse $p^{-1} โ \mathcal{G}$ of an element $p โ \mathcal{G}$ at tangent vector X
at p
. The result is a tangent vector at $p^{-1}$.
Manifolds.inverse_translate
โ Methodinverse_translate(G::AbstractDecoratorManifold, p, q, conv::ActionDirectionAndSide=LeftForwardAction())
Inverse translate group element $q$ by $p$ with the translation $ฯ_p^{-1}$ with the specified conv
ention, either left forward ($L_p^{-1}$), left backward ($R'_p^{-1}$), right backward ($R_p^{-1}$) or right forward ($L'_p^{-1}$), defined as ```math \begin{aligned} Lp^{-1} &: q โฆ p^{-1} \circ q\
L'p^{-1} &: q โฆ p \circ q\
Rp^{-1} &: q โฆ q \circ p^{-1}\
R'p^{-1} &: q โฆ q \circ p. \end{aligned}
Manifolds.inverse_translate_diff
โ Methodinverse_translate_diff(G::AbstractDecoratorManifold, p, q, X, conv::ActionDirectionAndSide=LeftForwardAction())
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_manifold(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 type of action between left and right. This function does not affect side of action, see switch_side
.
Manifolds.switch_side
โ Methodswitch_side(::GroupActionSide)
Returns side of action between left and right. This function does not affect the action being left or right, see switch_direction
.
Manifolds.translate
โ Methodtranslate(G::AbstractDecoratorManifold, p, q, conv::ActionDirectionAndSide=LeftForwardAction()])
Translate group element $q$ by $p$ with the translation $ฯ_p$ with the specified conv
ention, either left forward ($L_p$), left backward ($R'_p$), right backward ($R_p$) or right forward ($L'_p$), defined as
\[\begin{aligned} L_p &: q โฆ p \circ q\\ L'_p &: q โฆ p^{-1} \circ q\\ R_p &: q โฆ q \circ p\\ R'_p &: q โฆ q \circ p^{-1}. \end{aligned}\]
Manifolds.translate_diff
โ Methodtranslate_diff(G::AbstractDecoratorManifold, p, q, X, conv::ActionDirectionAndSide=LeftForwardAction())
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,
)
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,
)
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{๐ฝ}
Concrete 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)
Define the group operation op
acting on the manifold manifold
, hence if op
acts smoothly, this forms a Lie group.
Base.rand
โ Methodrand(::GroupManifold; vector_at=nothing, ฯ=1.0)
rand!(::GroupManifold, pX; vector_at=nothing, kwargs...)
rand(::TraitList{IsGroupManifold}, M; vector_at=nothing, ฯ=1.0)
rand!(TraitList{IsGroupManifold}, M, pX; vector_at=nothing, kwargs...)
Compute a random point or tangent vector on a Lie group.
For points this just means to generate a random point on the underlying manifold itself.
For tangent vectors, an element in the Lie Algebra is generated.
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.
Manifolds.adjoint_inv_diff
โ Methodadjoint_inv_diff(::AdditionGroupTrait, G::AbstractDecoratorManifold, p, X)
Compute the value of pullback of additive matrix inversion $p โฆ -p$ at $X$, i.e. $-X$.
Manifolds.inv_diff
โ Methodinv_diff(::AdditionGroupTrait, G::AbstractDecoratorManifold, p, X)
Compute the value of differential of additive matrix inversion $p โฆ -p$ at $X$, i.e. $-X$.
Multiplication Operation
Manifolds.MultiplicationOperation
โ TypeMultiplicationOperation <: AbstractGroupOperation
Group operation that consists of multiplication.
Manifolds.adjoint_inv_diff
โ Methodadjoint_inv_diff(::MultiplicationGroupTrait, G::AbstractDecoratorManifold, p, X)
Compute the value of differential of matrix inversion $p โฆ p^{-1}$ at $X$. When tangent vectors are represented in Lie algebra in a left-invariant way, the formula reads $-p^\mathrm{T}X(p^{-1})^\mathrm{T}$. For matrix groups with ambient space tangent vectors, the formula would read $-(p^{-1})^\mathrm{T}X(p^{-1})^\mathrm{T}$. See the section about matrix inverse in [Gil08].
Manifolds.inv_diff
โ Methodinv_diff(::MultiplicationGroupTrait, G::AbstractDecoratorManifold, p, X)
Compute the value of differential of matrix inversion $p โฆ p^{-1}$ at $X$. When tangent vectors are represented in Lie algebra in a left-invariant way, the formula reads $-pXp^{-1}$. For matrix groups with ambient space tangent vectors, the formula would read $-p^{-1}Xp^{-1}$. See the section about matrix inverse in [Gil08].
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{T,๐ฝ} <: 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 [ALRV14] [NM16].
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.
Base.rand
โ MethodRandom.rand(G::GeneralLinear; vector_at=nothing, kwargs...)
If vector_at
is nothing
, return a random point on the GeneralLinear
group G
by using rand
in the embedding.
If vector_at
is not nothing
, return a random tangent vector from the tangent space of the point vector_at
on the GeneralLinear
by using by using rand
in the embedding.
Heisenberg group
Manifolds.HeisenbergGroup
โ TypeHeisenbergGroup{T} <: AbstractDecoratorManifold{โ}
Heisenberg group HeisenbergGroup(n)
is the group of $(n+2)ร(n+2)$ matrices [BP08]
\[\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.
Base.rand
โ MethodRandom.rand(M::HeisenbergGroup; vector_at = nothing, ฯ::Real=1.0)
If vector_at
is nothing
, return a random point on the HeisenbergGroup
M
by sampling elements of the first row and the last column from the normal distribution with mean 0 and standard deviation ฯ
.
If vector_at
is not nothing
, return a random tangent vector from the tangent space of the point vector_at
on the HeisenbergGroup
by using a normal distribution with mean 0 and standard deviation ฯ
.
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, 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, 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{T,๐ฝ,S} <: AbstractDecoratorManifold{๐ฝ}
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{TypeParameter{Tuple{2}}}, X)
exp_lie(G::SpecialOrthogonal{TypeParameter{Tuple{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{TypeParameter{Tuple{4}}}, X)
exp_lie(G::SpecialOrthogonal{TypeParameter{Tuple{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 [GX02], [AR13].
Orthogonal group
Manifolds.Orthogonal
โ TypeOrthogonal{T} = GeneralUnitaryMultiplicationGroup{T,โ,AbsoluteDeterminantOneMatrices}
Orthogonal group $\mathrm{O}(n)$ represented by OrthogonalMatrices
.
Constructor
Orthogonal(n::Int; parameter::Symbol=:type)
Special orthogonal group
Manifolds.SpecialOrthogonal
โ TypeSpecialOrthogonal{n} = GeneralUnitaryMultiplicationGroup{n,โ,DeterminantOneMatrices}
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{TypeParameter{Tuple{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 ArrayPartition
from RecursiveArrayTools.jl
to represent the point.
Manifolds.translate_diff
โ Methodtranslate_diff(G::SemidirectProductGroup, p, q, X, conX::LeftForwardAction)
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._get_parameter
โ Method_get_parameter(M::AbstractManifold)
Similar to get_parameter
but it can be specialized for manifolds without breaking manifolds being parametrized by other manifolds.
Manifolds.adjoint_action
โ Methodadjoint_action(::SpecialEuclidean{TypeParameter{Tuple{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 [Ric88].
See also screw_matrix
for matrix representations of the Lie algebra.
Manifolds.exp_lie
โ Methodexp_lie(G::SpecialEuclidean{TypeParameter{Tuple{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{TypeParameter{Tuple{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::ArrayPartition, Y::ArrayPartition)
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 ArrayPartition
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{TypeParameter{Tuple{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{TypeParameter{Tuple{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, p)
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, ::RightBackwardAction)
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{T,๐ฝ} <: 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,๐ฝ} <: GroupManifold{Euclidean{T,๐ฝ},AdditionOperation}
Translation group $\mathrm{T}(n)$ represented by translation arrays.
Constructor
TranslationGroup(nโ,...,nแตข; field=๐ฝ, parameter::Symbol=:type)
Generate the translation group on $๐ฝ^{nโ,โฆ,nแตข}$ = Euclidean(nโ,...,nแตข; field=๐ฝ)
, which is isomorphic to the group itself.
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::ActionDirectionAndSide = LeftForwardAction();
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 [PL20] 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 [PL20] 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 [PL20] 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 [PL20] 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 [PL20] 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 [PL20] 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.