geometry.manifolds package

Submodules

geometry.manifolds.differentiable_manifold module

class geometry.manifolds.differentiable_manifold.DifferentiableManifold(dimension)[source]

Bases: object

This is the base class for differentiable manifolds.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs(x) Raises an Exception if the point does not belong to this manifold.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
expmap(bv) Computes the exponential map from base for the velocity vector v.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
interesting_points() Returns a list of “interesting points” on this manifold that should be used for testing various properties.
logmap(base, p) Computes the logarithmic map from base point base to target b.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
project_ts(bv) Projects a vector bv in the ambient space to the tangent space at point base.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
isomorphism  
project_to  
relations_descriptions  
to_yaml  
assert_close(a, b, atol=1e-08, msg=None)[source]

Asserts that two points on the manifold are close to the given tolerance.

belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

belongs_ts(bv)[source]

Checks that a vector vx belongs to the tangent space at the given point base.

can_convert_to(manifold)[source]
can_represent(manifold)[source]
convert_to(m, my_point)[source]
distance(a, b)[source]

Computes the geodesic distance between two points.

embed_in(M, my_point)[source]

Embeds a point on this manifold to the target manifold M.

embeddable_in(manifold)[source]
static embedding(B, A_to_B, B_to_A, itype='user', steps=None, desc=None)[source]
expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

from_yaml(yaml_structure)[source]

Recovers a value from a Yaml structure.

geodesic(a, b, t)[source]

Returns the point interpolated along the geodesic.

get_dimension()[source]

Returns the intrinsic dimension of this manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

static isomorphism(B, A_to_B, B_to_A, itype='user', steps=None, desc=None)[source]
logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

normalize(a)[source]

Normalizes the coordinates to the canonical representation for this manifold. See TorusW.

project_from(M, his_point)[source]

Projects a point on a bigger manifold to this manifold.

project_to(m, my_point)[source]
project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

relations_descriptions()[source]
riemannian_mean(points)[source]

TODO: work out exceptions

tangent_bundle()[source]

Returns the manifold corresponding to the tangent bundle. The default gives a generic implementation. MatrixLieGroup have a different one.

to_yaml(x)[source]
class geometry.manifolds.differentiable_manifold.RandomManifold(dimension)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

This is the base class for manifolds that have the ability to sample random points.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs(x) Raises an Exception if the point does not belong to this manifold.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
expmap(bv) Computes the exponential map from base for the velocity vector v.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
interesting_points() Returns a list of “interesting points” on this manifold that should be used for testing various properties.
logmap(base, p) Computes the logarithmic map from base point base to target b.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
project_ts(bv) Projects a vector bv in the ambient space to the tangent space at point base.
riemannian_mean(points) TODO: work out exceptions
sample_uniform() Samples a random point in this manifold according to the Haar measure.
sample_velocity(a) Samples a random velocity with length 1 at the base point a
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
isomorphism  
project_to  
relations_descriptions  
to_yaml  
sample_uniform()[source]

Samples a random point in this manifold according to the Haar measure. Raises exception if the measure is improper (e.g., R^n).

sample_velocity(a)[source]

Samples a random velocity with length 1 at the base point a

geometry.manifolds.embedding_relations module

geometry.manifolds.embedding_relations.S1_from_T1(b)[source]
geometry.manifolds.embedding_relations.SO2_from_T1(x)[source]
geometry.manifolds.embedding_relations.T1_from_S1(a)[source]
geometry.manifolds.embedding_relations.T1_from_SO2(y)[source]
geometry.manifolds.embedding_relations.embedding(small, big, embed_in, project_from, desc=None)[source]
geometry.manifolds.embedding_relations.identity(x)[source]
geometry.manifolds.embedding_relations.isomorphism(A, B, a_to_b, b_to_a, desc=None)[source]
geometry.manifolds.embedding_relations.tran1_project_from_tran2(b)[source]
geometry.manifolds.embedding_relations.tran2_from_tran1(b)[source]
geometry.manifolds.embedding_relations.tran2_project_from_se2(b)[source]
geometry.manifolds.embedding_relations.tran3_project_from_se3(b)[source]

