Macaulay2 » Documentation
Packages » Permutations :: randomPermutation
next | previous | forward | backward | up | index | toc

randomPermutation -- generates a random permutation

Description

Generates a random permutation on $1..n$.

i1 : randomPermutation 5

o1 = Permutation{3, 4, 1, 5, 2}

o1 : Permutation

Ways to use randomPermutation:

  • randomPermutation(ZZ)

For the programmer

The object randomPermutation is a method function.


The source of this document is in Permutations/Documentation/mainDocs.m2:561:0.