SpecialOrthogonalVectors: Abstract Class for Special Orthogonal Groups in Vector...

SpecialOrthogonalVectorsR Documentation

Abstract Class for Special Orthogonal Groups in Vector Representation

Description

Class for the special orthogonal groups \mathrm{SO}(\{2,3\}) in vector form, i.e. the Lie groups of planar and 3D rotations. This class is specific to the vector representation of rotations. For the matrix representation, use the SpecialOrthogonal class and set n = 2 or n = 3.

Super classes

rgeomstats::PythonClass -> rgeomstats::Manifold -> rgeomstats::LieGroup -> SpecialOrthogonalVectors

Public fields

n

An integer value specifying the number of rows and columns of the matrices.

epsilon

A numeric value specifying the precision to use for calculations involving potential divison by 0 in rotations.

Methods

Public methods

Inherited methods

Method new()

The SpecialOrthogonalVectors class constructor.

Usage
SpecialOrthogonalVectors$new(n, epsilon = 0, py_cls = NULL)
Arguments
n

An integer value specifying the number of rows and columns of the matrices.

epsilon

A numeric value specifying the precision to use for calculations involving potential divison by 0 in rotations. Defaults to 0.

py_cls

A Python object of class SpecialOrthogonalVectors. Defaults to NULL in which case it is instantiated on the fly using the other input arguments.

Returns

An object of class SpecialOrthogonalVectors.


Method projection()

Projects a matrix on \mathrm{SO}(2) or \mathrm{SO}(3) using the Frobenius norm.

Usage
SpecialOrthogonalVectors$projection(point)
Arguments
point

A numeric array of shape [… \times n \times n] specifying one or more matrices to be projected.

Returns

A numeric array of the same shape as the input point storing the projected matrices.

Examples
if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$projection(diag(1, 2))
}

Method skew_matrix_from_vector()

Gets the skew-symmetric matrix derived from the vector. In 3D, computes the skew-symmetric matrix, known as the cross-product of a vector, associated to the vector vec.

Usage
SpecialOrthogonalVectors$skew_matrix_from_vector(vec)
Arguments
vec

A numeric array of shape [… \times \mathrm{dim}] specifying one or more vectors from which to compute corresponding skew matrix representations.

Returns

A numeric array of shape [… \times n \times n] storing the corresponding skew matrix representations.

Examples
if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$skew_matrix_from_vector(array(0))
}

Method vector_from_skew_matrix()

Derives a vector from the skew-symmetric matrix. In 3D, computes the vector defining the cross-product associated to a skew-symmetric matrix.

Usage
SpecialOrthogonalVectors$vector_from_skew_matrix(skew_mat)
Arguments
skew_mat

A numeric array of shape [… \times n \times n] specifying skew matrices.

Returns

A numeric array of shape [… \times \mathrm{dim}] storing the corresponding vector representations.

Examples
if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$vector_from_skew_matrix(diag(0, 2))
}

Method regularize_tangent_vec_at_identity()

Regularizes a tangent vector at the identity. In 2D, regularizes a tangent vector by getting its norm at the identity to be less than π.

Usage
SpecialOrthogonalVectors$regularize_tangent_vec_at_identity(
  tangent_vec,
  metric = NULL
)
Arguments
tangent_vec

A numeric array of shape [… \times 1] specifying one or more tangent vectors at base point.

metric

An object of class RiemannianMetric specifying the metric to compute the norm of the tangent vector or NULL. If it is set to NULL, it defaults to using the Euclidean metric.

Returns

A numeric array of shape [… \times 1] storing the regularized tangent vector(s).

Examples
if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$regularize_tangent_vec_at_identity(array(0))
}

Method regularize_tangent_vec()

Regularizes a tangent vector at a base point. In 2D, regularizes a tangent vector by getting the norm of its parallel transport to the identity, determined by the metric, to be less than π.

Usage
SpecialOrthogonalVectors$regularize_tangent_vec(
  tangent_vec,
  base_point,
  metric = NULL
)
Arguments
tangent_vec

A numeric array of shape [… \times 1] specifying one or more tangent vectors at corresponding base points.

base_point

A numeric array of shape [… \times 1] specifying one or more points on the manifold.

metric

An object of class RiemannianMetric specifying the metric to compute the norm of the tangent vector or NULL. If it is set to NULL, it defaults to using the Euclidean metric.

Returns

A numeric array of shape [… \times 1] storing the regularized tangent vector(s).

Examples
if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$regularize_tangent_vec(array(0), array(1))
}

Method clone()

The objects of this class are cloneable with this method.

Usage
SpecialOrthogonalVectors$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Nicolas Guigui and Nina Miolane

Examples


## ------------------------------------------------
## Method `SpecialOrthogonalVectors$projection`
## ------------------------------------------------

if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$projection(diag(1, 2))
}

## ------------------------------------------------
## Method `SpecialOrthogonalVectors$skew_matrix_from_vector`
## ------------------------------------------------

if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$skew_matrix_from_vector(array(0))
}

## ------------------------------------------------
## Method `SpecialOrthogonalVectors$vector_from_skew_matrix`
## ------------------------------------------------

if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$vector_from_skew_matrix(diag(0, 2))
}

## ------------------------------------------------
## Method `SpecialOrthogonalVectors$regularize_tangent_vec_at_identity`
## ------------------------------------------------

if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$regularize_tangent_vec_at_identity(array(0))
}

## ------------------------------------------------
## Method `SpecialOrthogonalVectors$regularize_tangent_vec`
## ------------------------------------------------

if (reticulate::py_module_available("geomstats")) {
  so2 <- SpecialOrthogonal(n = 2, point_type = "vector")
  so2$regularize_tangent_vec(array(0), array(1))
}

rgeomstats documentation built on Nov. 4, 2022, 5:09 p.m.