Template Function ADS::permutations

Function Documentation

template<class T, class F>
long ADS::permutations(const std::vector<T> &A, F &&f)

the permutations of the items, f( S ) on each, f returns true to stop; the items are told apart by their places, so equal items give each permutation of the values more than once, n! in all