Cycle( g, d )
Cycle( g, d, operation )
Cycle returns the orbit of the point d, which may be
an object of arbitrary type, under the group element g as a list
of points.
The points e in the cycle of d under the group element g are those for which a power g^i exists such that d^(g^i) = e.
The first point in the list returned by Cycle is the point d
itself, the ordering of the other points is such that each point is the image
of the previous point.
Cycle accepts a function operation of two arguments
d and g as optional third argument, which specifies how
the element g operates (see Other Operations).
gap> Cycle( (1,5,3,8)(4,6,7), 3 );
[ 3, 8, 1, 5 ]
gap> Cycle( (1,5,3,8)(4,6,7), [3,4], OnPairs );
[ [ 3, 4 ], [ 8, 6 ], [ 1, 7 ], [ 5, 4 ], [ 3, 6 ], [ 8, 7 ],
[ 1, 4 ], [ 5, 6 ], [ 3, 7 ], [ 8, 4 ], [ 1, 6 ], [ 5, 7 ] ]
Cycle calls
Domain([g]).operations.Cycle(
g, d, operation )
and returns
the value. Note that the third argument is not optional for the functions
called this way.
The default function called this way is GroupElementsOps.Cycle,
which starts with d and applies g to the last point
repeatedly until d is reached again. Special categories of group
elements overlay this default function with more efficient functions.