Template Function ADS::derangements

Function Documentation

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

the derangements, no item in its own place, f( S ) on each, f returns true to stop; the places are deranged, not the values, as above