SpecialOrthogonal2Vectors {rgeomstats} | R Documentation |
Abstract Class for the 2D Special Orthogonal Group in Vector Representation
Description
Class for the special orthogonal group \mathrm{SO}(2)
in
vector form, i.e. the Lie group of planar rotations. This class is
specific to the vector representation of rotations. For the matrix
representation, use the SpecialOrthogonal
class and set n = 2
.
Super classes
rgeomstats::PythonClass
-> rgeomstats::Manifold
-> rgeomstats::LieGroup
-> rgeomstats::SpecialOrthogonalVectors
-> SpecialOrthogonal2Vectors
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()
rgeomstats::LieGroup$add_metric()
rgeomstats::LieGroup$compose()
rgeomstats::LieGroup$exp()
rgeomstats::LieGroup$exp_from_identity()
rgeomstats::LieGroup$exp_not_from_identity()
rgeomstats::LieGroup$get_identity()
rgeomstats::LieGroup$inverse()
rgeomstats::LieGroup$jacobian_translation()
rgeomstats::LieGroup$lie_bracket()
rgeomstats::LieGroup$log()
rgeomstats::LieGroup$log_from_identity()
rgeomstats::LieGroup$log_not_from_identity()
rgeomstats::LieGroup$tangent_translation_map()
rgeomstats::SpecialOrthogonalVectors$projection()
rgeomstats::SpecialOrthogonalVectors$regularize_tangent_vec()
rgeomstats::SpecialOrthogonalVectors$regularize_tangent_vec_at_identity()
rgeomstats::SpecialOrthogonalVectors$skew_matrix_from_vector()
rgeomstats::SpecialOrthogonalVectors$vector_from_skew_matrix()
Method new()
The SpecialOrthogonal2Vectors
class constructor.
Usage
SpecialOrthogonal2Vectors$new(epsilon = 0, py_cls = NULL)
Arguments
epsilon
A numeric value specifying the precision to use for calculations involving potential division by 0 in rotations. Defaults to
0
.py_cls
A Python object of class
SpecialOrthogonal2Vectors
. Defaults toNULL
in which case it is instantiated on the fly using the other input arguments.
Returns
An object of class SpecialOrthogonal2Vectors
.
Method rotation_vector_from_matrix()
Converts rotation matrix (in 2D) to rotation vector
(axis-angle) getting the angle through the atan2()
function.
Usage
SpecialOrthogonal2Vectors$rotation_vector_from_matrix(rot_mat)
Arguments
rot_mat
A numeric array of shape
[\dots \times 2 \times 2]
specifying one or more 2D rotation matrices.
Returns
A numeric array of shape [\dots \times 1]
storing the
corresponding axis-angle representations.
Examples
if (reticulate::py_module_available("geomstats")) { so2 <- SpecialOrthogonal(n = 2, point_type = "vector") so2$rotation_vector_from_matrix(diag(1, 2)) }
Method matrix_from_rotation_vector()
Convert a 2D rotation from vector to matrix representation.
Usage
SpecialOrthogonal2Vectors$matrix_from_rotation_vector(rot_vec)
Arguments
rot_vec
A numeric array of shape
... \times 1
specifying one or more 2D rotations in vector representation.
Returns
A numeric array of shape ... \times 2 \times 2
storing the
corresponding 2D rotation matrices.
Examples
if (reticulate::py_module_available("geomstats")) { so2 <- SpecialOrthogonal(n = 2, point_type = "vector") so2$matrix_from_rotation_vector(array(0)) }
Method random_uniform()
Samples in \mathrm{SO}(2)
from a uniform distribution.
Usage
SpecialOrthogonal2Vectors$random_uniform(n_samples = 1)
Arguments
n_samples
An integer value specifying the sample size. Defaults to
1L
.
Returns
A numeric array of shape ... \times 1
storing a sample of
2D rotations in axis-angle representation uniformly sampled in
\mathrm{SO}(2)
.
Method clone()
The objects of this class are cloneable with this method.
Usage
SpecialOrthogonal2Vectors$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Author(s)
Nicolas Guigui and Nina Miolane
See Also
Other special orthogonal classes:
SpecialOrthogonal3Vectors
,
SpecialOrthogonalMatrices
,
SpecialOrthogonal()
Examples
## ------------------------------------------------
## Method `SpecialOrthogonal2Vectors$rotation_vector_from_matrix`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
so2$rotation_vector_from_matrix(diag(1, 2))
}
## ------------------------------------------------
## Method `SpecialOrthogonal2Vectors$matrix_from_rotation_vector`
## ------------------------------------------------
if (reticulate::py_module_available("geomstats")) {
so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
so2$matrix_from_rotation_vector(array(0))
}