8.3 CycleLength

CycleLength( g, d )
CycleLength( g, d, operation )

CycleLength returns the length of the orbit of the point d, which may be an object of arbitrary type, under the group elements g. See Cycle for the definition of cycles.

CycleLength accepts a function operation of two arguments d and g as optional third argument, which specifies how the group element g operates (see Other Operations).

    gap> CycleLength( (1,5,3,8)(4,6,7), 3 );
    4
    gap> CycleLength( (1,5,3,8)(4,6,7), [3,4], OnPairs );
    12 

CycleLength calls
Domain([g]).operations.CycleLength( 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.CycleLength, 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.

Previous Up Top Next
Index

GAP 3.4.4
April 1997