CycleLengths( g, D )
CycleLengths( g, D, operation )
CycleLengths returns a list of the lengths of the cycles of the group
element g on the domain D, which must be a list of points of
arbitrary type. See Cycle for the definition of cycles.
It is allowed that D is a proper subset of a domain, i.e., that D is not invariant under the operation of g. In this case D is silently replaced by the smallest superset of D which is invariant.
The ordering of the lengths of cycles in the list returned by
CycleLengths corresponds to the list of cycles returned by Cycles,
which is ordered with respect to the smallest point in each cycle.
CycleLengths 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> CycleLengths( (1,5,3,8)(4,6,7), [3,5,7] );
[ 4, 3 ]
gap> CycleLengths( (1,5,3,8)(4,6,7), [[1,3],[4,6]], OnPairs );
[ 4, 3 ]
CycleLengths calls
Domain([g]).operations.CycleLengths( 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.CycleLengths,
which takes elements from D, computes their orbit, removes all points
in the orbit from D, and repeats this until D has been emptied.
Special categories of group elements overlay this default function with
more efficient functions.
GAP 3.4.4