
ser_permutation_vector
represents a single permutation vector.## constructor
ser_permutation_vector(x, method = NULL)
hclust
). The value NA
creates an identity permutation.ser_permutation_vector
.ser_permutation_vector
objects are usually packed into
a ser_permutation
object
which is a collection of $k$ permutation vectors for $k$-mode data.
The constructor ser_permutation_vector
checks if the permutation vector is valid
(i.e. if all integers occur exactly once).
The following functions are implemented: print
, rev
,
length
, get_order
, get_rank
, get_method
.
ser_permutation
,
get_order
,
get_permutation_matrix
,
permutation_vector2matrix
.p <- ser_permutation_vector(sample(10), "random")
p
## some methods
length(p)
get_method(p)
get_order(p)
get_permutation_matrix(p)
r <- rev(p)
r
get_order(r)
## create a indentity permutation vector (with unknown length)
i <- ser_permutation_vector(NA)
i
Run the code above in your browser using DataLab