geometry.manifolds.euclidean module

class geometry.manifolds.euclidean.Euclidean(dimension)[source]

Bases: geometry.manifolds.matrix_linear_space.MatrixLinearSpace

This is the usual Euclidean space of finite dimension; this is mostly used for debugging.

There is no proper Haar measure; as an arbitrary choice, the sample_uniform() returns a sample from a Gaussian distribution centered at 0.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
norm(v) Return the norm of a vector in the algebra.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
zero() Returns the zero element for this algebra.
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
interesting_points  
isomorphism  
logmap  
normalize  
project  
project_to  
project_ts  
relations_descriptions  
riemannian_mean  
sample_uniform  
to_yaml  
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

normalize(a)[source]

Normalizes the coordinates to the canonical representation for this manifold. See TorusW.

project(x)[source]

Projects a vector onto this Lie Algebra.

riemannian_mean(points)[source]

TODO: work out exceptions

sample_uniform()[source]

geometry.manifolds.exceptions module

exception geometry.manifolds.exceptions.DoesNotBelong(M, point, e, context=None)[source]

Bases: exceptions.Exception

Exception thrown when a point does not belong to a certain manifold M.

geometry.manifolds.group module

class geometry.manifolds.group.Group[source]

Bases: object

Methods

inverse(g) Implements the group inversion.
multiply(g, h) Implements the group operation.
unity() Returns the group unity.
identity  
identity()[source]
inverse(g)[source]

Implements the group inversion.

multiply(g, h)[source]

Implements the group operation.

unity()[source]

Returns the group unity.

geometry.manifolds.manifold_embedding_propagation module

geometry.manifolds.manifold_embedding_propagation.compute_manifold_relations(manifolds)[source]

geometry.manifolds.manifold_relations module

class geometry.manifolds.manifold_relations.ManifoldRelations[source]

Bases: object

Methods

set_embedding(B, em)
set_projection(B, proj)
all_embeddings  
all_isomorphisms  
all_projections  
exists_embedding  
exists_isomorphism  
exists_projection  
get_embedding  
get_isomorphism  
get_projection  
project  
relations_descriptions  
set_isomorphism  
static all_embeddings()[source]
static all_isomorphisms()[source]
static all_projections()[source]
static exists_embedding(B)[source]
static exists_isomorphism(B)[source]
static exists_projection(B)[source]
static get_embedding(B)[source]
static get_isomorphism(B)[source]
static get_projection(B)[source]
static project(B, a_point)[source]
static relations_descriptions()[source]
static set_embedding(B, em)[source]
static set_isomorphism(B, iso)[source]
static set_projection(B, proj)[source]
class geometry.manifolds.manifold_relations.Isomorphism

Bases: tuple

Attributes:
A

Alias for field number 0

A_to_B

Alias for field number 2

B

Alias for field number 1

B_to_A

Alias for field number 3

desc

Alias for field number 6

steps

Alias for field number 4

type

Alias for field number 5

Methods

count(value)
index(value, [start, [stop]]) Raises ValueError if the value is not present.
A

Alias for field number 0

A_to_B

Alias for field number 2

B

Alias for field number 1

B_to_A

Alias for field number 3

desc

Alias for field number 6

steps

Alias for field number 4

type

Alias for field number 5

class geometry.manifolds.manifold_relations.Embedding

Bases: tuple

Attributes:
A

Alias for field number 0

A_to_B

Alias for field number 2

B

Alias for field number 1

B_to_A

Alias for field number 3

desc

Alias for field number 6

steps

Alias for field number 4

type

Alias for field number 5

Methods

count(value)
index(value, [start, [stop]]) Raises ValueError if the value is not present.
A

Alias for field number 0

A_to_B

Alias for field number 2

B

Alias for field number 1

B_to_A

Alias for field number 3

desc

Alias for field number 6

steps

Alias for field number 4

type

Alias for field number 5

