The order of a permutation
Returns the order of a permutation P: the smallest strictly positive integer n for which P^n is the identity.
permorder(x, singly = TRUE)
x |
Permutation, coerced to |
singly |
Boolean, with default |
Coerces its argument to cycle form.
The order of the identity permutation is 1.
Uses mLCM()
from the numbers
package.
Robin K. S. Hankin
x <- rperm(5,20) permorder(x) permorder(x,FALSE) stopifnot(all(is.id(x^permorder(x)))) stopifnot(is.id(x^permorder(x,FALSE)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.