This paper by C++ Standard Committee member Howard Hinnant (great guy - replied to a few of my Stack Overflow questions on C++) is requisite reading for those interested in combinations and permutations.
He has a very efficient "for_each_permutation" algorithm which has better performance (orders of magnitude faster) than std::next/prev_permutation and it supports partial permutations. He also has algorithms for reversible and circular permutations. These are some of the hardest algorithms I've ever seen so he has my total respect.
15 Replies - 11608 Views - Last Post: 14 January 2012 - 04:33 PM