symforce.ops.interfaces.group module#

class Group[source]#

Bases: Storage

Interface for objects that implement the group concept. Because this class is registered using symforce.ops.impl.class_group_ops.ClassGroupOps (see bottom of this file), any object that inherits from Group and that implements the functions defined in this class can be used with the GroupOps concept.

Because Group is a subclass of storage.Storage, objects inheriting from Group must also implement the functions defined in Storage (e.g. storage_dim, to_storage, etc.), and can also be used with StorageOps.

GroupT = ~GroupT#
classmethod identity()[source]#

Identity element such that compose(a, identity) = a.

Return type:

GroupT

compose(other)[source]#

Apply the group operation with other.

Parameters:
  • self (GroupT) –

  • other (GroupT) –

Return type:

GroupT

inverse()[source]#

Group inverse, such that compose(a, inverse(a)) = identity.

Parameters:

self (GroupT) –

Return type:

GroupT

between(b)[source]#

Returns the element that when composed with self produces b. For vector spaces it is b - self.

Implementation is simply compose(inverse(self), b).

Parameters:
  • self (GroupT) –

  • b (GroupT) –

Return type:

GroupT