next up previous contents index
suivant: Product of two permutations monter: Permutations précédent: Checking for a permutation   Table des matières   Index


Checking for a cycle : is_cycle

is_cycle is a boolean function.
is_cycle takes a list as argument.
is_cycle returns 1 if the argument is a cycle and returns 0 if the argument is not a cycle.
Input :
is_cycle([2,1,3])
Output :
1
Input :
is_cycle([2,1,3,2])
Output :
0



giac documentation written by Renée De Graeve and Bernard Parisse