geometry.manifolds.matrix_lie_algebra module

class geometry.manifolds.matrix_lie_algebra.MatrixLieAlgebra(n, dimension)[source]

Bases: geometry.manifolds.matrix_linear_space.MatrixLinearSpace

This is the base class for Matrix Lie Algebra.

It is understood that it is composed by square matrices.

The only function that has to be implemented is the project() function that projects a square matrix onto the algebra. This function is used both for checking that a vector is in the algebra (see belongs()) and to mitigate the numerical errors.

You probably also want to implement norm() if the default is not what you want.

Methods

algebra_from_vector(v) Isomorphism from elements of the algebra to vectors.
assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
interesting_points() Returns a list of “interesting points” on this manifold that should be used for testing various properties.
norm(v) Return the norm of a vector in the algebra.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project(v) Projects a vector onto this Lie Algebra.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
vector_from_algebra(a) Isomorphism from elements of the algebra to vectors.
zero() Returns the zero element for this algebra.
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
to_yaml  
algebra_from_vector(v)[source]

Isomorphism from elements of the algebra to vectors. (For example, so(3) <==> R^3).

vector_from_algebra(a)[source]

Isomorphism from elements of the algebra to vectors. (For example, so(3) <==> R^3).

geometry.manifolds.matrix_lie_group module

class geometry.manifolds.matrix_lie_group.MatrixLieGroup(n, dimension, algebra)[source]

Bases: geometry.manifolds.group.Group, geometry.manifolds.differentiable_manifold.DifferentiableManifold

This is the base class for matrix Lie groups.

Subclasses should provide a MatrixLieAlgebra object. Given the Lie algebra, we can compute everything. However, subclasses can choose to overload some functions if they know a more numerically stable implementation.

Methods

algebra_from_group(g) Converts an element of the group to the algebra.
assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs(x) Raises an Exception if the point does not belong to this manifold.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
expmap(bv) This is the inverse of logmap_().
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_algebra() Returns the interface to the corresponding Lie algebra.
get_dimension() Returns the intrinsic dimension of this manifold.
group_from_algebra(a) Converts an element of the algebra to the group.
interesting_points() Returns a list of “interesting points” on this manifold that should be used for testing various properties.
logmap(base, p) Returns the direction from base to target.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
project_ts(bv) Projects the vector x to the tangent space at point base.
riemannian_mean(points) TODO: work out exceptions
velocity_from_points(a, b[, delta]) Find the velocity in local frame to go from a to b in delta time.
belongs_algebra  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
identity  
inverse  
isomorphism  
multiply  
project_to  
relations_descriptions  
tangent_bundle  
to_yaml  
unity  
algebra_from_group(g)[source]

Converts an element of the group to the algebra. Uses generic matrix logarithm plus projection.

belongs_algebra(x)[source]
distance(a, b)[source]

Computes the distance between two points.

In the case of Lie groups, this is done by translating everything to the origin, computing the logmap, and using the norm defined in the Lie Algebra object.

expmap(bv)[source]

This is the inverse of logmap_().

In the case of Lie groups, this is implemented using the usual matrix exponential.

Here the MatrixLieAlgebra.project() function is used to mitigate numerical errors.

get_algebra()[source]

Returns the interface to the corresponding Lie algebra.

group_from_algebra(a)[source]

Converts an element of the algebra to the group.

Uses generic matrix exponential.

inverse(g)[source]

Implements the group inversion.

logmap(base, p)[source]

Returns the direction from base to target.

In the case of Lie groups, this is implemented by using the usual matrix logarithm at the origin.

Here the MatrixLieAlgebra.project() function is used to mitigate numerical errors.

multiply(g, h)[source]

Implements the group operation.

project_ts(bv)[source]

Projects the vector x to the tangent space at point base.

In the case of Lie Groups, we do this by translating the vector to the origin, projecting it to the Lie Algebra, and then translating it back.

tangent_bundle()[source]

Returns the manifold corresponding to the tangent bundle. The default gives a generic implementation. MatrixLieGroup have a different one.

