MatrixLieGroup {rgeomstats} | R Documentation |
Abstract Class for Matrix Lie Groups
Description
Class for matrix Lie groups.
Super classes
rgeomstats::PythonClass
-> rgeomstats::Manifold
-> MatrixLieGroup
Public fields
lie_algebra
An object of class
MatrixLieAlgebra
orNULL
representing the tangent space at the identity.n
The size of the
n \times n
matrix elements.left_canonical_metric
An object of class
InvariantMetric
representing the left invariant metric that corresponds to the Euclidean inner product at the identity.right_canonical_metric
An object of class
InvariantMetric
representing the left invariant metric that corresponds to the Euclidean inner product at the identity.
Methods
Public methods
Inherited methods
rgeomstats::PythonClass$get_python_class()
rgeomstats::PythonClass$set_python_class()
rgeomstats::Manifold$belongs()
rgeomstats::Manifold$is_tangent()
rgeomstats::Manifold$random_point()
rgeomstats::Manifold$random_tangent_vec()
rgeomstats::Manifold$regularize()
rgeomstats::Manifold$set_metric()
rgeomstats::Manifold$to_tangent()
Method new()
The MatrixLieGroup
class constructor.
Usage
MatrixLieGroup$new(dim, n, lie_algebra = NULL, ..., py_cls = NULL)
Arguments
dim
An integer value specifying the dimension of the manifold.
n
The size of the
n \times n
matrix elements.lie_algebra
An object of class
MatrixLieAlgebra
orNULL
representing the tangent space at the identity....
Extra arguments to be passed to parent class constructors. See
Manifold
class.py_cls
A Python object of class
MatrixLieGroup
. Defaults toNULL
in which case it is instantiated on the fly using the other input arguments.
Returns
An object of class MatrixLieGroup
.
Method exp()
Exponentiates a left-invariant vector field from a base point.
Usage
MatrixLieGroup$exp(tangent_vec, base_point = NULL)
Arguments
tangent_vec
A numeric array of shape
[\dots \times n \times n]
specifying one or more tangent vectors at corresponding base points.base_point
A numeric array of shape
[\dots \times n \times n]
specifying one or more base points on the manifold. Defaults to identity ifNULL
.
Details
The vector input is not an element of the Lie algebra, but of
the tangent space at base_point
: if g
denotes base_point
,
v
the tangent vector, and V = g^{-1} v
the associated Lie
algebra vector, then
\exp(v, g) = \mathrm{mul}(g, \exp(V))
.
Therefore, the Lie exponential is obtained when base_point
is NULL
,
or the identity.
Returns
A numeric array of shape [\dots \times n \times n]
storing
the left multiplication of the Lie exponential of the input tangent
vectors with the corresponding base points.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) # so3$exp(diag(1, 3)) # TO DO: fix in gs }
Method log()
Computes a left-invariant vector field bringing base_point
to point
.
Usage
MatrixLieGroup$log(point, base_point = NULL)
Arguments
point
A numeric array of shape
[\dots \times n \times n]
specifying one or more points.base_point
A numeric array of shape
[\dots \times n \times n]
specifying one or more base points on the manifold. Defaults to identity ifNULL
.
Details
The output is a vector of the tangent space at base_point
, so
not a Lie algebra element if base_point
is not the identity.
Furthermore, denoting point
by g
and base_point
by h
,
the output satisfies
g = \exp(\log(g, h), h)
.
Returns
A numeric array of shape [\dots \times n \times n]
such
that its Lie exponential at corresponding base points matches
corresponding points.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) so3$log(diag(1, 3)) }
Method get_identity()
Gets the identity of the group.
Usage
MatrixLieGroup$get_identity()
Returns
A numeric array of shape n \times n
storing the identity
of the Lie group.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) so3$get_identity() }
Method lie_bracket()
Computes the lie bracket of two tangent vectors.
Usage
MatrixLieGroup$lie_bracket( tangent_vector_a, tangent_vector_b, base_point = NULL )
Arguments
tangent_vector_a
A numeric array of shape
[\dots \times n \times n]
specifying one or more tangent vectors at corresponding base points.tangent_vector_b
A numeric array of shape
[\dots \times n \times n]
specifying one or more tangent vectors at corresponding base points.base_point
A numeric array of shape
[\dots \times n \times n]
specifying one or more base points on the manifold. Defaults to identity ifNULL
.
Details
For matrix Lie groups with tangent vectors A
and B
at the same base point P
, this is given by (translate to
identity, compute commutator, go back):
[A,B] = A_P^{-1}B -
B_P^{-1}A
.
Returns
A numeric array of shape [\dots \times n \times n]
storing
the Lie bracket of the two input tangent vectors.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) so3$lie_bracket(diag(0, 3), diag(1, 3)) }
Method tangent_translation_map()
Computes the push-forward map by the left/right translation.
Usage
MatrixLieGroup$tangent_translation_map( point, left_or_right = "left", inverse = FALSE )
Arguments
point
A numeric array of shape
[\dots \times \{ \mathrm{dim}, [n \times n] \} ]
specifying one or more points at which to compute the map.left_or_right
A character string specifying whether to compute the map for the left or right translation. Choices are
"left"
or"right
. Defaults to"left"
.inverse
A boolean specifying whether to inverse the Jacobian matrix. If set to
TRUE
, the push forward by the translation by the inverse of the point is returned. Defaults toFALSE
.
Details
Computes the push-forward map of the left/right translation by
the point. It corresponds to the tangent map, or differential of the
group multiplication by the point or its inverse. For groups with a
vector representation, it is only implemented at identity, but it can
be used at other points with inverse = TRUE
. This method wraps the
Jacobian translation which actually computes the matrix representation
of the map.
Returns
A function taking as argument a numeric array tangent_vec
of
shape [\dots \times \{ \mathrm{dim}, [n \times n] \} ]
specifying
one or more tangent vectors and returning a numeric array of shape
[\dots \times \{ \mathrm{dim}, [n \times n] \} ]
storing the
result of the tangent mapping of the left/right translation of input
tangent points by corresponding base points.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) tangent_map <- so3$tangent_translation_map(diag(1, 3)) tangent_map(diag(1, 3)) }
Method compose()
Performs function composition corresponding to the Lie group.
Usage
MatrixLieGroup$compose(point_a, point_b)
Arguments
point_a
A numeric array of shape
[\dots \times \{ \mathrm{dim}, n \times n \}]
specifying one or more left factors in the product.point_b
A numeric array of shape
[\dots \times \{ \mathrm{dim}, n \times n \}]
specifying one or more right factors in the product.
Returns
A numeric array of shape [\dots \times \{ \mathrm{dim}, n
\times n \}]
storing the product of point_a
and point_b
along the
first dimension.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) so3$compose(diag(1, 3), diag(1, 3)) }
Method inverse()
Computes the inverse law of the Lie group.
Usage
MatrixLieGroup$inverse(point)
Arguments
point
A numeric array of shape
[\dots \times \{ \mathrm{dim}, n \times n \}]
specifying one or more points to be inverted.
Returns
A numeric array of the same shape storing the inverted points.
Examples
if (reticulate::py_module_available("geomstats")) { so3 <- SpecialOrthogonal(n = 3) so3$inverse(diag(1, 3)) }
Method clone()
The objects of this class are cloneable with this method.
Usage
MatrixLieGroup$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Author(s)
Nina Miolane
Examples
## ------------------------------------------------
## Method `MatrixLieGroup$exp`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
# so3$exp(diag(1, 3)) # TO DO: fix in gs
}
## ------------------------------------------------
## Method `MatrixLieGroup$log`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
so3$log(diag(1, 3))
}
## ------------------------------------------------
## Method `MatrixLieGroup$get_identity`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
so3$get_identity()
}
## ------------------------------------------------
## Method `MatrixLieGroup$lie_bracket`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
so3$lie_bracket(diag(0, 3), diag(1, 3))
}
## ------------------------------------------------
## Method `MatrixLieGroup$tangent_translation_map`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
tangent_map <- so3$tangent_translation_map(diag(1, 3))
tangent_map(diag(1, 3))
}
## ------------------------------------------------
## Method `MatrixLieGroup$compose`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
so3$compose(diag(1, 3), diag(1, 3))
}
## ------------------------------------------------
## Method `MatrixLieGroup$inverse`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so3 <- SpecialOrthogonal(n = 3)
so3$inverse(diag(1, 3))
}