Source code for geometry.manifolds.group
from abc import abstractmethod
from contracts import ContractsMeta
__all__ = ['Group']
[docs]class Group(object):
__metaclass__ = ContractsMeta
[docs] @abstractmethod
def multiply(self, g, h):
''' Implements the group operation. '''
pass
[docs] @abstractmethod
def inverse(self, g):
''' Implements the group inversion. '''
pass
[docs] @abstractmethod
def unity(self):
''' Returns the group unity. '''
pass
[docs] def identity(self):
return self.unity()