unity()[source]

Returns the group unity.

velocity_from_points(a, b, delta=1)[source]

Find the velocity in local frame to go from a to b in delta time.

geometry.manifolds.matrix_lie_group_tangent module

class geometry.manifolds.matrix_lie_group_tangent.MatrixLieGroupTangent(base_group)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

This class represents the tangent bundle of a matrix Lie group using a tuble (base, v0), where v0 is in the algebra.

Compare with the generic TangentBundle that uses the representation (base, vel) where vel is tangent at base (it holds that vel=base*v0).

(MatrixLieGroup has different representation)

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
interesting_points  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
to_yaml  
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

belongs_ts(bv)[source]

Checks that a vector vx belongs to the tangent space at the given point base.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

geometry.manifolds.matrix_linear_space module

class geometry.manifolds.matrix_linear_space.MatrixLinearSpace(dimension, shape)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
interesting_points() Returns a list of “interesting points” on this manifold that should be used for testing various properties.
norm(v) Return the norm of a vector in the algebra.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project(v) Projects a vector onto this Lie Algebra.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
zero() Returns the zero element for this algebra.
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
to_yaml  
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

belongs_ts(bv)[source]

Checks that a vector vx belongs to the tangent space at the given point base.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

norm(v)[source]

Return the norm of a vector in the algebra. This is used in MatrixLieGroup to measure distances between points in the Lie group.

project(v)[source]

Projects a vector onto this Lie Algebra.

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

zero()[source]

Returns the zero element for this algebra.

geometry.manifolds.point_set module

class geometry.manifolds.point_set.PointSet(manifold, points=[])[source]

Bases: object

A set of points on a differentiable manifold.

Methods

average() Returns the average point
centroid() REturns the point which is closest to the average
get_points() returns an iterable
add  
centroid_index  
closest_index_to  
distances_to_point  
is_closer_than  
minimum_distance  
add(p)[source]
average()[source]

Returns the average point

centroid()[source]

REturns the point which is closest to the average

centroid_index()[source]
closest_index_to(p)[source]
distances_to_point(p)[source]
get_points()[source]

returns an iterable

is_closer_than(p, min_dist)[source]
minimum_distance(p)[source]

geometry.manifolds.product_manifold module

class geometry.manifolds.product_manifold.ProductManifold(components, weights=None)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
interesting_points() Returns a list of “interesting points” on this manifold that should be used for testing various properties.
logmap(base, p) Computes the logarithmic map from base point a to target b.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
isomorphism  
project_to  
project_ts  
relations_descriptions  
to_yaml  
belongs(a)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

logmap(base, p)[source]

Computes the logarithmic map from base point a to target b.

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

geometry.manifolds.special_euclidean_algebra module

class geometry.manifolds.special_euclidean_algebra.se_algebra(N, alpha)[source]

Bases: geometry.manifolds.matrix_lie_algebra.MatrixLieAlgebra

This is the Lie algebra se(n) for the Special Euclidean group SE(n).

Note that you have to supply a coefficient alpha that weights rotation and translation when defining distances.

Methods

algebra_from_vector(v) Note that the first element is (omega, vx, vy) or (w1,w2,w3,vx,vy,vz)
algebra_from_velocities(avel, lvel) A convenience function that builds an element of the algebra from linear/angular velocities.
assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
vector_from_algebra(a) Note that it returns (omega, vx, vy) or (w1,w2,w3,vx,vy,vz)
zero() Returns the zero element for this algebra.
algebra_from_velocities_2d  
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
interesting_points  
isomorphism  
logmap  
norm  
project  
project_to  
project_ts  
relations_descriptions  
to_yaml  
algebra_from_vector(v)[source]

Note that the first element is (omega, vx, vy) or (w1,w2,w3,vx,vy,vz)

algebra_from_velocities(avel, lvel)[source]

A convenience function that builds an element of the algebra from linear/angular velocities.

algebra_from_velocities_2d(avel, lvel)[source]
interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

