
| ACE | BN | BNA | CG | CLG | COMP | FM | FREE | HEKA | IDCA | NCA | NCSF | PART | SFA | SGA | SP | SYMF | TAB | TYP |
FUNCTION: RandPerm - return a random permutation
CALLING SEQUENCE:
PARAMETERS:
SYNOPSIS:
EXAMPLES:
> with(SG):
> RandPerm(7);
[7, 4, 2, 3, 5, 1, 6]
> r := RandPerm(20, 'dominant');
r := [15, 11, 10, 12, 13, 7, 6, 8, 9, 14, 16, 5, 4, 17, 3, 18, 2,
19, 20, 1]
> Perm2Code(r);
[14, 10, 9, 9, 9, 6, 5, 5, 5, 5, 5, 4, 3, 3, 2, 2, 1, 1, 1, 0]
SEE ALSO: Perm2Code