The ImageLeftAction class
Adapter for computing the image of a point under a left action.
This class provides a call operator with signature (pt: Point, x: Element) ->
Point
, returning the image of the point pt under the left action of the
element x.
>>> from libsemigroups_pybind11 import PPerm, ImageLeftAction
>>> x = PPerm([0, 1, 2, 3, 5, 6, 9], [9, 7, 3, 5, 4, 2, 1], 10)
>>> pt = PPerm([0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 6], 10)
>>> func = ImageLeftAction(point=pt, element=x)
>>> func(pt, x)
PPerm([2, 3, 6, 9], [2, 3, 6, 9], 10)
Contents
Adapter for computing the image of a point under a left action. |
|
Return the image of a point acted on by an element. |
Full API
- class ImageLeftAction
- __init__(self: Self, *args, point: Point = None, element: Element = None) None
Construct from sample element and sample point.
- Keyword Arguments:
element (Element) – a sample element.
point (Point) – a sample point.
- Raises:
KeyError – if the action defined by the arguments is not defined.
- __call__(self: ImageLeftAction, pt: Point, x: Element) Point
Return the image of a point acted on by an element.
This call operator returns the image of pt acted on by x.
- Parameters:
pt (Point) – the point on which to act.
x (Element) – the element doing the acting.
- Returns:
The image of pt acted on by x.
- Return type:
Point
- Raises:
TypeError – If the wrapped C++ type of the sample objects passed via x and point are not the same as the wrapped types of the arguments in any invocation of the call operator. For example, if point is
PPerm([], [], 256)
, then the underlying C++ type uses 8-bit integers to store image values. So, any partial permutation passed as the 1st argument to the call operator must be of degree at most256
.