Template Function ADS::forEachPermutationLex

Function Documentation

template<class T, class F>
long ADS::forEachPermutationLex(std::vector<T> &a, F &&visit)

the distinct permutations of the multiset a in lexicographic order from the sorted a, visit( a ) on each; a ends sorted