permute Subroutine

private subroutine permute(n, p)

Compute all permutations p of (1, 2, ..., n)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
integer, intent(out), DIMENSION(n, factorial(n)) :: p