| shape | R Documentation |
Returns the shape (or cycle type) of a permutation, coerced to cycle form.
shape(x, drop = TRUE, id1 = TRUE, decreasing = FALSE)
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 |
decreasing |
In function |
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 padshape() returns a list of shapes but padded with
ones so the total is the size of the permutation.
A quick-and-dirty hack to show the shape of a permutation is to set
option perm_set to “.”:
options("perm_set" = ".")
[length-one permutation sets are recycled as necessary].
shapepart_cyclist() and shapepart_cyclist() are low-level
helper functions.
What I call “shape”, others call the “cycle type”, so you will sometimes see “cycle type determines conjugacy class” as a theorem.
Robin K. S. Hankin
size,conjugate
jj <- as.cycle(c("123", "", "(12)(34)", "12345"))
jj
shape(jj)
shape(rperm(10, 9)) # coerced to cycle
a <- rperm()
identical(shape(a, dec=TRUE), shape(a^cyc_len(2), dec=TRUE))
data(megaminx)
shape(megaminx)
jj <- megaminx*megaminx[1]
identical(shape(jj), shape(tidy(jj))) #tidy() does not change shape
allperms(3)
shapepart(allperms(3))
shapepart(rperm(10, 5))
shape_cyclist(list(1:4, 8:9))
shapepart_cyclist(list(1:4, 8:9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.