Template Function ADS::heapPermutations

Function Documentation

template<class F>
long ADS::heapPermutations(int n, F &&visit)

the permutations of 0 , … , n - 1 by Heap’s method, one swap each

Pre:

n >= 0