Gets or sets the size of a permutation
The ‘size’ of a permutation is the cardinality of the set for which it is a bijection.
1 2 3 4 5 6 7 8 9 10
A permutation object
A matrix that may be coerced to a word
the size to set to, an integer
word object, the size is equal to the number of columns.
cycle object, it is equal to the largest element of any
addcols() is a low-level function that operates on, and
returns, a matrix. It just adds columns to the right of
values equal to their column numbers, thus corresponding to fixed
elements. The resulting matrix has
n columns. This function
cannot remove columns, so if
n<ncol(M) an error is returned.
Setting functions cannot decrease the size of a permutation; use
trim() for this.
It is meaningless to change the size of a
cycle object. Trying
to do so will result in an error. But you can coerce cycle objects to
word form, and change the size of that.
Robin K. S. Hankin
1 2 3 4 5 6 7
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.