Shape of a permutation
Returns the shape of a permutation. If given a word, it coerces to cycle form.
shape(x, drop = TRUE,id1=TRUE) shape_cyclist(cyc,id1=TRUE) padshape(x, drop = TRUE, n=NULL) shapepart(x) shapepart_cyclist(cyc,n=NULL)
x |
Object of class |
cyc |
A cyclist |
n |
Integer governing the size of the partition assumed, with
default |
drop |
Boolean, with default |
id1 |
Boolean, with default |
Function shape()
returns a list with elements representing the
lengths of the component cycles.
Function shapepart()
returns an object of class
partition
showing the permutation as a set partition of
disjoint cycles.
Function shape()
returns the lengths of the cycles in the order
returned by nicify_cyclist()
, so not necessarily in increasing
or decreasing order.
Robin K. S. Hankin
shape(rperm(10,9)) # coerced to cycle data(megaminx) shape(megaminx) jj <- megaminx*megaminx[1] stopifnot(identical(shape(jj),shape(tidy(jj)))) #tidy() does not change shape shapepart(rperm(10,5)) shape_cyclist(list(1:4,8:9)) shapepart_cyclist(list(1:4,8:9))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.