PERMUTE procedure
Forms all possible permutations of the integers 1...n (J.W. McNicol & R.W. Payne).
Option
Parameters
Description
PERMUTE forms all the permutations of the integers 1 up to the value n specified by the NVALUES parameter. The permutations are saved, as a set of variates each of length NVALUES, in a pointer supplied by the PERMUTATIONS parameter. By default, the permutations will occur in an arbitrary order, but option SORT can be set to yes to sort them into the standard (lexicographic) order.
Option: SORT.
Parameters: NVALUES, PERMUTATIONS.
Method
The procedure uses the standard GenStat manipulation directives, CALCULATE, EQUATE etc.