norm(X)[source]

Return the norm of a vector in the algebra. This is used in MatrixLieGroup to measure distances between points in the Lie group.

project(X)[source]

Projects a vector onto this Lie Algebra.

vector_from_algebra(a)[source]

Note that it returns (omega, vx, vy) or (w1,w2,w3,vx,vy,vz)

geometry.manifolds.special_euclidean_group module

class geometry.manifolds.special_euclidean_group.SE_group(N)[source]

Bases: geometry.manifolds.matrix_lie_group.MatrixLieGroup

This is the Special Euclidean group SE(n) describing roto-translations of Euclidean space. Implemented only for n=2,3.

Note that you have to supply a coefficient alpha that weights rotation and translation when defining distances.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the distance between two points.
distances(a, b) Returns linear, angular distance.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
expmap(bv) This is the inverse of logmap_().
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_algebra() Returns the interface to the corresponding Lie algebra.
get_dimension() Returns the intrinsic dimension of this manifold.
group_from_algebra(a) Converts an element of the algebra to the group.
logmap(base, p) Returns the direction from base to target.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
project_ts(bv) Projects the vector x to the tangent space at point base.
riemannian_mean(points) TODO: work out exceptions
velocity_from_points(a, b[, delta]) Find the velocity in local frame to go from a to b in delta time.
algebra_from_group  
belongs  
belongs_algebra  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
friendly  
identity  
interesting_points  
inverse  
isomorphism  
multiply  
norm  
project_to  
relations_descriptions  
sample_uniform  
tangent_bundle  
to_yaml  
unity  
algebra_from_group(g)[source]

Converts an element of the group to the algebra. Uses generic matrix logarithm plus projection.

belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distances(a, b)[source]

Returns linear, angular distance.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

group_from_algebra(a)[source]

Converts an element of the algebra to the group.

Uses generic matrix exponential.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

norm(X)[source]
sample_uniform()[source]

geometry.manifolds.special_orthogonal_algebra module

class geometry.manifolds.special_orthogonal_algebra.so_algebra(n)[source]

Bases: geometry.manifolds.matrix_lie_algebra.MatrixLieAlgebra

This is the Lie algebra of skew-symmetric matrices so(n), for the Special Orthogonal group SO(n).

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
norm(v) Return the norm of a vector in the algebra.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project(v) Projects v to the closest skew-symmetric matrix.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
zero() Returns the zero element for this algebra.
algebra_from_vector  
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
interesting_points  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
to_yaml  
vector_from_algebra  
algebra_from_vector(v)[source]

Isomorphism from elements of the algebra to vectors. (For example, so(3) <==> R^3).

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

project(v)[source]

Projects v to the closest skew-symmetric matrix.

vector_from_algebra(a)[source]

Isomorphism from elements of the algebra to vectors. (For example, so(3) <==> R^3).

geometry.manifolds.special_orthogonal_group module

class geometry.manifolds.special_orthogonal_group.SO_group(N)[source]

Bases: geometry.manifolds.matrix_lie_group.MatrixLieGroup

This is the Special Orthogonal group SO(n) describing rotations of Euclidean space; implemented for n=2,3.

TODO: do SO2 and SO3 separately

Methods

algebra_from_group(g) Converts an element of the group to the algebra.
assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
expmap(bv) This is the inverse of logmap_().
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_algebra() Returns the interface to the corresponding Lie algebra.
get_dimension() Returns the intrinsic dimension of this manifold.
group_from_algebra(a) Converts an element of the algebra to the group.
logmap(base, p) Returns the direction from base to target.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
project_ts(bv) Projects the vector x to the tangent space at point base.
riemannian_mean(points) TODO: work out exceptions
velocity_from_points(a, b[, delta]) Find the velocity in local frame to go from a to b in delta time.
belongs  
belongs_algebra  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
friendly  
identity  
interesting_points  
inverse  
isomorphism  
multiply  
project_to  
relations_descriptions  
sample_uniform  
tangent_bundle  
to_yaml  
unity  
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

sample_uniform()[source]

geometry.manifolds.sphere module

class geometry.manifolds.sphere.Sphere(order)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

These are hyperspheres of unit radius.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
friendly  
interesting_points  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
sample_uniform  
to_yaml  
atol_geodesic_distance = 1e-08
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

norm_rtol = 1e-05
project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

sample_uniform()[source]
class geometry.manifolds.sphere.Sphere1[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
friendly  
interesting_points  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
sample_uniform  
to_yaml  
atol_geodesic_distance = 1e-08
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

norm_rtol = 1e-05
project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

sample_uniform()[source]

geometry.manifolds.square module

class geometry.manifolds.square.Square(n)[source]

Bases: geometry.manifolds.differentiable_manifold.RandomManifold

A cube/square in [0, 1]. All points in R^n belong to the torus.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
friendly  
interesting_points  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
sample_uniform  
sample_velocity  
to_yaml  
belongs(a)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

sample_uniform()[source]

Samples a random point in this manifold according to the Haar measure. Raises exception if the measure is improper (e.g., R^n).

sample_velocity(a)[source]

Samples a random velocity with length 1 at the base point a

geometry.manifolds.tangent_bundle module

class geometry.manifolds.tangent_bundle.TangentBundle(base_manifold)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

This class represents the tangent bundle of a generic manifold using a tuple (base, vel) where vel is tangent at base.

(MatrixLieGroup has different representation)

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
interesting_points  
isomorphism  
logmap  
project_to  
project_ts  
relations_descriptions  
to_yaml  
belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

belongs_ts(bv)[source]

Checks that a vector vx belongs to the tangent space at the given point base.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

geometry.manifolds.torus module

class geometry.manifolds.torus.Torus(n)[source]

Bases: geometry.manifolds.differentiable_manifold.DifferentiableManifold

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
friendly  
interesting_points  
isomorphism  
logmap  
normalize  
project_to  
project_ts  
relations_descriptions  
sample_uniform  
to_yaml  
belongs(a)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

normalize(a)[source]

Normalizes the coordinates to the canonical representation for this manifold. See TorusW.

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

sample_uniform()[source]

geometry.manifolds.torus01 module

class geometry.manifolds.torus01.TorusW(widths, normalize_bias=None)[source]

Bases: geometry.manifolds.differentiable_manifold.RandomManifold

This is a torus whose coordinates wrap around in [0, W). All points in R^n belong to the torus.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
friendly  
interesting_points  
isomorphism  
logmap  
normalize  
project_to  
project_ts  
relations_descriptions  
sample_uniform  
sample_velocity  
to_yaml  
belongs(a)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

normalize(a)[source]

Normalizes the coordinates to the canonical representation for this manifold. See TorusW.

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

sample_uniform()[source]

Samples a random point in this manifold according to the Haar measure. Raises exception if the measure is improper (e.g., R^n).

sample_velocity(a)[source]

Samples a random velocity with length 1 at the base point a

class geometry.manifolds.torus01.TorusW(widths, normalize_bias=None)[source]

Bases: geometry.manifolds.differentiable_manifold.RandomManifold

This is a torus whose coordinates wrap around in [0, W). All points in R^n belong to the torus.

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
belongs  
can_convert_to  
can_represent  
convert_to  
distance  
embeddable_in  
embedding  
expmap  
friendly  
interesting_points  
isomorphism  
logmap  
normalize  
project_to  
project_ts  
relations_descriptions  
sample_uniform  
sample_velocity  
to_yaml  
belongs(a)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

distance(a, b)[source]

Computes the geodesic distance between two points.

expmap(bv)[source]

Computes the exponential map from base for the velocity vector v.

This function wraps some checks around expmap_(), which is implemented by the subclasses.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Computes the logarithmic map from base point base to target b. # XXX: what should we do in the case there is more than one logmap?

normalize(a)[source]

Normalizes the coordinates to the canonical representation for this manifold. See TorusW.

project_ts(bv)[source]

Projects a vector bv in the ambient space to the tangent space at point base.

sample_uniform()[source]

Samples a random point in this manifold according to the Haar measure. Raises exception if the measure is improper (e.g., R^n).

sample_velocity(a)[source]

Samples a random velocity with length 1 at the base point a

geometry.manifolds.translation_algebra module

class geometry.manifolds.translation_algebra.trana(n)[source]

Bases: geometry.manifolds.matrix_lie_algebra.MatrixLieAlgebra

lie algebra for translation

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
distance(a, b) Computes the geodesic distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
friendly(a) Returns a friendly description string for a point on the manifold.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
riemannian_mean(points) TODO: work out exceptions
tangent_bundle() Returns the manifold corresponding to the tangent bundle.
zero() Returns the zero element for this algebra.
algebra_from_vector  
belongs  
belongs_ts  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
interesting_points  
isomorphism  
logmap  
norm  
project  
project_to  
project_ts  
relations_descriptions  
to_yaml  
vector_from_algebra  
algebra_from_vector(v)[source]

Isomorphism from elements of the algebra to vectors. (For example, so(3) <==> R^3).

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

norm(X)[source]

Return the norm of a vector in the algebra. This is used in MatrixLieGroup to measure distances between points in the Lie group.

project(X)[source]

Projects a vector onto this Lie Algebra.

vector_from_algebra(a)[source]

Isomorphism from elements of the algebra to vectors. (For example, so(3) <==> R^3).

geometry.manifolds.translation_group module

class geometry.manifolds.translation_group.TranG(n)[source]

Bases: geometry.manifolds.matrix_lie_group.MatrixLieGroup

The translation subgroup of SE(n).

Methods

assert_close(a, b[, atol, msg]) Asserts that two points on the manifold are close to the given tolerance.
belongs_ts(bv) Checks that a vector vx belongs to the tangent space at the given point base.
distance(a, b) Computes the distance between two points.
embed_in(M, my_point) Embeds a point on this manifold to the target manifold M.
from_yaml(yaml_structure) Recovers a value from a Yaml structure.
geodesic(a, b, t) Returns the point interpolated along the geodesic.
get_algebra() Returns the interface to the corresponding Lie algebra.
get_dimension() Returns the intrinsic dimension of this manifold.
normalize(a) Normalizes the coordinates to the canonical representation for this manifold.
project_from(M, his_point) Projects a point on a bigger manifold to this manifold.
project_ts(bv) Projects the vector x to the tangent space at point base.
riemannian_mean(points) TODO: work out exceptions
velocity_from_points(a, b[, delta]) Find the velocity in local frame to go from a to b in delta time.
algebra_from_group  
belongs  
belongs_algebra  
can_convert_to  
can_represent  
convert_to  
embeddable_in  
embedding  
expmap  
friendly  
group_from_algebra  
identity  
interesting_points  
inverse  
isomorphism  
logmap  
multiply  
project_to  
relations_descriptions  
sample_uniform  
tangent_bundle  
to_yaml  
unity  
algebra_from_group(g)[source]

Converts an element of the group to the algebra. Uses generic matrix logarithm plus projection.

belongs(x)[source]

Raises an Exception if the point does not belong to this manifold.

This function wraps some checks around belongs_(), which is implemented by the subclasses.

expmap(bv)[source]

This is the inverse of logmap_().

In the case of Lie groups, this is implemented using the usual matrix exponential.

Here the MatrixLieAlgebra.project() function is used to mitigate numerical errors.

friendly(a)[source]

Returns a friendly description string for a point on the manifold.

group_from_algebra(a)[source]

Converts an element of the algebra to the group.

Uses generic matrix exponential.

interesting_points()[source]

Returns a list of “interesting points” on this manifold that should be used for testing various properties.

logmap(base, p)[source]

Returns the direction from base to target.

In the case of Lie groups, this is implemented by using the usual matrix logarithm at the origin.

Here the MatrixLieAlgebra.project() function is used to mitigate numerical errors.

sample_uniform()[source]

Module contents